From 0f41ebbbb4923a056b18b81f84df30d4c89026df Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Wed, 17 Apr 2024 16:26:46 -0700 Subject: [PATCH] [ffigen] Move core ObjC classes to package:objective_c (#1088) * Move core ObjC classes to package:objective_c * Fix formatting and analysis * Fix analysis * Fix analysis * Fix analysis and add tests * Fix pub get failure * More tests and coverage * Fix path * Fix permissions * Fix coverage * Debugging coverage * Fix analysis * Still debugging coverage * Fix analysis * Debug coverage * Remove coverage debugging * Daco's comments --- .github/workflows/ffigen.yml | 2 +- .github/workflows/health_flutter.yaml | 1 + .github/workflows/jnigen.yaml | 2 +- .github/workflows/native.yaml | 2 +- .github/workflows/objective_c.yaml | 32 + pkgs/ffigen/CHANGELOG.md | 6 + .../objective_c/avf_audio_bindings.dart | 78776 ++++++---------- .../example/objective_c/play_audio.dart | 1 + .../example/swift/swift_api_bindings.dart | 77007 ++++++--------- pkgs/ffigen/ffigen.schema.json | 3 + .../lib/src/code_generator/imports.dart | 22 +- .../lib/src/code_generator/library.dart | 2 + .../objc_built_in_functions.dart | 84 +- .../src/code_generator/objc_interface.dart | 102 +- .../lib/src/code_generator/pointer.dart | 6 +- .../ffigen/lib/src/code_generator/writer.dart | 8 +- .../lib/src/config_provider/config.dart | 15 + .../lib/src/config_provider/spec_utils.dart | 6 +- pkgs/ffigen/lib/src/executables/ffigen.dart | 11 +- pkgs/ffigen/lib/src/header_parser/data.dart | 3 +- pkgs/ffigen/lib/src/header_parser/parser.dart | 11 +- pkgs/ffigen/lib/src/strings.dart | 1 + .../objective_c_example_test.dart | 9 +- .../example_tests/swift_example_test.dart | 3 +- .../native_objc_test/is_instance_test.dart | 2 + .../nullable_inheritance_test.dart | 2 + .../test/native_objc_test/nullable_test.dart | 2 + .../test/native_objc_test/string_test.dart | 2 + pkgs/ffigen/test/regen.dart | 4 + pkgs/ffigen/tool/coverage.sh | 2 +- pkgs/objective_c/CHANGELOG.md | 5 +- pkgs/objective_c/analysis_options.yaml | 2 + .../{ffigen.yaml => ffigen_c.yaml} | 16 +- pkgs/objective_c/ffigen_objc.yaml | 56 + pkgs/objective_c/lib/objective_c.dart | 35 +- .../lib/src/c_bindings_generated.dart | 111 + pkgs/objective_c/lib/src/core.dart | 51 +- pkgs/objective_c/lib/src/ns_string.dart | 9 + .../src/objective_c_bindings_generated.dart | 16061 +++- pkgs/objective_c/pubspec.yaml | 6 + pkgs/objective_c/src/foundation.h | 14 + pkgs/objective_c/test/generate_code_test.dart | 37 + .../test/interface_lists_test.dart | 53 + pkgs/objective_c/test/nsstring_test.dart | 27 + pkgs/objective_c/tool/coverage.sh | 15 + pkgs/objective_c/tool/data/extra_methods.dart | 20 + pkgs/objective_c/tool/generate_code.dart | 75 + 47 files changed, 72366 insertions(+), 100356 deletions(-) rename pkgs/objective_c/{ffigen.yaml => ffigen_c.yaml} (71%) create mode 100644 pkgs/objective_c/ffigen_objc.yaml create mode 100644 pkgs/objective_c/lib/src/c_bindings_generated.dart create mode 100644 pkgs/objective_c/lib/src/ns_string.dart create mode 100644 pkgs/objective_c/src/foundation.h create mode 100644 pkgs/objective_c/test/generate_code_test.dart create mode 100644 pkgs/objective_c/test/interface_lists_test.dart create mode 100644 pkgs/objective_c/test/nsstring_test.dart create mode 100755 pkgs/objective_c/tool/coverage.sh create mode 100644 pkgs/objective_c/tool/data/extra_methods.dart create mode 100644 pkgs/objective_c/tool/generate_code.dart diff --git a/.github/workflows/ffigen.yml b/.github/workflows/ffigen.yml index 4b775c846..e76f0a11e 100644 --- a/.github/workflows/ffigen.yml +++ b/.github/workflows/ffigen.yml @@ -99,7 +99,7 @@ jobs: - name: Upload coverage uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 with: - carryforward: "jnigen_tests,jni_tests,native_assets_builder_macos,native_assets_builder_ubuntu,native_assets_builder_windows,native_assets_cli_macos,native_assets_cli_ubuntu,native_assets_cli_windows,native_toolchain_c_macos,native_toolchain_c_ubuntu,native_toolchain_c_windows" + carryforward: "objective_c_tests,ffigen_macos,jnigen_tests,jni_tests,native_assets_builder_macos,native_assets_builder_ubuntu,native_assets_builder_windows,native_assets_cli_macos,native_assets_cli_ubuntu,native_assets_cli_windows,native_toolchain_c_macos,native_toolchain_c_ubuntu,native_toolchain_c_windows" github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true diff --git a/.github/workflows/health_flutter.yaml b/.github/workflows/health_flutter.yaml index a526cb7a3..6432947d0 100644 --- a/.github/workflows/health_flutter.yaml +++ b/.github/workflows/health_flutter.yaml @@ -7,6 +7,7 @@ on: - "pkgs/ffigen/**" - "pkgs/jni/**" - "pkgs/jnigen/**" + - "pkgs/objective_c/**" types: [opened, synchronize, reopened, labeled, unlabeled] jobs: health: diff --git a/.github/workflows/jnigen.yaml b/.github/workflows/jnigen.yaml index 05d68af04..a187b8dfa 100644 --- a/.github/workflows/jnigen.yaml +++ b/.github/workflows/jnigen.yaml @@ -424,6 +424,6 @@ jobs: - name: Coveralls finished uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 with: - carryforward: "ffigen_macos,native_assets_builder_macos,native_assets_builder_ubuntu,native_assets_builder_windows,native_assets_cli_macos,native_assets_cli_ubuntu,native_assets_cli_windows,native_toolchain_c_macos,native_toolchain_c_ubuntu,native_toolchain_c_windows" + carryforward: "objective_c_tests,ffigen_macos,jnigen_tests,jni_tests,native_assets_builder_macos,native_assets_builder_ubuntu,native_assets_builder_windows,native_assets_cli_macos,native_assets_cli_ubuntu,native_assets_cli_windows,native_toolchain_c_macos,native_toolchain_c_ubuntu,native_toolchain_c_windows" github-token: ${{ secrets.github_token }} parallel-finished: true diff --git a/.github/workflows/native.yaml b/.github/workflows/native.yaml index 61c72666a..f5ac81433 100644 --- a/.github/workflows/native.yaml +++ b/.github/workflows/native.yaml @@ -145,6 +145,6 @@ jobs: - name: Upload coverage uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 with: - carryforward: "ffigen_macos,jnigen_tests,jni_tests" + carryforward: "objective_c_tests,ffigen_macos,jnigen_tests,jni_tests,native_assets_builder_macos,native_assets_builder_ubuntu,native_assets_builder_windows,native_assets_cli_macos,native_assets_cli_ubuntu,native_assets_cli_windows,native_toolchain_c_macos,native_toolchain_c_ubuntu,native_toolchain_c_windows" github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true diff --git a/.github/workflows/objective_c.yaml b/.github/workflows/objective_c.yaml index c0d7fb24a..2ecdc59bf 100644 --- a/.github/workflows/objective_c.yaml +++ b/.github/workflows/objective_c.yaml @@ -42,3 +42,35 @@ jobs: - name: Analyze code run: flutter analyze --fatal-infos if: always() && steps.install.outcome == 'success' + + test-mac: + needs: analyze + runs-on: 'macos-latest' + defaults: + run: + working-directory: pkgs/objective_c/ + steps: + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 + with: + flutter-version: 3.19.0 + channel: 'stable' + - name: Install dependencies + run: flutter pub get + - name: Run VM tests + run: dart test + - name: Collect coverage + run: ./tool/coverage.sh + - name: Upload coverage + uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 + with: + flag-name: objective_c_tests + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel: true + path-to-lcov: pkgs/objective_c/lcov.info + - name: Upload coverage + uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 + with: + carryforward: "objective_c_tests,ffigen_macos,jnigen_tests,jni_tests,native_assets_builder_macos,native_assets_builder_ubuntu,native_assets_builder_windows,native_assets_cli_macos,native_assets_cli_ubuntu,native_assets_cli_windows,native_toolchain_c_macos,native_toolchain_c_ubuntu,native_toolchain_c_windows" + github-token: ${{ secrets.GITHUB_TOKEN }} + parallel-finished: true diff --git a/pkgs/ffigen/CHANGELOG.md b/pkgs/ffigen/CHANGELOG.md index 9d736b921..8bb233101 100644 --- a/pkgs/ffigen/CHANGELOG.md +++ b/pkgs/ffigen/CHANGELOG.md @@ -9,6 +9,7 @@ - __Breaking change__: Use `package:objective_c` in ObjC bindings. - ObjC packages will have a flutter dependency (until https://github.com/dart-lang/native/issues/1068 is fixed). + - Core classes such as `NSString` have been moved intpu `package:objective_c`. - ObjC class methods don't need the ubiquitous `lib` argument anymore. In fact, ffigen won't even generate the native library class (unless it needs to bind top level functions without using `@Native`). It is still necessary @@ -21,6 +22,11 @@ - Regardless of whether the native library class still exists, delete the `lib` parameter from all ObjC object constructors and static method calls and block constructors. + - If core ObjC classes such as `NSString` are being used, + `package:objective_c` must be imported, as they won't be exported by the + generated bindings. +- Add --[no-]format option to ffigen command line, which controls whether the + formatting step happens. Defaults to true. ## 11.0.0 diff --git a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart index dd661ba46..401633303 100644 --- a/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart +++ b/pkgs/ffigen/example/objective_c/avf_audio_bindings.dart @@ -8,26000 +8,2134 @@ // // 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; +import 'package:objective_c/objective_c.dart' as objc; +import 'dart:ffi' as ffi; -class NSObject extends objc.ObjCObjectBase { - NSObject._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super(pointer, retain: retain, release: release); - - /// Returns a [NSObject] that points to the same underlying object as [other]. - static NSObject castFrom(T other) { - return NSObject._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSObject] that wraps the given raw object pointer. - static NSObject castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSObject._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSObject]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSObject); - } - - static void load() { - _objc_msgSend_1(_class_NSObject, _sel_load); - } - - static void initialize() { - _objc_msgSend_1(_class_NSObject, _sel_initialize); - } - - NSObject init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject new1() { - final _ret = _objc_msgSend_2(_class_NSObject, _sel_new); - return NSObject._(_ret, retain: false, release: true); - } - - static NSObject allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSObject, _sel_allocWithZone_, zone); - return NSObject._(_ret, retain: false, release: true); - } +abstract class NSBinarySearchingOptions { + static const int NSBinarySearchingFirstEqual = 256; + static const int NSBinarySearchingLastEqual = 512; + static const int NSBinarySearchingInsertionIndex = 1024; +} - static NSObject alloc() { - final _ret = _objc_msgSend_2(_class_NSObject, _sel_alloc); - return NSObject._(_ret, retain: false, release: true); - } +abstract class NSStringEnumerationOptions { + static const int NSStringEnumerationByLines = 0; + static const int NSStringEnumerationByParagraphs = 1; + static const int NSStringEnumerationByComposedCharacterSequences = 2; + static const int NSStringEnumerationByWords = 3; + static const int NSStringEnumerationBySentences = 4; + static const int NSStringEnumerationByCaretPositions = 5; + static const int NSStringEnumerationByDeletionClusters = 6; + static const int NSStringEnumerationReverse = 256; + static const int NSStringEnumerationSubstringNotRequired = 512; + static const int NSStringEnumerationLocalized = 1024; +} - void dealloc() { - _objc_msgSend_1(this.pointer, _sel_dealloc); - } +class NSBundle extends objc.NSObject { + NSBundle._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - void finalize() { - _objc_msgSend_1(this.pointer, _sel_finalize); - } + /// Constructs a [NSBundle] that points to the same underlying object as [other]. + NSBundle.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSObject copy() { - final _ret = _objc_msgSend_2(this.pointer, _sel_copy); - return NSObject._(_ret, retain: false, 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); - NSObject mutableCopy() { - final _ret = _objc_msgSend_2(this.pointer, _sel_mutableCopy); - return NSObject._(_ret, retain: false, release: true); + /// Returns whether [obj] is an instance of [NSBundle]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSBundle); } - static NSObject copyWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSObject, _sel_copyWithZone_, zone); - return NSObject._(_ret, retain: false, release: true); + static NSBundle getMainBundle() { + final _ret = _objc_msgSend_1(_class_NSBundle, _sel_mainBundle); + return NSBundle.castFromPointer(_ret, retain: true, release: true); } - static NSObject mutableCopyWithZone_(ffi.Pointer<_NSZone> zone) { + static NSBundle? bundleWithPath_(objc.NSString path) { final _ret = - _objc_msgSend_3(_class_NSObject, _sel_mutableCopyWithZone_, zone); - return NSObject._(_ret, retain: false, release: true); - } - - static bool instancesRespondToSelector_( - ffi.Pointer aSelector) { - return _objc_msgSend_4( - _class_NSObject, _sel_instancesRespondToSelector_, aSelector); - } - - static bool conformsToProtocol_(Protocol protocol) { - return _objc_msgSend_5( - _class_NSObject, _sel_conformsToProtocol_, protocol.pointer); - } - - ffi.Pointer> methodForSelector_( - ffi.Pointer aSelector) { - return _objc_msgSend_6(this.pointer, _sel_methodForSelector_, aSelector); - } - - static ffi.Pointer> - instanceMethodForSelector_(ffi.Pointer aSelector) { - return _objc_msgSend_6( - _class_NSObject, _sel_instanceMethodForSelector_, aSelector); - } - - void doesNotRecognizeSelector_(ffi.Pointer aSelector) { - _objc_msgSend_7(this.pointer, _sel_doesNotRecognizeSelector_, aSelector); - } - - NSObject forwardingTargetForSelector_( - ffi.Pointer aSelector) { - final _ret = _objc_msgSend_8( - this.pointer, _sel_forwardingTargetForSelector_, aSelector); - return NSObject._(_ret, retain: true, release: true); - } - - void forwardInvocation_(NSInvocation anInvocation) { - _objc_msgSend_421( - this.pointer, _sel_forwardInvocation_, anInvocation.pointer); - } - - NSMethodSignature methodSignatureForSelector_( - ffi.Pointer aSelector) { - final _ret = _objc_msgSend_422( - this.pointer, _sel_methodSignatureForSelector_, aSelector); - return NSMethodSignature._(_ret, retain: true, release: true); - } - - static NSMethodSignature instanceMethodSignatureForSelector_( - ffi.Pointer aSelector) { - final _ret = _objc_msgSend_422( - _class_NSObject, _sel_instanceMethodSignatureForSelector_, aSelector); - return NSMethodSignature._(_ret, retain: true, release: true); - } - - bool allowsWeakReference() { - return _objc_msgSend_12(this.pointer, _sel_allowsWeakReference); - } - - bool retainWeakReference() { - return _objc_msgSend_12(this.pointer, _sel_retainWeakReference); - } - - static bool isSubclassOfClass_(NSObject aClass) { - return _objc_msgSend_0( - _class_NSObject, _sel_isSubclassOfClass_, aClass.pointer); - } - - static bool resolveClassMethod_(ffi.Pointer sel) { - return _objc_msgSend_4(_class_NSObject, _sel_resolveClassMethod_, sel); - } - - static bool resolveInstanceMethod_(ffi.Pointer sel) { - return _objc_msgSend_4(_class_NSObject, _sel_resolveInstanceMethod_, sel); - } - - static int hash() { - return _objc_msgSend_10(_class_NSObject, _sel_hash); - } - - static NSObject superclass() { - final _ret = _objc_msgSend_2(_class_NSObject, _sel_superclass); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject class1() { - final _ret = _objc_msgSend_2(_class_NSObject, _sel_class); - return NSObject._(_ret, retain: true, release: true); - } - - static NSString description() { - final _ret = _objc_msgSend_21(_class_NSObject, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - static NSString debugDescription() { - final _ret = _objc_msgSend_21(_class_NSObject, _sel_debugDescription); - return NSString._(_ret, retain: true, release: true); - } - - static int version() { - return _objc_msgSend_83(_class_NSObject, _sel_version); - } - - static void setVersion_(int aVersion) { - _objc_msgSend_423(_class_NSObject, _sel_setVersion_, aVersion); - } - - NSObject get classForCoder { - final _ret = _objc_msgSend_2(this.pointer, _sel_classForCoder); - return NSObject._(_ret, retain: true, release: true); - } - - NSObject? replacementObjectForCoder_(NSCoder coder) { - final _ret = _objc_msgSend_47( - this.pointer, _sel_replacementObjectForCoder_, coder.pointer); + _objc_msgSend_2(_class_NSBundle, _sel_bundleWithPath_, path.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - NSObject? awakeAfterUsingCoder_(NSCoder coder) { - final _ret = _objc_msgSend_47( - this.pointer, _sel_awakeAfterUsingCoder_, coder.pointer); + NSBundle? initWithPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithPath_, path.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: false, release: true); - } - - static void poseAsClass_(NSObject aClass) { - _objc_msgSend_15(_class_NSObject, _sel_poseAsClass_, aClass.pointer); - } - - NSObject get autoContentAccessingProxy { - final _ret = _objc_msgSend_2(this.pointer, _sel_autoContentAccessingProxy); - return NSObject._(_ret, retain: true, release: true); - } - - void - attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( - NSError error, - int recoveryOptionIndex, - NSObject? delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo) { - _objc_msgSend_424( - this.pointer, - _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_, - error.pointer, - recoveryOptionIndex, - delegate?.pointer ?? ffi.nullptr, - didRecoverSelector, - contextInfo); + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - bool attemptRecoveryFromError_optionIndex_( - NSError error, int recoveryOptionIndex) { - return _objc_msgSend_425( - this.pointer, - _sel_attemptRecoveryFromError_optionIndex_, - error.pointer, - recoveryOptionIndex); + static NSBundle? bundleWithURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_3(_class_NSBundle, _sel_bundleWithURL_, url.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - void performSelector_withObject_afterDelay_inModes_( - ffi.Pointer aSelector, - NSObject? anArgument, - double delay, - NSArray modes) { - _objc_msgSend_426( - this.pointer, - _sel_performSelector_withObject_afterDelay_inModes_, - aSelector, - anArgument?.pointer ?? ffi.nullptr, - delay, - modes.pointer); + NSBundle? initWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_3(this.pointer, _sel_initWithURL_, url.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - void performSelector_withObject_afterDelay_( - ffi.Pointer aSelector, - NSObject? anArgument, - double delay) { - _objc_msgSend_427(this.pointer, _sel_performSelector_withObject_afterDelay_, - aSelector, anArgument?.pointer ?? ffi.nullptr, delay); + static NSBundle bundleForClass_(objc.NSObject aClass) { + final _ret = + _objc_msgSend_4(_class_NSBundle, _sel_bundleForClass_, aClass.pointer); + return NSBundle.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSObject, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + static NSBundle? bundleWithIdentifier_(objc.NSString identifier) { + final _ret = _objc_msgSend_5( + _class_NSBundle, _sel_bundleWithIdentifier_, identifier.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSObject, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + static objc.NSArray getAllBundles() { + final _ret = _objc_msgSend_6(_class_NSBundle, _sel_allBundles); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void URL_resourceDataDidBecomeAvailable_(NSURL sender, NSData newBytes) { - _objc_msgSend_428(this.pointer, _sel_URL_resourceDataDidBecomeAvailable_, - sender.pointer, newBytes.pointer); + static objc.NSArray getAllFrameworks() { + final _ret = _objc_msgSend_6(_class_NSBundle, _sel_allFrameworks); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void URLResourceDidFinishLoading_(NSURL sender) { - _objc_msgSend_429( - this.pointer, _sel_URLResourceDidFinishLoading_, sender.pointer); + bool load() { + return _objc_msgSend_7(this.pointer, _sel_load); } - void URLResourceDidCancelLoading_(NSURL sender) { - _objc_msgSend_429( - this.pointer, _sel_URLResourceDidCancelLoading_, sender.pointer); + bool get loaded { + return _objc_msgSend_7(this.pointer, _sel_isLoaded); } - void URL_resourceDidFailLoadingWithReason_(NSURL sender, NSString reason) { - _objc_msgSend_430(this.pointer, _sel_URL_resourceDidFailLoadingWithReason_, - sender.pointer, reason.pointer); + bool unload() { + return _objc_msgSend_7(this.pointer, _sel_unload); } - bool fileManager_shouldProceedAfterError_( - NSFileManager fm, NSDictionary errorInfo) { - return _objc_msgSend_467( - this.pointer, - _sel_fileManager_shouldProceedAfterError_, - fm.pointer, - errorInfo.pointer); + bool preflightAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_preflightAndReturnError_, error); } - void fileManager_willProcessPath_(NSFileManager fm, NSString path) { - _objc_msgSend_468(this.pointer, _sel_fileManager_willProcessPath_, - fm.pointer, path.pointer); + bool loadAndReturnError_(ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_loadAndReturnError_, error); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSObject, _sel_accessInstanceVariablesDirectly); + objc.NSURL get bundleURL { + final _ret = _objc_msgSend_9(this.pointer, _sel_bundleURL); + return objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSObject? valueForKey_(NSString key) { - final _ret = _objc_msgSend_38(this.pointer, _sel_valueForKey_, key.pointer); + objc.NSURL? get resourceURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_resourceURL); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void setValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - bool validateValue_forKey_error_( - ffi.Pointer> ioValue, - NSString inKey, - ffi.Pointer> outError) { - return _objc_msgSend_243(this.pointer, _sel_validateValue_forKey_error_, - ioValue, inKey.pointer, outError); - } - - NSMutableArray mutableArrayValueForKey_(NSString key) { - final _ret = _objc_msgSend_488( - this.pointer, _sel_mutableArrayValueForKey_, key.pointer); - return NSMutableArray._(_ret, retain: true, release: true); - } - - NSMutableOrderedSet mutableOrderedSetValueForKey_(NSString key) { - final _ret = _objc_msgSend_506( - this.pointer, _sel_mutableOrderedSetValueForKey_, key.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - NSMutableSet mutableSetValueForKey_(NSString key) { - final _ret = _objc_msgSend_507( - this.pointer, _sel_mutableSetValueForKey_, key.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - NSObject? valueForKeyPath_(NSString keyPath) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_valueForKeyPath_, keyPath.pointer); + objc.NSURL? get executableURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_executableURL); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); - } - - void setValue_forKeyPath_(NSObject? value, NSString keyPath) { - _objc_msgSend_135(this.pointer, _sel_setValue_forKeyPath_, - value?.pointer ?? ffi.nullptr, keyPath.pointer); - } - - bool validateValue_forKeyPath_error_( - ffi.Pointer> ioValue, - NSString inKeyPath, - ffi.Pointer> outError) { - return _objc_msgSend_243(this.pointer, _sel_validateValue_forKeyPath_error_, - ioValue, inKeyPath.pointer, outError); - } - - NSMutableArray mutableArrayValueForKeyPath_(NSString keyPath) { - final _ret = _objc_msgSend_488( - this.pointer, _sel_mutableArrayValueForKeyPath_, keyPath.pointer); - return NSMutableArray._(_ret, retain: true, release: true); - } - - NSMutableOrderedSet mutableOrderedSetValueForKeyPath_(NSString keyPath) { - final _ret = _objc_msgSend_506( - this.pointer, _sel_mutableOrderedSetValueForKeyPath_, keyPath.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - NSMutableSet mutableSetValueForKeyPath_(NSString keyPath) { - final _ret = _objc_msgSend_507( - this.pointer, _sel_mutableSetValueForKeyPath_, keyPath.pointer); - return NSMutableSet._(_ret, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSObject? valueForUndefinedKey_(NSString key) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_valueForUndefinedKey_, key.pointer); + objc.NSURL? URLForAuxiliaryExecutable_(objc.NSString executableName) { + final _ret = _objc_msgSend_11( + this.pointer, _sel_URLForAuxiliaryExecutable_, executableName.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); - } - - void setValue_forUndefinedKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setValue_forUndefinedKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - void setNilValueForKey_(NSString key) { - _objc_msgSend_247(this.pointer, _sel_setNilValueForKey_, key.pointer); - } - - NSDictionary dictionaryWithValuesForKeys_(NSArray keys) { - final _ret = _objc_msgSend_508( - this.pointer, _sel_dictionaryWithValuesForKeys_, keys.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } - - void setValuesForKeysWithDictionary_(NSDictionary keyedValues) { - _objc_msgSend_509(this.pointer, _sel_setValuesForKeysWithDictionary_, - keyedValues.pointer); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSObject, _sel_useStoredAccessor); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSObject? storedValueForKey_(NSString key) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_storedValueForKey_, key.pointer); + objc.NSURL? get privateFrameworksURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_privateFrameworksURL); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); - } - - void takeStoredValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_takeStoredValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - void takeValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_takeValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - void takeValue_forKeyPath_(NSObject? value, NSString keyPath) { - _objc_msgSend_135(this.pointer, _sel_takeValue_forKeyPath_, - value?.pointer ?? ffi.nullptr, keyPath.pointer); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSObject? handleQueryWithUnboundKey_(NSString key) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_handleQueryWithUnboundKey_, key.pointer); + objc.NSURL? get sharedFrameworksURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_sharedFrameworksURL); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); - } - - void handleTakeValue_forUnboundKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_handleTakeValue_forUnboundKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - void unableToSetNilForKey_(NSString key) { - _objc_msgSend_247(this.pointer, _sel_unableToSetNilForKey_, key.pointer); - } - - NSDictionary valuesForKeys_(NSArray keys) { - final _ret = - _objc_msgSend_508(this.pointer, _sel_valuesForKeys_, keys.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } - - void takeValuesFromDictionary_(NSDictionary properties) { - _objc_msgSend_509( - this.pointer, _sel_takeValuesFromDictionary_, properties.pointer); - } - - void observeValueForKeyPath_ofObject_change_context_(NSString? keyPath, - NSObject? object, NSDictionary? change, ffi.Pointer context) { - _objc_msgSend_510( - this.pointer, - _sel_observeValueForKeyPath_ofObject_change_context_, - keyPath?.pointer ?? ffi.nullptr, - object?.pointer ?? ffi.nullptr, - change?.pointer ?? ffi.nullptr, - context); - } - - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _objc_msgSend_139( - this.pointer, - _sel_addObserver_forKeyPath_options_context_, - observer.pointer, - keyPath.pointer, - options, - context); - } - - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _objc_msgSend_140(this.pointer, _sel_removeObserver_forKeyPath_context_, - observer.pointer, keyPath.pointer, context); - } - - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _objc_msgSend_141(this.pointer, _sel_removeObserver_forKeyPath_, - observer.pointer, keyPath.pointer); - } - - void willChangeValueForKey_(NSString key) { - _objc_msgSend_247(this.pointer, _sel_willChangeValueForKey_, key.pointer); - } - - void didChangeValueForKey_(NSString key) { - _objc_msgSend_247(this.pointer, _sel_didChangeValueForKey_, key.pointer); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void willChange_valuesAtIndexes_forKey_( - int changeKind, NSIndexSet indexes, NSString key) { - _objc_msgSend_511(this.pointer, _sel_willChange_valuesAtIndexes_forKey_, - changeKind, indexes.pointer, key.pointer); + objc.NSURL? get sharedSupportURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_sharedSupportURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void didChange_valuesAtIndexes_forKey_( - int changeKind, NSIndexSet indexes, NSString key) { - _objc_msgSend_511(this.pointer, _sel_didChange_valuesAtIndexes_forKey_, - changeKind, indexes.pointer, key.pointer); + objc.NSURL? get builtInPlugInsURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_builtInPlugInsURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void willChangeValueForKey_withSetMutation_usingObjects_( - NSString key, int mutationKind, NSSet objects) { - _objc_msgSend_512( - this.pointer, - _sel_willChangeValueForKey_withSetMutation_usingObjects_, - key.pointer, - mutationKind, - objects.pointer); + objc.NSURL? get appStoreReceiptURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_appStoreReceiptURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void didChangeValueForKey_withSetMutation_usingObjects_( - NSString key, int mutationKind, NSSet objects) { - _objc_msgSend_512( - this.pointer, - _sel_didChangeValueForKey_withSetMutation_usingObjects_, - key.pointer, - mutationKind, - objects.pointer); + objc.NSString get bundlePath { + final _ret = _objc_msgSend_12(this.pointer, _sel_bundlePath); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSObject, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + objc.NSString? get resourcePath { + final _ret = _objc_msgSend_13(this.pointer, _sel_resourcePath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSObject, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + objc.NSString? get executablePath { + final _ret = _objc_msgSend_13(this.pointer, _sel_executablePath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer get observationInfo { - return _objc_msgSend_20(this.pointer, _sel_observationInfo); + objc.NSString? pathForAuxiliaryExecutable_(objc.NSString executableName) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_pathForAuxiliaryExecutable_, executableName.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set observationInfo(ffi.Pointer value) { - return _objc_msgSend_513(this.pointer, _sel_setObservationInfo_, value); + objc.NSString? get privateFrameworksPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_privateFrameworksPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSObject, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + objc.NSString? get sharedFrameworksPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_sharedFrameworksPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject? get classForKeyedArchiver { - final _ret = _objc_msgSend_17(this.pointer, _sel_classForKeyedArchiver); + objc.NSString? get sharedSupportPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_sharedSupportPath); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject? replacementObjectForKeyedArchiver_(NSKeyedArchiver archiver) { - final _ret = _objc_msgSend_528(this.pointer, - _sel_replacementObjectForKeyedArchiver_, archiver.pointer); + objc.NSString? get builtInPlugInsPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_builtInPlugInsPath); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSObject, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_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_15( + _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); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSObject, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSArray? + URLsForResourcesWithExtension_subdirectory_inBundleWithURL_( + objc.NSString? ext, objc.NSString? subpath, objc.NSURL bundleURL) { + final _ret = _objc_msgSend_16( + _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); } - void performSelectorOnMainThread_withObject_waitUntilDone_modes_( - ffi.Pointer aSelector, - NSObject? arg, - bool wait, - NSArray? array) { - _objc_msgSend_529( + objc.NSURL? URLForResource_withExtension_( + objc.NSString? name, objc.NSString? ext) { + final _ret = _objc_msgSend_17( this.pointer, - _sel_performSelectorOnMainThread_withObject_waitUntilDone_modes_, - aSelector, - arg?.pointer ?? ffi.nullptr, - wait, - array?.pointer ?? ffi.nullptr); + _sel_URLForResource_withExtension_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void performSelectorOnMainThread_withObject_waitUntilDone_( - ffi.Pointer aSelector, NSObject? arg, bool wait) { - _objc_msgSend_530( + objc.NSURL? URLForResource_withExtension_subdirectory_( + objc.NSString? name, objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_18( this.pointer, - _sel_performSelectorOnMainThread_withObject_waitUntilDone_, - aSelector, - arg?.pointer ?? ffi.nullptr, - wait); + _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); } - void performSelector_onThread_withObject_waitUntilDone_modes_( - ffi.Pointer aSelector, - NSThread thr, - NSObject? arg, - bool wait, - NSArray? array) { - _objc_msgSend_548( + objc.NSURL? URLForResource_withExtension_subdirectory_localization_( + objc.NSString? name, + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_19( this.pointer, - _sel_performSelector_onThread_withObject_waitUntilDone_modes_, - aSelector, - thr.pointer, - arg?.pointer ?? ffi.nullptr, - wait, - array?.pointer ?? ffi.nullptr); + _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); } - void performSelector_onThread_withObject_waitUntilDone_( - ffi.Pointer aSelector, - NSThread thr, - NSObject? arg, - bool wait) { - _objc_msgSend_549( + objc.NSArray? URLsForResourcesWithExtension_subdirectory_( + objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_20( this.pointer, - _sel_performSelector_onThread_withObject_waitUntilDone_, - aSelector, - thr.pointer, - arg?.pointer ?? ffi.nullptr, - wait); - } - - void performSelectorInBackground_withObject_( - ffi.Pointer aSelector, NSObject? arg) { - _objc_msgSend_90(this.pointer, _sel_performSelectorInBackground_withObject_, - aSelector, arg?.pointer ?? ffi.nullptr); - } - - NSObject? get classForArchiver { - final _ret = _objc_msgSend_17(this.pointer, _sel_classForArchiver); + _sel_URLsForResourcesWithExtension_subdirectory_, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSObject? replacementObjectForArchiver_(NSArchiver archiver) { - final _ret = _objc_msgSend_552( - this.pointer, _sel_replacementObjectForArchiver_, archiver.pointer); + objc.NSArray? URLsForResourcesWithExtension_subdirectory_localization_( + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_21( + this.pointer, + _sel_URLsForResourcesWithExtension_subdirectory_localization_, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + localizationName?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSObject get classForPortCoder { - final _ret = _objc_msgSend_2(this.pointer, _sel_classForPortCoder); - return NSObject._(_ret, retain: true, release: true); - } - - NSObject? replacementObjectForPortCoder_(NSPortCoder coder) { - final _ret = _objc_msgSend_597( - this.pointer, _sel_replacementObjectForPortCoder_, coder.pointer); + static objc.NSString? pathForResource_ofType_inDirectory_( + objc.NSString? name, objc.NSString? ext, objc.NSString bundlePath) { + final _ret = _objc_msgSend_22( + _class_NSBundle, + _sel_pathForResource_ofType_inDirectory_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr, + bundlePath.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSClassDescription get classDescription { - final _ret = _objc_msgSend_600(this.pointer, _sel_classDescription); - return NSClassDescription._(_ret, retain: true, release: true); - } - - NSArray get attributeKeys { - final _ret = _objc_msgSend_85(this.pointer, _sel_attributeKeys); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get toOneRelationshipKeys { - final _ret = _objc_msgSend_85(this.pointer, _sel_toOneRelationshipKeys); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get toManyRelationshipKeys { - final _ret = _objc_msgSend_85(this.pointer, _sel_toManyRelationshipKeys); - return NSArray._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? inverseForRelationshipKey_(NSString relationshipKey) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_inverseForRelationshipKey_, relationshipKey.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static objc.NSArray pathsForResourcesOfType_inDirectory_( + objc.NSString? ext, objc.NSString bundlePath) { + final _ret = _objc_msgSend_23( + _class_NSBundle, + _sel_pathsForResourcesOfType_inDirectory_, + ext?.pointer ?? ffi.nullptr, + bundlePath.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSObject? scriptingValueForSpecifier_( - NSScriptObjectSpecifier objectSpecifier) { - final _ret = _objc_msgSend_649(this.pointer, - _sel_scriptingValueForSpecifier_, objectSpecifier.pointer); + objc.NSString? pathForResource_ofType_( + objc.NSString? name, objc.NSString? ext) { + final _ret = _objc_msgSend_24(this.pointer, _sel_pathForResource_ofType_, + name?.pointer ?? ffi.nullptr, ext?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get scriptingProperties { - final _ret = _objc_msgSend_390(this.pointer, _sel_scriptingProperties); + objc.NSString? pathForResource_ofType_inDirectory_forLocalization_( + objc.NSString? name, + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_25( + this.pointer, + _sel_pathForResource_ofType_inDirectory_forLocalization_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + localizationName?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set scriptingProperties(NSDictionary? value) { - return _objc_msgSend_634(this.pointer, _sel_setScriptingProperties_, - value?.pointer ?? ffi.nullptr); + objc.NSArray pathsForResourcesOfType_inDirectory_forLocalization_( + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_26( + 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); } - NSObject? copyScriptingValue_forKey_withProperties_( - NSObject value, NSString key, NSDictionary properties) { - final _ret = _objc_msgSend_650( + objc.NSString localizedStringForKey_value_table_( + objc.NSString key, objc.NSString? value, objc.NSString? tableName) { + final _ret = _objc_msgSend_27( this.pointer, - _sel_copyScriptingValue_forKey_withProperties_, - value.pointer, + _sel_localizedStringForKey_value_table_, key.pointer, - properties.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: false, release: true); + value?.pointer ?? ffi.nullptr, + tableName?.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject? - newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_( - NSObject objectClass, - NSString key, - NSObject? contentsValue, - NSDictionary properties) { - final _ret = _objc_msgSend_651( + NSAttributedString localizedAttributedStringForKey_value_table_( + objc.NSString key, objc.NSString? value, objc.NSString? tableName) { + final _ret = _objc_msgSend_64( this.pointer, - _sel_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_, - objectClass.pointer, + _sel_localizedAttributedStringForKey_value_table_, key.pointer, - contentsValue?.pointer ?? ffi.nullptr, - properties.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: false, release: true); - } - - int get classCode { - return _objc_msgSend_214(this.pointer, _sel_classCode); + value?.pointer ?? ffi.nullptr, + tableName?.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSString? get className { - final _ret = _objc_msgSend_44(this.pointer, _sel_className); + objc.NSString? get bundleIdentifier { + final _ret = _objc_msgSend_13(this.pointer, _sel_bundleIdentifier); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject? valueAtIndex_inPropertyWithKey_(int index, NSString key) { - final _ret = _objc_msgSend_652( - this.pointer, _sel_valueAtIndex_inPropertyWithKey_, index, key.pointer); + objc.NSDictionary? get infoDictionary { + final _ret = _objc_msgSend_65(this.pointer, _sel_infoDictionary); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSObject? valueWithName_inPropertyWithKey_(NSString name, NSString key) { - final _ret = _objc_msgSend_175(this.pointer, - _sel_valueWithName_inPropertyWithKey_, name.pointer, key.pointer); + objc.NSDictionary? get localizedInfoDictionary { + final _ret = _objc_msgSend_65(this.pointer, _sel_localizedInfoDictionary); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSObject? valueWithUniqueID_inPropertyWithKey_( - NSObject uniqueID, NSString key) { - final _ret = _objc_msgSend_311( - this.pointer, - _sel_valueWithUniqueID_inPropertyWithKey_, - uniqueID.pointer, - key.pointer); + objc.NSObject? objectForInfoDictionaryKey_(objc.NSString key) { + final _ret = _objc_msgSend_2( + this.pointer, _sel_objectForInfoDictionaryKey_, key.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void insertValue_atIndex_inPropertyWithKey_( - NSObject value, int index, NSString key) { - _objc_msgSend_653(this.pointer, _sel_insertValue_atIndex_inPropertyWithKey_, - value.pointer, index, key.pointer); - } - - void removeValueAtIndex_fromPropertyWithKey_(int index, NSString key) { - _objc_msgSend_654(this.pointer, - _sel_removeValueAtIndex_fromPropertyWithKey_, index, key.pointer); + objc.NSObject? classNamed_(objc.NSString className) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_classNamed_, className.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void replaceValueAtIndex_inPropertyWithKey_withValue_( - int index, NSString key, NSObject value) { - _objc_msgSend_655( - this.pointer, - _sel_replaceValueAtIndex_inPropertyWithKey_withValue_, - index, - key.pointer, - value.pointer); + objc.NSObject? get principalClass { + final _ret = _objc_msgSend_66(this.pointer, _sel_principalClass); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void insertValue_inPropertyWithKey_(NSObject value, NSString key) { - _objc_msgSend_656(this.pointer, _sel_insertValue_inPropertyWithKey_, - value.pointer, key.pointer); + objc.NSArray get preferredLocalizations { + final _ret = _objc_msgSend_6(this.pointer, _sel_preferredLocalizations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSObject? coerceValue_forKey_(NSObject? value, NSString key) { - final _ret = _objc_msgSend_657(this.pointer, _sel_coerceValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + objc.NSArray get localizations { + final _ret = _objc_msgSend_6(this.pointer, _sel_localizations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSScriptObjectSpecifier? get objectSpecifier { - final _ret = _objc_msgSend_632(this.pointer, _sel_objectSpecifier); + objc.NSString? get developmentLocalization { + final _ret = _objc_msgSend_13(this.pointer, _sel_developmentLocalization); return _ret.address == 0 ? null - : NSScriptObjectSpecifier._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSArray? indicesOfObjectsByEvaluatingObjectSpecifier_( - NSScriptObjectSpecifier specifier) { - final _ret = _objc_msgSend_658(this.pointer, - _sel_indicesOfObjectsByEvaluatingObjectSpecifier_, specifier.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + static objc.NSArray preferredLocalizationsFromArray_( + objc.NSArray localizationsArray) { + final _ret = _objc_msgSend_67(_class_NSBundle, + _sel_preferredLocalizationsFromArray_, localizationsArray.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool isEqualTo_(NSObject? object) { - return _objc_msgSend_217( - this.pointer, _sel_isEqualTo_, object?.pointer ?? ffi.nullptr); + static objc.NSArray preferredLocalizationsFromArray_forPreferences_( + objc.NSArray localizationsArray, objc.NSArray? preferencesArray) { + final _ret = _objc_msgSend_68( + _class_NSBundle, + _sel_preferredLocalizationsFromArray_forPreferences_, + localizationsArray.pointer, + preferencesArray?.pointer ?? ffi.nullptr); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool isLessThanOrEqualTo_(NSObject? object) { - return _objc_msgSend_217(this.pointer, _sel_isLessThanOrEqualTo_, - object?.pointer ?? ffi.nullptr); + objc.NSArray? get executableArchitectures { + final _ret = _objc_msgSend_69(this.pointer, _sel_executableArchitectures); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool isLessThan_(NSObject? object) { - return _objc_msgSend_217( - this.pointer, _sel_isLessThan_, object?.pointer ?? ffi.nullptr); + void setPreservationPriority_forTags_(double priority, objc.NSSet tags) { + _objc_msgSend_70(this.pointer, _sel_setPreservationPriority_forTags_, + priority, tags.pointer); } - bool isGreaterThanOrEqualTo_(NSObject? object) { - return _objc_msgSend_217(this.pointer, _sel_isGreaterThanOrEqualTo_, - object?.pointer ?? ffi.nullptr); + double preservationPriorityForTag_(objc.NSString tag) { + return objc.useMsgSendVariants + ? _objc_msgSend_71Fpret( + this.pointer, _sel_preservationPriorityForTag_, tag.pointer) + : _objc_msgSend_71( + this.pointer, _sel_preservationPriorityForTag_, tag.pointer); } - bool isGreaterThan_(NSObject? object) { - return _objc_msgSend_217( - this.pointer, _sel_isGreaterThan_, object?.pointer ?? ffi.nullptr); + @override + NSBundle init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSBundle.castFromPointer(_ret, retain: true, release: true); } - bool isNotEqualTo_(NSObject? object) { - return _objc_msgSend_217( - this.pointer, _sel_isNotEqualTo_, object?.pointer ?? ffi.nullptr); + static NSBundle new1() { + final _ret = _objc_msgSend_40(_class_NSBundle, _sel_new); + return NSBundle.castFromPointer(_ret, retain: false, release: true); } - bool doesContain_(NSObject object) { - return _objc_msgSend_0(this.pointer, _sel_doesContain_, object.pointer); + static NSBundle allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSBundle, _sel_allocWithZone_, zone); + return NSBundle.castFromPointer(_ret, retain: false, release: true); } - bool isLike_(NSString object) { - return _objc_msgSend_64(this.pointer, _sel_isLike_, object.pointer); + static NSBundle alloc() { + final _ret = _objc_msgSend_40(_class_NSBundle, _sel_alloc); + return NSBundle.castFromPointer(_ret, retain: false, release: true); } - bool isCaseInsensitiveLike_(NSString object) { - return _objc_msgSend_64( - this.pointer, _sel_isCaseInsensitiveLike_, object.pointer); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSBundle, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - bool scriptingIsEqualTo_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingIsEqualTo_, object.pointer); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSBundle, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - bool scriptingIsLessThanOrEqualTo_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingIsLessThanOrEqualTo_, object.pointer); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSBundle, _sel_accessInstanceVariablesDirectly); } - bool scriptingIsLessThan_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingIsLessThan_, object.pointer); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSBundle, _sel_useStoredAccessor); } - bool scriptingIsGreaterThanOrEqualTo_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingIsGreaterThanOrEqualTo_, object.pointer); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSBundle, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - bool scriptingIsGreaterThan_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingIsGreaterThan_, object.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSBundle, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - bool scriptingBeginsWith_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingBeginsWith_, object.pointer); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSBundle, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - bool scriptingEndsWith_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingEndsWith_, object.pointer); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSBundle, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool scriptingContains_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingContains_, object.pointer); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSBundle, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSObject = objc.getClass("NSObject"); -late final _sel_load = objc.registerName("load"); +late final _class_NSBundle = objc.getClass("NSBundle"); +late final _sel_mainBundle = objc.registerName("mainBundle"); final _objc_msgSend_1 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_initialize = objc.registerName("initialize"); typedef instancetype = ffi.Pointer; -typedef Dartinstancetype = NSObject; -late final _sel_init = objc.registerName("init"); +typedef Dartinstancetype = objc.NSObject; +late final _sel_bundleWithPath_ = objc.registerName("bundleWithPath:"); final _objc_msgSend_2 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_new = objc.registerName("new"); - -final class _NSZone extends ffi.Opaque {} - -late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); -final _objc_msgSend_3 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>>() + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>(); -late final _sel_alloc = objc.registerName("alloc"); -late final _sel_dealloc = objc.registerName("dealloc"); -late final _sel_finalize = objc.registerName("finalize"); -late final _sel_copy = objc.registerName("copy"); -late final _sel_mutableCopy = objc.registerName("mutableCopy"); -late final _sel_copyWithZone_ = objc.registerName("copyWithZone:"); -late final _sel_mutableCopyWithZone_ = - objc.registerName("mutableCopyWithZone:"); -late final _sel_instancesRespondToSelector_ = - objc.registerName("instancesRespondToSelector:"); -final _objc_msgSend_4 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithPath_ = objc.registerName("initWithPath:"); +late final _sel_bundleWithURL_ = objc.registerName("bundleWithURL:"); +final _objc_msgSend_3 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer)>>() .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -class Protocol extends objc.ObjCObjectBase { - Protocol._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super(pointer, retain: retain, release: release); - - /// Returns a [Protocol] that points to the same underlying object as [other]. - static Protocol castFrom(T other) { - return Protocol._(other.pointer, retain: true, release: true); - } - - /// Returns a [Protocol] that wraps the given raw object pointer. - static Protocol castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return Protocol._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [Protocol]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_Protocol); - } -} - -final _objc_msgSend_0 = objc.msgSendPointer + 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_4 = 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_isKindOfClass_ = objc.registerName("isKindOfClass:"); -late final _class_Protocol = objc.getClass("Protocol"); -late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); +late final _sel_bundleWithIdentifier_ = + objc.registerName("bundleWithIdentifier:"); final _objc_msgSend_5 = 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_methodForSelector_ = objc.registerName("methodForSelector:"); +late final _sel_allBundles = objc.registerName("allBundles"); final _objc_msgSend_6 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Pointer, - ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_instanceMethodForSelector_ = - objc.registerName("instanceMethodForSelector:"); -late final _sel_doesNotRecognizeSelector_ = - objc.registerName("doesNotRecognizeSelector:"); -final _objc_msgSend_7 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allFrameworks = objc.registerName("allFrameworks"); +late final _sel_load = objc.registerName("load"); +final _objc_msgSend_7 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, + ffi.Bool Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_forwardingTargetForSelector_ = - objc.registerName("forwardingTargetForSelector:"); + bool Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isLoaded = objc.registerName("isLoaded"); +late final _sel_unload = objc.registerName("unload"); +late final _sel_preflightAndReturnError_ = + objc.registerName("preflightAndReturnError:"); final _objc_msgSend_8 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer>)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -class NSInvocation extends NSObject { - NSInvocation._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSInvocation] that points to the same underlying object as [other]. - static NSInvocation castFrom(T other) { - return NSInvocation._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSInvocation] that wraps the given raw object pointer. - static NSInvocation castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInvocation._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSInvocation]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSInvocation); - } - - static NSInvocation invocationWithMethodSignature_(NSMethodSignature sig) { - final _ret = _objc_msgSend_414( - _class_NSInvocation, _sel_invocationWithMethodSignature_, sig.pointer); - return NSInvocation._(_ret, retain: true, release: true); - } - - NSMethodSignature get methodSignature { - final _ret = _objc_msgSend_415(this.pointer, _sel_methodSignature); - return NSMethodSignature._(_ret, retain: true, release: true); - } - - void retainArguments() { - _objc_msgSend_1(this.pointer, _sel_retainArguments); - } - - bool get argumentsRetained { - return _objc_msgSend_12(this.pointer, _sel_argumentsRetained); - } - - NSObject? get target { - final _ret = _objc_msgSend_17(this.pointer, _sel_target); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set target(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setTarget_, value?.pointer ?? ffi.nullptr); - } - - ffi.Pointer get selector { - return _objc_msgSend_417(this.pointer, _sel_selector); - } - - set selector(ffi.Pointer value) { - return _objc_msgSend_418(this.pointer, _sel_setSelector_, value); - } - - void getReturnValue_(ffi.Pointer retLoc) { - _objc_msgSend_52(this.pointer, _sel_getReturnValue_, retLoc); - } - - void setReturnValue_(ffi.Pointer retLoc) { - _objc_msgSend_52(this.pointer, _sel_setReturnValue_, retLoc); - } - - void getArgument_atIndex_(ffi.Pointer argumentLocation, int idx) { - _objc_msgSend_419( - this.pointer, _sel_getArgument_atIndex_, argumentLocation, idx); - } - - void setArgument_atIndex_(ffi.Pointer argumentLocation, int idx) { - _objc_msgSend_419( - this.pointer, _sel_setArgument_atIndex_, argumentLocation, idx); - } - - void invoke() { - _objc_msgSend_1(this.pointer, _sel_invoke); - } - - void invokeWithTarget_(NSObject target) { - _objc_msgSend_15(this.pointer, _sel_invokeWithTarget_, target.pointer); - } - - void invokeUsingIMP_( - ffi.Pointer> imp) { - _objc_msgSend_420(this.pointer, _sel_invokeUsingIMP_, imp); - } - - @override - NSInvocation init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSInvocation._(_ret, retain: true, release: true); - } - - static NSInvocation new1() { - final _ret = _objc_msgSend_2(_class_NSInvocation, _sel_new); - return NSInvocation._(_ret, retain: false, release: true); - } - - static NSInvocation allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSInvocation, _sel_allocWithZone_, zone); - return NSInvocation._(_ret, retain: false, release: true); - } - - static NSInvocation alloc() { - final _ret = _objc_msgSend_2(_class_NSInvocation, _sel_alloc); - return NSInvocation._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSInvocation, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSInvocation, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSInvocation, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSInvocation, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSInvocation, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSInvocation, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSInvocation, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSInvocation, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSInvocation, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSInvocation = objc.getClass("NSInvocation"); - -class NSMethodSignature extends NSObject { - NSMethodSignature._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMethodSignature] that points to the same underlying object as [other]. - static NSMethodSignature castFrom(T other) { - return NSMethodSignature._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSMethodSignature] that wraps the given raw object pointer. - static NSMethodSignature castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMethodSignature._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMethodSignature]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMethodSignature); - } - - static NSMethodSignature? signatureWithObjCTypes_( - ffi.Pointer types) { - final _ret = _objc_msgSend_9( - _class_NSMethodSignature, _sel_signatureWithObjCTypes_, types); - return _ret.address == 0 - ? null - : NSMethodSignature._(_ret, retain: true, release: true); - } - - int get numberOfArguments { - return _objc_msgSend_10(this.pointer, _sel_numberOfArguments); - } - - ffi.Pointer getArgumentTypeAtIndex_(int idx) { - return _objc_msgSend_11(this.pointer, _sel_getArgumentTypeAtIndex_, idx); - } - - int get frameLength { - return _objc_msgSend_10(this.pointer, _sel_frameLength); - } - - bool isOneway() { - return _objc_msgSend_12(this.pointer, _sel_isOneway); - } - - ffi.Pointer get methodReturnType { - return _objc_msgSend_13(this.pointer, _sel_methodReturnType); - } - - int get methodReturnLength { - return _objc_msgSend_10(this.pointer, _sel_methodReturnLength); - } - - @override - NSMethodSignature init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMethodSignature._(_ret, retain: true, release: true); - } - - static NSMethodSignature new1() { - final _ret = _objc_msgSend_2(_class_NSMethodSignature, _sel_new); - return NSMethodSignature._(_ret, retain: false, release: true); - } - - static NSMethodSignature allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMethodSignature, _sel_allocWithZone_, zone); - return NSMethodSignature._(_ret, retain: false, release: true); - } - - static NSMethodSignature alloc() { - final _ret = _objc_msgSend_2(_class_NSMethodSignature, _sel_alloc); - return NSMethodSignature._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMethodSignature, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMethodSignature, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMethodSignature, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMethodSignature, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMethodSignature, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMethodSignature, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMethodSignature, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMethodSignature, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSMethodSignature, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSMethodSignature = objc.getClass("NSMethodSignature"); -late final _sel_signatureWithObjCTypes_ = - objc.registerName("signatureWithObjCTypes:"); + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_loadAndReturnError_ = objc.registerName("loadAndReturnError:"); +late final _sel_bundleURL = objc.registerName("bundleURL"); final _objc_msgSend_9 = 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)>(); -late final _sel_numberOfArguments = objc.registerName("numberOfArguments"); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_resourceURL = objc.registerName("resourceURL"); final _objc_msgSend_10 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_getArgumentTypeAtIndex_ = - objc.registerName("getArgumentTypeAtIndex:"); +late final _sel_executableURL = objc.registerName("executableURL"); +late final _sel_URLForAuxiliaryExecutable_ = + objc.registerName("URLForAuxiliaryExecutable:"); final _objc_msgSend_11 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_frameLength = objc.registerName("frameLength"); -late final _sel_isOneway = objc.registerName("isOneway"); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_privateFrameworksURL = + objc.registerName("privateFrameworksURL"); +late final _sel_sharedFrameworksURL = objc.registerName("sharedFrameworksURL"); +late final _sel_sharedSupportURL = objc.registerName("sharedSupportURL"); +late final _sel_builtInPlugInsURL = objc.registerName("builtInPlugInsURL"); +late final _sel_appStoreReceiptURL = objc.registerName("appStoreReceiptURL"); +late final _sel_bundlePath = objc.registerName("bundlePath"); final _objc_msgSend_12 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_methodReturnType = objc.registerName("methodReturnType"); +late final _sel_resourcePath = objc.registerName("resourcePath"); final _objc_msgSend_13 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_methodReturnLength = objc.registerName("methodReturnLength"); -late final _sel_cancelPreviousPerformRequestsWithTarget_selector_object_ = objc - .registerName("cancelPreviousPerformRequestsWithTarget:selector:object:"); +late final _sel_executablePath = objc.registerName("executablePath"); +late final _sel_pathForAuxiliaryExecutable_ = + objc.registerName("pathForAuxiliaryExecutable:"); final _objc_msgSend_14 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_privateFrameworksPath = + objc.registerName("privateFrameworksPath"); +late final _sel_sharedFrameworksPath = + objc.registerName("sharedFrameworksPath"); +late final _sel_sharedSupportPath = objc.registerName("sharedSupportPath"); +late final _sel_builtInPlugInsPath = objc.registerName("builtInPlugInsPath"); +late final _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_ = + objc.registerName( + "URLForResource:withExtension:subdirectory:inBundleWithURL:"); +final _objc_msgSend_15 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( + 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_16 = 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_cancelPreviousPerformRequestsWithTarget_ = - objc.registerName("cancelPreviousPerformRequestsWithTarget:"); -final _objc_msgSend_15 = objc.msgSendPointer +late final _sel_URLForResource_withExtension_ = + objc.registerName("URLForResource:withExtension:"); +final _objc_msgSend_17 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_accessInstanceVariablesDirectly = - objc.registerName("accessInstanceVariablesDirectly"); -late final _sel_useStoredAccessor = objc.registerName("useStoredAccessor"); + 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_18 = 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_19 = 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_20 = 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_21 = 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_22 = 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_23 = 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_24 = 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_25 = 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_26 = 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_27 = 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)>(); -class NSSet extends NSObject { - NSSet._(ffi.Pointer pointer, +class NSAttributedString extends objc.NSObject { + NSAttributedString._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSSet] that points to the same underlying object as [other]. - static NSSet castFrom(T other) { - return NSSet._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSAttributedString] that points to the same underlying object as [other]. + NSAttributedString.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSSet] that wraps the given raw object pointer. - static NSSet castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSSet._(other, retain: retain, release: release); - } + /// 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 [NSSet]. + /// Returns whether [obj] is an instance of [NSAttributedString]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSSet); - } - - int get count { - return _objc_msgSend_10(this.pointer, _sel_count); - } - - NSObject? member_(NSObject object) { - final _ret = _objc_msgSend_16(this.pointer, _sel_member_, object.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSAttributedString); } - NSEnumerator objectEnumerator() { - final _ret = _objc_msgSend_77(this.pointer, _sel_objectEnumerator); - return NSEnumerator._(_ret, retain: true, release: true); + objc.NSString get string { + final _ret = _objc_msgSend_12(this.pointer, _sel_string); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSSet init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSSet._(_ret, retain: true, release: true); + objc.NSDictionary attributesAtIndex_effectiveRange_( + int location, ffi.Pointer<_NSRange> range) { + final _ret = _objc_msgSend_28( + this.pointer, _sel_attributesAtIndex_effectiveRange_, location, range); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - this.pointer, _sel_initWithObjects_count_, objects, cnt); - return NSSet._(_ret, retain: true, release: true); + int get length { + return _objc_msgSend_29(this.pointer, _sel_length); } - NSSet? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); + objc.NSObject? attribute_atIndex_effectiveRange_( + objc.NSString attrName, int location, ffi.Pointer<_NSRange> range) { + final _ret = _objc_msgSend_30( + this.pointer, + _sel_attribute_atIndex_effectiveRange_, + attrName.pointer, + location, + range); return _ret.address == 0 ? null - : NSSet._(_ret, retain: true, release: true); - } - - NSArray get allObjects { - final _ret = _objc_msgSend_85(this.pointer, _sel_allObjects); - return NSArray._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSObject? anyObject() { - final _ret = _objc_msgSend_17(this.pointer, _sel_anyObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + NSAttributedString attributedSubstringFromRange_(_NSRange range) { + final _ret = _objc_msgSend_31( + this.pointer, _sel_attributedSubstringFromRange_, range); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - bool containsObject_(NSObject anObject) { - return _objc_msgSend_0( - this.pointer, _sel_containsObject_, anObject.pointer); - } - - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _objc_msgSend_70(this.pointer, _sel_descriptionWithLocale_, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } - - bool intersectsSet_(NSSet otherSet) { - return _objc_msgSend_403( - this.pointer, _sel_intersectsSet_, otherSet.pointer); - } - - bool isEqualToSet_(NSSet otherSet) { - return _objc_msgSend_403( - this.pointer, _sel_isEqualToSet_, otherSet.pointer); - } - - bool isSubsetOfSet_(NSSet otherSet) { - return _objc_msgSend_403( - this.pointer, _sel_isSubsetOfSet_, otherSet.pointer); - } - - void makeObjectsPerformSelector_(ffi.Pointer aSelector) { - _objc_msgSend_7(this.pointer, _sel_makeObjectsPerformSelector_, aSelector); - } - - void makeObjectsPerformSelector_withObject_( - ffi.Pointer aSelector, NSObject? argument) { - _objc_msgSend_90(this.pointer, _sel_makeObjectsPerformSelector_withObject_, - aSelector, argument?.pointer ?? ffi.nullptr); - } - - NSSet setByAddingObject_(NSObject anObject) { - final _ret = _objc_msgSend_404( - this.pointer, _sel_setByAddingObject_, anObject.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - NSSet setByAddingObjectsFromSet_(NSSet other) { - final _ret = _objc_msgSend_405( - this.pointer, _sel_setByAddingObjectsFromSet_, other.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - NSSet setByAddingObjectsFromArray_(NSArray other) { - final _ret = _objc_msgSend_406( - this.pointer, _sel_setByAddingObjectsFromArray_, other.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - void enumerateObjectsUsingBlock_( - ObjCBlock_ffiVoid_objcObjCObject_bool block) { - _objc_msgSend_407( - this.pointer, _sel_enumerateObjectsUsingBlock_, block.pointer); + objc.NSDictionary attributesAtIndex_longestEffectiveRange_inRange_( + int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { + final _ret = _objc_msgSend_32( + this.pointer, + _sel_attributesAtIndex_longestEffectiveRange_inRange_, + location, + range, + rangeLimit); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - void enumerateObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_objcObjCObject_bool block) { - _objc_msgSend_408(this.pointer, - _sel_enumerateObjectsWithOptions_usingBlock_, opts, block.pointer); + objc.NSObject? attribute_atIndex_longestEffectiveRange_inRange_( + objc.NSString attrName, + int location, + ffi.Pointer<_NSRange> range, + _NSRange rangeLimit) { + final _ret = _objc_msgSend_33( + this.pointer, + _sel_attribute_atIndex_longestEffectiveRange_inRange_, + attrName.pointer, + location, + range, + rangeLimit); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSSet objectsPassingTest_(ObjCBlock_bool_objcObjCObject_bool predicate) { - final _ret = _objc_msgSend_409( - this.pointer, _sel_objectsPassingTest_, predicate.pointer); - return NSSet._(_ret, retain: true, release: true); + bool isEqualToAttributedString_(NSAttributedString other) { + return _objc_msgSend_34( + this.pointer, _sel_isEqualToAttributedString_, other.pointer); } - NSSet objectsWithOptions_passingTest_( - int opts, ObjCBlock_bool_objcObjCObject_bool predicate) { - final _ret = _objc_msgSend_410(this.pointer, - _sel_objectsWithOptions_passingTest_, opts, predicate.pointer); - return NSSet._(_ret, retain: true, release: true); + NSAttributedString initWithString_(objc.NSString str) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithString_, str.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSSet set1() { - final _ret = _objc_msgSend_2(_class_NSSet, _sel_set); - return NSSet._(_ret, retain: true, release: true); + NSAttributedString initWithString_attributes_( + objc.NSString str, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_36(this.pointer, _sel_initWithString_attributes_, + str.pointer, attrs?.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSSet setWithObject_(NSObject object) { - final _ret = - _objc_msgSend_124(_class_NSSet, _sel_setWithObject_, object.pointer); - return NSSet._(_ret, retain: true, release: true); + NSAttributedString initWithAttributedString_(NSAttributedString attrStr) { + final _ret = _objc_msgSend_37( + this.pointer, _sel_initWithAttributedString_, attrStr.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSSet setWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - _class_NSSet, _sel_setWithObjects_count_, objects, cnt); - return NSSet._(_ret, retain: true, release: true); + void enumerateAttributesInRange_options_usingBlock_(_NSRange enumerationRange, + int opts, ObjCBlock_ffiVoid_NSDictionary_NSRange_bool block) { + _objc_msgSend_38( + this.pointer, + _sel_enumerateAttributesInRange_options_usingBlock_, + enumerationRange, + opts, + block.pointer); } - static NSSet setWithObjects_(NSObject firstObj) { - final _ret = - _objc_msgSend_124(_class_NSSet, _sel_setWithObjects_, firstObj.pointer); - return NSSet._(_ret, retain: true, release: true); + void enumerateAttribute_inRange_options_usingBlock_( + objc.NSString attrName, + _NSRange enumerationRange, + int opts, + ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool block) { + _objc_msgSend_39( + this.pointer, + _sel_enumerateAttribute_inRange_options_usingBlock_, + attrName.pointer, + enumerationRange, + opts, + block.pointer); } - static NSSet setWithSet_(NSSet set) { - final _ret = _objc_msgSend_411(_class_NSSet, _sel_setWithSet_, set.pointer); - return NSSet._(_ret, retain: true, release: true); + NSAttributedString? + initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( + objc.NSURL markdownFile, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_53( + this.pointer, + _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, + markdownFile.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - static NSSet setWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(_class_NSSet, _sel_setWithArray_, array.pointer); - return NSSet._(_ret, retain: true, release: true); + NSAttributedString? initWithMarkdown_options_baseURL_error_( + objc.NSData markdown, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_54( + this.pointer, + _sel_initWithMarkdown_options_baseURL_error_, + markdown.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - NSSet initWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjects_, firstObj.pointer); - return NSSet._(_ret, retain: true, release: true); + NSAttributedString? initWithMarkdownString_options_baseURL_error_( + objc.NSString markdownString, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_55( + this.pointer, + _sel_initWithMarkdownString_options_baseURL_error_, + markdownString.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - NSSet initWithSet_(NSSet set) { - final _ret = - _objc_msgSend_411(this.pointer, _sel_initWithSet_, set.pointer); - return NSSet._(_ret, retain: true, release: true); + NSAttributedString initWithFormat_options_locale_( + NSAttributedString format, int options, objc.NSLocale? locale) { + final _ret = _objc_msgSend_56( + this.pointer, + _sel_initWithFormat_options_locale_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _objc_msgSend_412( - this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); - return NSSet._(_ret, retain: false, release: true); + NSAttributedString initWithFormat_options_locale_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_57( + this.pointer, + _sel_initWithFormat_options_locale_arguments_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + arguments); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSSet initWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(this.pointer, _sel_initWithArray_, array.pointer); - return NSSet._(_ret, retain: true, release: true); + static NSAttributedString localizedAttributedStringWithFormat_( + NSAttributedString format) { + final _ret = _objc_msgSend_37(_class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_, format.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSObject valueForKey_(NSString key) { - final _ret = _objc_msgSend_31(this.pointer, _sel_valueForKey_, key.pointer); - return NSObject._(_ret, retain: true, release: true); + static NSAttributedString localizedAttributedStringWithFormat_options_( + NSAttributedString format, int options) { + final _ret = _objc_msgSend_58( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_options_, + format.pointer, + options); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - @override - void setValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); + NSAttributedString initWithFormat_options_locale_context_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context) { + final _ret = _objc_msgSend_59( + this.pointer, + _sel_initWithFormat_options_locale_context_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + context.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - @override - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _objc_msgSend_139( + NSAttributedString initWithFormat_options_locale_context_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_60( this.pointer, - _sel_addObserver_forKeyPath_options_context_, - observer.pointer, - keyPath.pointer, + _sel_initWithFormat_options_locale_context_arguments_, + format.pointer, options, - context); + locale?.pointer ?? ffi.nullptr, + context.pointer, + arguments); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - @override - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _objc_msgSend_140(this.pointer, _sel_removeObserver_forKeyPath_context_, - observer.pointer, keyPath.pointer, context); + static NSAttributedString localizedAttributedStringWithFormat_context_( + NSAttributedString format, objc.NSDictionary context) { + final _ret = _objc_msgSend_61( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_context_, + format.pointer, + context.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - @override - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _objc_msgSend_141(this.pointer, _sel_removeObserver_forKeyPath_, - observer.pointer, keyPath.pointer); + static NSAttributedString + localizedAttributedStringWithFormat_options_context_( + NSAttributedString format, int options, objc.NSDictionary context) { + final _ret = _objc_msgSend_62( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_options_context_, + format.pointer, + options, + context.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSArray sortedArrayUsingDescriptors_(NSArray sortDescriptors) { - final _ret = _objc_msgSend_68(this.pointer, - _sel_sortedArrayUsingDescriptors_, sortDescriptors.pointer); - return NSArray._(_ret, retain: true, release: true); + NSAttributedString attributedStringByInflectingString() { + final _ret = + _objc_msgSend_63(this.pointer, _sel_attributedStringByInflectingString); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSSet filteredSetUsingPredicate_(NSPredicate predicate) { - final _ret = _objc_msgSend_413( - this.pointer, _sel_filteredSetUsingPredicate_, predicate.pointer); - return NSSet._(_ret, retain: true, release: true); + @override + NSAttributedString init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSSet new1() { - final _ret = _objc_msgSend_2(_class_NSSet, _sel_new); - return NSSet._(_ret, retain: false, release: true); + static NSAttributedString new1() { + final _ret = _objc_msgSend_40(_class_NSAttributedString, _sel_new); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } - static NSSet allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSSet, _sel_allocWithZone_, zone); - return NSSet._(_ret, retain: false, release: true); + static NSAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSAttributedString, _sel_allocWithZone_, zone); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } - static NSSet alloc() { - final _ret = _objc_msgSend_2(_class_NSSet, _sel_alloc); - return NSSet._(_ret, retain: false, release: true); + static NSAttributedString alloc() { + final _ret = _objc_msgSend_40(_class_NSAttributedString, _sel_alloc); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSSet, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSAttributedString, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSSet, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSAttributedString, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12(_class_NSSet, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSAttributedString, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSSet, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSAttributedString, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63( - _class_NSSet, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSAttributedString, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64( - _class_NSSet, _sel_automaticallyNotifiesObserversForKey_, key.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSAttributedString, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSSet, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSAttributedString, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSSet, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSAttributedString, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSSet, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSAttributedString, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSSet = objc.getClass("NSSet"); -late final _sel_count = objc.registerName("count"); -late final _sel_member_ = objc.registerName("member:"); -final _objc_msgSend_16 = objc.msgSendPointer +late final _class_NSAttributedString = objc.getClass("NSAttributedString"); +late final _sel_string = objc.registerName("string"); + +final class _NSRange extends ffi.Struct { + @ffi.UnsignedLong() + external int location; + + @ffi.UnsignedLong() + external int length; +} + +late final _sel_attributesAtIndex_effectiveRange_ = + objc.registerName("attributesAtIndex:effectiveRange:"); +final _objc_msgSend_28 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong, + ffi.Pointer<_NSRange>)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -class NSEnumerator extends NSObject { - NSEnumerator._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSEnumerator] that points to the same underlying object as [other]. - static NSEnumerator castFrom(T other) { - return NSEnumerator._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSEnumerator] that wraps the given raw object pointer. - static NSEnumerator castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSEnumerator._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSEnumerator]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSEnumerator); - } - - NSObject? nextObject() { - final _ret = _objc_msgSend_17(this.pointer, _sel_nextObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject get allObjects { - final _ret = _objc_msgSend_2(this.pointer, _sel_allObjects); - return NSObject._(_ret, retain: true, release: true); - } - - @override - NSEnumerator init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSEnumerator._(_ret, retain: true, release: true); - } - - static NSEnumerator new1() { - final _ret = _objc_msgSend_2(_class_NSEnumerator, _sel_new); - return NSEnumerator._(_ret, retain: false, release: true); - } - - static NSEnumerator allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSEnumerator, _sel_allocWithZone_, zone); - return NSEnumerator._(_ret, retain: false, release: true); - } - - static NSEnumerator alloc() { - final _ret = _objc_msgSend_2(_class_NSEnumerator, _sel_alloc); - return NSEnumerator._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSEnumerator, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSEnumerator, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSEnumerator, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSEnumerator, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSEnumerator, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSEnumerator, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSEnumerator, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSEnumerator, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSEnumerator, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSEnumerator = objc.getClass("NSEnumerator"); -late final _sel_nextObject = objc.registerName("nextObject"); -final _objc_msgSend_17 = objc.msgSendPointer + ffi.Pointer, int, ffi.Pointer<_NSRange>)>(); +late final _sel_length = objc.registerName("length"); +final _objc_msgSend_29 = 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_allObjects = objc.registerName("allObjects"); - -class NSString extends NSObject { - NSString._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSString] that points to the same underlying object as [other]. - static NSString castFrom(T other) { - return NSString._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSString] that wraps the given raw object pointer. - static NSString castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSString._(other, retain: retain, release: release); - } +late final _sel_attribute_atIndex_effectiveRange_ = + objc.registerName("attribute:atIndex:effectiveRange:"); +final _objc_msgSend_30 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_NSRange>)>(); +late final _sel_attributedSubstringFromRange_ = + objc.registerName("attributedSubstringFromRange:"); +final _objc_msgSend_31 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_attributesAtIndex_longestEffectiveRange_inRange_ = + objc.registerName("attributesAtIndex:longestEffectiveRange:inRange:"); +final _objc_msgSend_32 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>, + _NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_NSRange>, + _NSRange)>(); +late final _sel_attribute_atIndex_longestEffectiveRange_inRange_ = + objc.registerName("attribute:atIndex:longestEffectiveRange:inRange:"); +final _objc_msgSend_33 = 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_34 = 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_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_initWithString_attributes_ = + objc.registerName("initWithString:attributes:"); +final _objc_msgSend_36 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithAttributedString_ = + objc.registerName("initWithAttributedString:"); +final _objc_msgSend_37 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - /// Returns whether [obj] is an instance of [NSString]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSString); - } +abstract class NSAttributedStringEnumerationOptions { + static const int NSAttributedStringEnumerationReverse = 2; + static const int + NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = 1048576; +} - factory NSString(String str) { - final cstr = str.toNativeUtf16(); - final nsstr = stringWithCharacters_length_(cstr.cast(), str.length); - pkg_ffi.calloc.free(cstr); - return nsstr; - } +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); +final _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( + void Function( + ffi.Pointer, _NSRange, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @override - String toString() { - final data = - dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); - return data!.bytes.cast().toDartString(length: length); - } +void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); - int get length { - return _objc_msgSend_10(this.pointer, _sel_length); - } +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); - int characterAtIndex_(int index) { - return _objc_msgSend_18(this.pointer, _sel_characterAtIndex_, index); + /// 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); } - @override - NSString init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSString._(_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_NSDictionary_NSRange_bool.fromFunctionPointer( + ffi.Pointer< + ffi + .NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + _NSRange arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _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; - NSString? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString substringFromIndex_(int from) { - final _ret = - _objc_msgSend_332(this.pointer, _sel_substringFromIndex_, from); - return NSString._(_ret, retain: true, release: true); - } - - NSString substringToIndex_(int to) { - final _ret = _objc_msgSend_332(this.pointer, _sel_substringToIndex_, to); - return NSString._(_ret, retain: true, release: true); - } - - NSString substringWithRange_(_NSRange range) { - final _ret = - _objc_msgSend_333(this.pointer, _sel_substringWithRange_, range); - return NSString._(_ret, retain: true, release: true); - } - - void getCharacters_range_( - ffi.Pointer buffer, _NSRange range) { - _objc_msgSend_334(this.pointer, _sel_getCharacters_range_, buffer, range); - } - - int compare_(NSString string) { - return _objc_msgSend_335(this.pointer, _sel_compare_, string.pointer); - } - - int compare_options_(NSString string, int mask) { - return _objc_msgSend_336( - this.pointer, _sel_compare_options_, string.pointer, mask); - } - - int compare_options_range_( - NSString string, int mask, _NSRange rangeOfReceiverToCompare) { - return _objc_msgSend_337(this.pointer, _sel_compare_options_range_, - string.pointer, mask, rangeOfReceiverToCompare); - } - - int compare_options_range_locale_(NSString string, int mask, - _NSRange rangeOfReceiverToCompare, NSObject? locale) { - return _objc_msgSend_338( - this.pointer, - _sel_compare_options_range_locale_, - string.pointer, - mask, - rangeOfReceiverToCompare, - locale?.pointer ?? ffi.nullptr); - } - - int caseInsensitiveCompare_(NSString string) { - return _objc_msgSend_335( - this.pointer, _sel_caseInsensitiveCompare_, string.pointer); - } - - int localizedCompare_(NSString string) { - return _objc_msgSend_335( - this.pointer, _sel_localizedCompare_, string.pointer); - } - - int localizedCaseInsensitiveCompare_(NSString string) { - return _objc_msgSend_335( - this.pointer, _sel_localizedCaseInsensitiveCompare_, string.pointer); - } - - int localizedStandardCompare_(NSString string) { - return _objc_msgSend_335( - this.pointer, _sel_localizedStandardCompare_, string.pointer); - } - - bool isEqualToString_(NSString aString) { - return _objc_msgSend_64( - this.pointer, _sel_isEqualToString_, aString.pointer); - } - - bool hasPrefix_(NSString str) { - return _objc_msgSend_64(this.pointer, _sel_hasPrefix_, str.pointer); - } - - bool hasSuffix_(NSString str) { - return _objc_msgSend_64(this.pointer, _sel_hasSuffix_, str.pointer); - } - - NSString commonPrefixWithString_options_(NSString str, int mask) { - final _ret = _objc_msgSend_339( - this.pointer, _sel_commonPrefixWithString_options_, str.pointer, mask); - return NSString._(_ret, retain: true, release: true); - } - - bool containsString_(NSString str) { - return _objc_msgSend_64(this.pointer, _sel_containsString_, str.pointer); - } - - bool localizedCaseInsensitiveContainsString_(NSString str) { - return _objc_msgSend_64(this.pointer, - _sel_localizedCaseInsensitiveContainsString_, str.pointer); - } - - bool localizedStandardContainsString_(NSString str) { - return _objc_msgSend_64( - this.pointer, _sel_localizedStandardContainsString_, str.pointer); - } - - void localizedStandardRangeOfString_( - ffi.Pointer<_NSRange> stret, NSString str) { - objc.useMsgSendVariants - ? _objc_msgSend_340Stret(stret, this.pointer, - _sel_localizedStandardRangeOfString_, str.pointer) - : stret.ref = _objc_msgSend_340( - this.pointer, _sel_localizedStandardRangeOfString_, str.pointer); - } - - void rangeOfString_(ffi.Pointer<_NSRange> stret, NSString searchString) { - objc.useMsgSendVariants - ? _objc_msgSend_340Stret( - stret, this.pointer, _sel_rangeOfString_, searchString.pointer) - : stret.ref = _objc_msgSend_340( - this.pointer, _sel_rangeOfString_, searchString.pointer); - } - - void rangeOfString_options_( - ffi.Pointer<_NSRange> stret, NSString searchString, int mask) { - objc.useMsgSendVariants - ? _objc_msgSend_341Stret(stret, this.pointer, - _sel_rangeOfString_options_, searchString.pointer, mask) - : stret.ref = _objc_msgSend_341(this.pointer, - _sel_rangeOfString_options_, searchString.pointer, mask); - } - - void rangeOfString_options_range_(ffi.Pointer<_NSRange> stret, - NSString searchString, int mask, _NSRange rangeOfReceiverToSearch) { - objc.useMsgSendVariants - ? _objc_msgSend_342Stret( - stret, - this.pointer, - _sel_rangeOfString_options_range_, - searchString.pointer, - mask, - rangeOfReceiverToSearch) - : stret.ref = _objc_msgSend_342( - this.pointer, - _sel_rangeOfString_options_range_, - searchString.pointer, - mask, - rangeOfReceiverToSearch); - } - - void rangeOfString_options_range_locale_( - ffi.Pointer<_NSRange> stret, - NSString searchString, - int mask, - _NSRange rangeOfReceiverToSearch, - NSLocale? locale) { - objc.useMsgSendVariants - ? _objc_msgSend_343Stret( - stret, - this.pointer, - _sel_rangeOfString_options_range_locale_, - searchString.pointer, - mask, - rangeOfReceiverToSearch, - locale?.pointer ?? ffi.nullptr) - : stret.ref = _objc_msgSend_343( - this.pointer, - _sel_rangeOfString_options_range_locale_, - searchString.pointer, - mask, - rangeOfReceiverToSearch, - locale?.pointer ?? ffi.nullptr); - } - - void rangeOfCharacterFromSet_( - ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet) { - objc.useMsgSendVariants - ? _objc_msgSend_344Stret(stret, this.pointer, - _sel_rangeOfCharacterFromSet_, searchSet.pointer) - : stret.ref = _objc_msgSend_344( - this.pointer, _sel_rangeOfCharacterFromSet_, searchSet.pointer); - } - - void rangeOfCharacterFromSet_options_( - ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet, int mask) { - objc.useMsgSendVariants - ? _objc_msgSend_345Stret(stret, this.pointer, - _sel_rangeOfCharacterFromSet_options_, searchSet.pointer, mask) - : stret.ref = _objc_msgSend_345(this.pointer, - _sel_rangeOfCharacterFromSet_options_, searchSet.pointer, mask); - } - - void rangeOfCharacterFromSet_options_range_(ffi.Pointer<_NSRange> stret, - NSCharacterSet searchSet, int mask, _NSRange rangeOfReceiverToSearch) { - objc.useMsgSendVariants - ? _objc_msgSend_346Stret( - stret, - this.pointer, - _sel_rangeOfCharacterFromSet_options_range_, - searchSet.pointer, - mask, - rangeOfReceiverToSearch) - : stret.ref = _objc_msgSend_346( - this.pointer, - _sel_rangeOfCharacterFromSet_options_range_, - searchSet.pointer, - mask, - rangeOfReceiverToSearch); - } - - void rangeOfComposedCharacterSequenceAtIndex_( - ffi.Pointer<_NSRange> stret, int index) { - objc.useMsgSendVariants - ? _objc_msgSend_347Stret(stret, this.pointer, - _sel_rangeOfComposedCharacterSequenceAtIndex_, index) - : stret.ref = _objc_msgSend_347( - this.pointer, _sel_rangeOfComposedCharacterSequenceAtIndex_, index); - } - - void rangeOfComposedCharacterSequencesForRange_( - ffi.Pointer<_NSRange> stret, _NSRange range) { - objc.useMsgSendVariants - ? _objc_msgSend_348Stret(stret, this.pointer, - _sel_rangeOfComposedCharacterSequencesForRange_, range) - : stret.ref = _objc_msgSend_348(this.pointer, - _sel_rangeOfComposedCharacterSequencesForRange_, range); - } - - NSString stringByAppendingString_(NSString aString) { - final _ret = _objc_msgSend_69( - this.pointer, _sel_stringByAppendingString_, aString.pointer); - return NSString._(_ret, retain: true, release: true); - } - - NSString stringByAppendingFormat_(NSString format) { - final _ret = _objc_msgSend_69( - this.pointer, _sel_stringByAppendingFormat_, format.pointer); - return NSString._(_ret, retain: true, release: true); - } - - double get doubleValue { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_doubleValue) - : _objc_msgSend_165(this.pointer, _sel_doubleValue); - } - - double get floatValue { - return objc.useMsgSendVariants - ? _objc_msgSend_239Fpret(this.pointer, _sel_floatValue) - : _objc_msgSend_239(this.pointer, _sel_floatValue); - } - - int get intValue { - return _objc_msgSend_237(this.pointer, _sel_intValue); - } + /// 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.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(objc.NSDictionary.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; - int get integerValue { - return _objc_msgSend_83(this.pointer, _sel_integerValue); - } + /// 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._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(objc.NSDictionary.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>? _dartFuncListenerTrampoline; - int get longLongValue { - return _objc_msgSend_238(this.pointer, _sel_longLongValue); - } + 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); +} - bool get boolValue { - return _objc_msgSend_12(this.pointer, _sel_boolValue); - } +late final _sel_enumerateAttributesInRange_options_usingBlock_ = + objc.registerName("enumerateAttributesInRange:options:usingBlock:"); +final _objc_msgSend_38 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + 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); +final _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( + void Function( + ffi.Pointer, _NSRange, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - NSString get uppercaseString { - final _ret = _objc_msgSend_21(this.pointer, _sel_uppercaseString); - return NSString._(_ret, retain: true, release: true); - } +void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); - NSString get lowercaseString { - final _ret = _objc_msgSend_21(this.pointer, _sel_lowercaseString); - return NSString._(_ret, retain: true, release: true); - } +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); - NSString get capitalizedString { - final _ret = _objc_msgSend_21(this.pointer, _sel_capitalizedString); - return NSString._(_ret, retain: true, release: true); + /// 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); } - NSString get localizedUppercaseString { - final _ret = _objc_msgSend_21(this.pointer, _sel_localizedUppercaseString); - return NSString._(_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_objcObjCObject_NSRange_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + _NSRange arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _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; - NSString get localizedLowercaseString { - final _ret = _objc_msgSend_21(this.pointer, _sel_localizedLowercaseString); - return NSString._(_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. + ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool.fromFunction( + void Function(objc.NSObject?, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; - NSString get localizedCapitalizedString { - final _ret = - _objc_msgSend_21(this.pointer, _sel_localizedCapitalizedString); - return NSString._(_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_objcObjCObject_NSRange_bool.listener( + void Function(objc.NSObject?, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>? _dartFuncListenerTrampoline; - NSString uppercaseStringWithLocale_(NSLocale? locale) { - final _ret = _objc_msgSend_349(this.pointer, - _sel_uppercaseStringWithLocale_, locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } + void call(objc.NSObject? 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); +} - NSString lowercaseStringWithLocale_(NSLocale? locale) { - final _ret = _objc_msgSend_349(this.pointer, - _sel_lowercaseStringWithLocale_, locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } +late final _sel_enumerateAttribute_inRange_options_usingBlock_ = + objc.registerName("enumerateAttribute:inRange:options:usingBlock:"); +final _objc_msgSend_39 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); - NSString capitalizedStringWithLocale_(NSLocale? locale) { - final _ret = _objc_msgSend_349(this.pointer, - _sel_capitalizedStringWithLocale_, locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } +class NSAttributedStringMarkdownParsingOptions extends objc.NSObject { + NSAttributedStringMarkdownParsingOptions._( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - void getLineStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer lineEndPtr, - ffi.Pointer contentsEndPtr, - _NSRange range) { - _objc_msgSend_350(this.pointer, _sel_getLineStart_end_contentsEnd_forRange_, - startPtr, lineEndPtr, contentsEndPtr, range); - } + /// Constructs a [NSAttributedStringMarkdownParsingOptions] that points to the same underlying object as [other]. + NSAttributedStringMarkdownParsingOptions.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - void lineRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { - objc.useMsgSendVariants - ? _objc_msgSend_348Stret( - stret, this.pointer, _sel_lineRangeForRange_, range) - : stret.ref = - _objc_msgSend_348(this.pointer, _sel_lineRangeForRange_, range); - } + /// 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); - void getParagraphStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer parEndPtr, - ffi.Pointer contentsEndPtr, - _NSRange range) { - _objc_msgSend_350( - this.pointer, - _sel_getParagraphStart_end_contentsEnd_forRange_, - startPtr, - parEndPtr, - contentsEndPtr, - range); + /// Returns whether [obj] is an instance of [NSAttributedStringMarkdownParsingOptions]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, + _class_NSAttributedStringMarkdownParsingOptions); } - void paragraphRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { - objc.useMsgSendVariants - ? _objc_msgSend_348Stret( - stret, this.pointer, _sel_paragraphRangeForRange_, range) - : stret.ref = _objc_msgSend_348( - this.pointer, _sel_paragraphRangeForRange_, range); + @override + NSAttributedStringMarkdownParsingOptions init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: true, release: true); } - void enumerateSubstringsInRange_options_usingBlock_(_NSRange range, int opts, - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool block) { - _objc_msgSend_351( - this.pointer, - _sel_enumerateSubstringsInRange_options_usingBlock_, - range, - opts, - block.pointer); + bool get allowsExtendedAttributes { + return _objc_msgSend_7(this.pointer, _sel_allowsExtendedAttributes); } - void enumerateLinesUsingBlock_(ObjCBlock_ffiVoid_NSString_bool block) { - _objc_msgSend_352( - this.pointer, _sel_enumerateLinesUsingBlock_, block.pointer); + set allowsExtendedAttributes(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsExtendedAttributes_, value); } - ffi.Pointer get UTF8String { - return _objc_msgSend_13(this.pointer, _sel_UTF8String); + int get interpretedSyntax { + return _objc_msgSend_42(this.pointer, _sel_interpretedSyntax); } - int get fastestEncoding { - return _objc_msgSend_10(this.pointer, _sel_fastestEncoding); + set interpretedSyntax(int value) { + return _objc_msgSend_43(this.pointer, _sel_setInterpretedSyntax_, value); } - int get smallestEncoding { - return _objc_msgSend_10(this.pointer, _sel_smallestEncoding); + int get failurePolicy { + return _objc_msgSend_44(this.pointer, _sel_failurePolicy); } - NSData? dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { - final _ret = _objc_msgSend_353(this.pointer, - _sel_dataUsingEncoding_allowLossyConversion_, encoding, lossy); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); + set failurePolicy(int value) { + return _objc_msgSend_45(this.pointer, _sel_setFailurePolicy_, value); } - NSData? dataUsingEncoding_(int encoding) { - final _ret = - _objc_msgSend_354(this.pointer, _sel_dataUsingEncoding_, encoding); + objc.NSString? get languageCode { + final _ret = _objc_msgSend_13(this.pointer, _sel_languageCode); return _ret.address == 0 ? null - : NSData._(_ret, retain: true, release: true); - } - - bool canBeConvertedToEncoding_(int encoding) { - return _objc_msgSend_97( - this.pointer, _sel_canBeConvertedToEncoding_, encoding); - } - - ffi.Pointer cStringUsingEncoding_(int encoding) { - return _objc_msgSend_11(this.pointer, _sel_cStringUsingEncoding_, encoding); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool getCString_maxLength_encoding_( - ffi.Pointer buffer, int maxBufferCount, int encoding) { - return _objc_msgSend_355(this.pointer, _sel_getCString_maxLength_encoding_, - buffer, maxBufferCount, encoding); + set languageCode(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setLanguageCode_, value?.pointer ?? ffi.nullptr); } - bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( - ffi.Pointer buffer, - int maxBufferCount, - ffi.Pointer usedBufferCount, - int encoding, - int options, - _NSRange range, - ffi.Pointer<_NSRange> leftover) { - return _objc_msgSend_356( - this.pointer, - _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_, - buffer, - maxBufferCount, - usedBufferCount, - encoding, - options, - range, - leftover); + bool get appliesSourcePositionAttributes { + return _objc_msgSend_7(this.pointer, _sel_appliesSourcePositionAttributes); } - int maximumLengthOfBytesUsingEncoding_(int enc) { - return _objc_msgSend_94( - this.pointer, _sel_maximumLengthOfBytesUsingEncoding_, enc); + set appliesSourcePositionAttributes(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAppliesSourcePositionAttributes_, value); } - int lengthOfBytesUsingEncoding_(int enc) { - return _objc_msgSend_94( - this.pointer, _sel_lengthOfBytesUsingEncoding_, enc); + static NSAttributedStringMarkdownParsingOptions new1() { + final _ret = _objc_msgSend_40( + _class_NSAttributedStringMarkdownParsingOptions, _sel_new); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } - static ffi.Pointer getAvailableStringEncodings() { - return _objc_msgSend_357(_class_NSString, _sel_availableStringEncodings); + static NSAttributedStringMarkdownParsingOptions allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_allocWithZone_, + zone); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } - static NSString localizedNameOfStringEncoding_(int encoding) { - final _ret = _objc_msgSend_332( - _class_NSString, _sel_localizedNameOfStringEncoding_, encoding); - return NSString._(_ret, retain: true, release: true); + static NSAttributedStringMarkdownParsingOptions alloc() { + final _ret = _objc_msgSend_40( + _class_NSAttributedStringMarkdownParsingOptions, _sel_alloc); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } - static int getDefaultCStringEncoding() { - return _objc_msgSend_10(_class_NSString, _sel_defaultCStringEncoding); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSString get decomposedStringWithCanonicalMapping { - final _ret = _objc_msgSend_21( - this.pointer, _sel_decomposedStringWithCanonicalMapping); - return NSString._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSAttributedStringMarkdownParsingOptions, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSString get precomposedStringWithCanonicalMapping { - final _ret = _objc_msgSend_21( - this.pointer, _sel_precomposedStringWithCanonicalMapping); - return NSString._(_ret, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSAttributedStringMarkdownParsingOptions, + _sel_accessInstanceVariablesDirectly); } - NSString get decomposedStringWithCompatibilityMapping { - final _ret = _objc_msgSend_21( - this.pointer, _sel_decomposedStringWithCompatibilityMapping); - return NSString._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSAttributedStringMarkdownParsingOptions, + _sel_useStoredAccessor); } - NSString get precomposedStringWithCompatibilityMapping { - final _ret = _objc_msgSend_21( - this.pointer, _sel_precomposedStringWithCompatibilityMapping); - return NSString._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_keyPathsForValuesAffectingValueForKey_, + key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSArray componentsSeparatedByString_(NSString separator) { - final _ret = _objc_msgSend_358( - this.pointer, _sel_componentsSeparatedByString_, separator.pointer); - return NSArray._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSAttributedStringMarkdownParsingOptions, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet separator) { - final _ret = _objc_msgSend_359(this.pointer, - _sel_componentsSeparatedByCharactersInSet_, separator.pointer); - return NSArray._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSString stringByTrimmingCharactersInSet_(NSCharacterSet set) { - final _ret = _objc_msgSend_360( - this.pointer, _sel_stringByTrimmingCharactersInSet_, set.pointer); - return NSString._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString stringByPaddingToLength_withString_startingAtIndex_( - int newLength, NSString padString, int padIndex) { - final _ret = _objc_msgSend_361( - this.pointer, - _sel_stringByPaddingToLength_withString_startingAtIndex_, - newLength, - padString.pointer, - padIndex); - return NSString._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { - final _ret = _objc_msgSend_362( - this.pointer, - _sel_stringByFoldingWithOptions_locale_, - options, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } +late final _class_NSAttributedStringMarkdownParsingOptions = + objc.getClass("NSAttributedStringMarkdownParsingOptions"); +late final _sel_init = objc.registerName("init"); +final _objc_msgSend_40 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allowsExtendedAttributes = + objc.registerName("allowsExtendedAttributes"); +late final _sel_setAllowsExtendedAttributes_ = + objc.registerName("setAllowsExtendedAttributes:"); +final _objc_msgSend_41 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, bool)>(); - NSString stringByReplacingOccurrencesOfString_withString_options_range_( - NSString target, - NSString replacement, - int options, - _NSRange searchRange) { - final _ret = _objc_msgSend_363( - this.pointer, - _sel_stringByReplacingOccurrencesOfString_withString_options_range_, - target.pointer, - replacement.pointer, - options, - searchRange); - return NSString._(_ret, retain: true, release: true); - } +abstract class NSAttributedStringMarkdownInterpretedSyntax { + static const int NSAttributedStringMarkdownInterpretedSyntaxFull = 0; + static const int NSAttributedStringMarkdownInterpretedSyntaxInlineOnly = 1; + static const int + NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace = + 2; +} - NSString stringByReplacingOccurrencesOfString_withString_( - NSString target, NSString replacement) { - final _ret = _objc_msgSend_364( - this.pointer, - _sel_stringByReplacingOccurrencesOfString_withString_, - target.pointer, - replacement.pointer); - return NSString._(_ret, retain: true, release: true); - } +late final _sel_interpretedSyntax = objc.registerName("interpretedSyntax"); +final _objc_msgSend_42 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setInterpretedSyntax_ = + objc.registerName("setInterpretedSyntax:"); +final _objc_msgSend_43 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - NSString stringByReplacingCharactersInRange_withString_( - _NSRange range, NSString replacement) { - final _ret = _objc_msgSend_365( - this.pointer, - _sel_stringByReplacingCharactersInRange_withString_, - range, - replacement.pointer); - return NSString._(_ret, retain: true, release: true); - } +abstract class NSAttributedStringMarkdownParsingFailurePolicy { + static const int NSAttributedStringMarkdownParsingFailureReturnError = 0; + static const int + NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible = + 1; +} - NSString? stringByApplyingTransform_reverse_( - NSString transform, bool reverse) { - final _ret = _objc_msgSend_366(this.pointer, - _sel_stringByApplyingTransform_reverse_, transform.pointer, reverse); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - bool writeToURL_atomically_encoding_error_(NSURL url, bool useAuxiliaryFile, - int enc, ffi.Pointer> error) { - return _objc_msgSend_367( - this.pointer, - _sel_writeToURL_atomically_encoding_error_, - url.pointer, - useAuxiliaryFile, - enc, - error); - } - - bool writeToFile_atomically_encoding_error_( - NSString path, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error) { - return _objc_msgSend_368( - this.pointer, - _sel_writeToFile_atomically_encoding_error_, - path.pointer, - useAuxiliaryFile, - enc, - error); - } - - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - int get hash { - return _objc_msgSend_10(this.pointer, _sel_hash); - } - - NSString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, int length, bool freeBuffer) { - final _ret = _objc_msgSend_369( - this.pointer, - _sel_initWithCharactersNoCopy_length_freeWhenDone_, - characters, - length, - freeBuffer); - return NSString._(_ret, retain: false, release: true); - } - - NSString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, - int len, - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong? deallocator) { - final _ret = _objc_msgSend_370( - this.pointer, - _sel_initWithCharactersNoCopy_length_deallocator_, - chars, - len, - deallocator?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: false, release: true); - } - - NSString initWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _objc_msgSend_371( - this.pointer, _sel_initWithCharacters_length_, characters, length); - return NSString._(_ret, retain: true, release: true); - } - - NSString? initWithUTF8String_(ffi.Pointer nullTerminatedCString) { - final _ret = _objc_msgSend_372( - this.pointer, _sel_initWithUTF8String_, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString initWithString_(NSString aString) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithString_, aString.pointer); - return NSString._(_ret, retain: true, release: true); - } - - NSString initWithFormat_(NSString format) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithFormat_, format.pointer); - return NSString._(_ret, retain: true, release: true); - } - - NSString initWithFormat_arguments_( - NSString format, ffi.Pointer<__va_list_tag> argList) { - final _ret = _objc_msgSend_373( - this.pointer, _sel_initWithFormat_arguments_, format.pointer, argList); - return NSString._(_ret, retain: true, release: true); - } - - NSString initWithFormat_locale_(NSString format, NSObject? locale) { - final _ret = _objc_msgSend_374(this.pointer, _sel_initWithFormat_locale_, - format.pointer, locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } - - NSString initWithFormat_locale_arguments_( - NSString format, NSObject? locale, ffi.Pointer<__va_list_tag> argList) { - final _ret = _objc_msgSend_375( - this.pointer, - _sel_initWithFormat_locale_arguments_, - format.pointer, - locale?.pointer ?? ffi.nullptr, - argList); - return NSString._(_ret, retain: true, release: true); - } - - NSString? initWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _objc_msgSend_376( - this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_error_, - format.pointer, - validFormatSpecifiers.pointer, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer> error) { - final _ret = _objc_msgSend_377( - this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_, - format.pointer, - validFormatSpecifiers.pointer, - locale?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? initWithValidatedFormat_validFormatSpecifiers_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _objc_msgSend_378( - this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_, - format.pointer, - validFormatSpecifiers.pointer, - argList, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? - initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _objc_msgSend_379( - this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_, - format.pointer, - validFormatSpecifiers.pointer, - locale?.pointer ?? ffi.nullptr, - argList, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? initWithData_encoding_(NSData data, int encoding) { - final _ret = _objc_msgSend_380( - this.pointer, _sel_initWithData_encoding_, data.pointer, encoding); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? initWithBytes_length_encoding_( - ffi.Pointer bytes, int len, int encoding) { - final _ret = _objc_msgSend_381(this.pointer, - _sel_initWithBytes_length_encoding_, bytes, len, encoding); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { - final _ret = _objc_msgSend_382( - this.pointer, - _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_, - bytes, - len, - encoding, - freeBuffer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: false, release: true); - } - - NSString? initWithBytesNoCopy_length_encoding_deallocator_( - ffi.Pointer bytes, - int len, - int encoding, - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _objc_msgSend_383( - this.pointer, - _sel_initWithBytesNoCopy_length_encoding_deallocator_, - bytes, - len, - encoding, - deallocator?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: false, release: true); - } - - static NSString string() { - final _ret = _objc_msgSend_2(_class_NSString, _sel_string); - return NSString._(_ret, retain: true, release: true); - } - - static NSString stringWithString_(NSString string) { - final _ret = _objc_msgSend_31( - _class_NSString, _sel_stringWithString_, string.pointer); - return NSString._(_ret, retain: true, release: true); - } - - static NSString stringWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _objc_msgSend_371( - _class_NSString, _sel_stringWithCharacters_length_, characters, length); - return NSString._(_ret, retain: true, release: true); - } - - static NSString? stringWithUTF8String_( - ffi.Pointer nullTerminatedCString) { - final _ret = _objc_msgSend_372( - _class_NSString, _sel_stringWithUTF8String_, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - static NSString stringWithFormat_(NSString format) { - final _ret = _objc_msgSend_31( - _class_NSString, _sel_stringWithFormat_, format.pointer); - return NSString._(_ret, retain: true, release: true); - } - - static NSString localizedStringWithFormat_(NSString format) { - final _ret = _objc_msgSend_31( - _class_NSString, _sel_localizedStringWithFormat_, format.pointer); - return NSString._(_ret, retain: true, release: true); - } - - static NSString? stringWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _objc_msgSend_376( - _class_NSString, - _sel_stringWithValidatedFormat_validFormatSpecifiers_error_, - format.pointer, - validFormatSpecifiers.pointer, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - static NSString? - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _objc_msgSend_376( - _class_NSString, - _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_, - format.pointer, - validFormatSpecifiers.pointer, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, int encoding) { - final _ret = _objc_msgSend_384(this.pointer, _sel_initWithCString_encoding_, - nullTerminatedCString, encoding); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - static NSString? stringWithCString_encoding_( - ffi.Pointer cString, int enc) { - final _ret = _objc_msgSend_384( - _class_NSString, _sel_stringWithCString_encoding_, cString, enc); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? initWithContentsOfURL_encoding_error_( - NSURL url, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_385(this.pointer, - _sel_initWithContentsOfURL_encoding_error_, url.pointer, enc, error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? initWithContentsOfFile_encoding_error_( - NSString path, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_386(this.pointer, - _sel_initWithContentsOfFile_encoding_error_, path.pointer, enc, error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - static NSString? stringWithContentsOfURL_encoding_error_( - NSURL url, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_385(_class_NSString, - _sel_stringWithContentsOfURL_encoding_error_, url.pointer, enc, error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - static NSString? stringWithContentsOfFile_encoding_error_( - NSString path, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_386( - _class_NSString, - _sel_stringWithContentsOfFile_encoding_error_, - path.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? initWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_387( - this.pointer, - _sel_initWithContentsOfURL_usedEncoding_error_, - url.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? initWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_388( - this.pointer, - _sel_initWithContentsOfFile_usedEncoding_error_, - path.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - static NSString? stringWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_387( - _class_NSString, - _sel_stringWithContentsOfURL_usedEncoding_error_, - url.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - static NSString? stringWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_388( - _class_NSString, - _sel_stringWithContentsOfFile_usedEncoding_error_, - path.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NSData data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _objc_msgSend_389( - _class_NSString, - _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_, - data.pointer, - opts?.pointer ?? ffi.nullptr, - string, - usedLossyConversion); - } - - NSObject propertyList() { - final _ret = _objc_msgSend_2(this.pointer, _sel_propertyList); - return NSObject._(_ret, retain: true, release: true); - } - - NSDictionary? propertyListFromStringsFileFormat() { - final _ret = - _objc_msgSend_390(this.pointer, _sel_propertyListFromStringsFileFormat); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - ffi.Pointer cString() { - return _objc_msgSend_13(this.pointer, _sel_cString); - } - - ffi.Pointer lossyCString() { - return _objc_msgSend_13(this.pointer, _sel_lossyCString); - } - - int cStringLength() { - return _objc_msgSend_10(this.pointer, _sel_cStringLength); - } - - void getCString_(ffi.Pointer bytes) { - _objc_msgSend_290(this.pointer, _sel_getCString_, bytes); - } - - void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { - _objc_msgSend_391( - this.pointer, _sel_getCString_maxLength_, bytes, maxLength); - } - - void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, - int maxLength, _NSRange aRange, ffi.Pointer<_NSRange> leftoverRange) { - _objc_msgSend_392( - this.pointer, - _sel_getCString_maxLength_range_remainingRange_, - bytes, - maxLength, - aRange, - leftoverRange); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _objc_msgSend_26(this.pointer, _sel_writeToFile_atomically_, - path.pointer, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _objc_msgSend_134( - this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); - } - - NSObject? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSObject? stringWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSString, _sel_stringWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSObject? stringWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - _class_NSString, _sel_stringWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? initWithCStringNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool freeBuffer) { - final _ret = _objc_msgSend_393( - this.pointer, - _sel_initWithCStringNoCopy_length_freeWhenDone_, - bytes, - length, - freeBuffer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: false, release: true); - } - - NSObject? initWithCString_length_(ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_384( - this.pointer, _sel_initWithCString_length_, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? initWithCString_(ffi.Pointer bytes) { - final _ret = _objc_msgSend_372(this.pointer, _sel_initWithCString_, bytes); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSObject? stringWithCString_length_( - ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_384( - _class_NSString, _sel_stringWithCString_length_, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSObject? stringWithCString_(ffi.Pointer bytes) { - final _ret = - _objc_msgSend_372(_class_NSString, _sel_stringWithCString_, bytes); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - void getCharacters_(ffi.Pointer buffer) { - _objc_msgSend_394(this.pointer, _sel_getCharacters_, buffer); - } - - NSString variantFittingPresentationWidth_(int width) { - final _ret = _objc_msgSend_395( - this.pointer, _sel_variantFittingPresentationWidth_, width); - return NSString._(_ret, retain: true, release: true); - } - - static NSString pathWithComponents_(NSArray components) { - final _ret = _objc_msgSend_396( - _class_NSString, _sel_pathWithComponents_, components.pointer); - return NSString._(_ret, retain: true, release: true); - } - - NSArray get pathComponents { - final _ret = _objc_msgSend_85(this.pointer, _sel_pathComponents); - return NSArray._(_ret, retain: true, release: true); - } - - bool get absolutePath { - return _objc_msgSend_12(this.pointer, _sel_isAbsolutePath); - } - - NSString get lastPathComponent { - final _ret = _objc_msgSend_21(this.pointer, _sel_lastPathComponent); - return NSString._(_ret, retain: true, release: true); - } - - NSString get stringByDeletingLastPathComponent { - final _ret = - _objc_msgSend_21(this.pointer, _sel_stringByDeletingLastPathComponent); - return NSString._(_ret, retain: true, release: true); - } - - NSString stringByAppendingPathComponent_(NSString str) { - final _ret = _objc_msgSend_69( - this.pointer, _sel_stringByAppendingPathComponent_, str.pointer); - return NSString._(_ret, retain: true, release: true); - } - - NSString get pathExtension { - final _ret = _objc_msgSend_21(this.pointer, _sel_pathExtension); - return NSString._(_ret, retain: true, release: true); - } - - NSString get stringByDeletingPathExtension { - final _ret = - _objc_msgSend_21(this.pointer, _sel_stringByDeletingPathExtension); - return NSString._(_ret, retain: true, release: true); - } - - NSString? stringByAppendingPathExtension_(NSString str) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_stringByAppendingPathExtension_, str.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString get stringByAbbreviatingWithTildeInPath { - final _ret = _objc_msgSend_21( - this.pointer, _sel_stringByAbbreviatingWithTildeInPath); - return NSString._(_ret, retain: true, release: true); - } - - NSString get stringByExpandingTildeInPath { - final _ret = - _objc_msgSend_21(this.pointer, _sel_stringByExpandingTildeInPath); - return NSString._(_ret, retain: true, release: true); - } - - NSString get stringByStandardizingPath { - final _ret = _objc_msgSend_21(this.pointer, _sel_stringByStandardizingPath); - return NSString._(_ret, retain: true, release: true); - } - - NSString get stringByResolvingSymlinksInPath { - final _ret = - _objc_msgSend_21(this.pointer, _sel_stringByResolvingSymlinksInPath); - return NSString._(_ret, retain: true, release: true); - } - - NSArray stringsByAppendingPaths_(NSArray paths) { - final _ret = _objc_msgSend_68( - this.pointer, _sel_stringsByAppendingPaths_, paths.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - int completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_( - ffi.Pointer> outputName, - bool flag, - ffi.Pointer> outputArray, - NSArray? filterTypes) { - return _objc_msgSend_397( - this.pointer, - _sel_completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_, - outputName, - flag, - outputArray, - filterTypes?.pointer ?? ffi.nullptr); - } - - ffi.Pointer get fileSystemRepresentation { - return _objc_msgSend_13(this.pointer, _sel_fileSystemRepresentation); - } - - bool getFileSystemRepresentation_maxLength_( - ffi.Pointer cname, int max) { - return _objc_msgSend_242( - this.pointer, _sel_getFileSystemRepresentation_maxLength_, cname, max); - } - - NSString? stringByAddingPercentEncodingWithAllowedCharacters_( - NSCharacterSet allowedCharacters) { - final _ret = _objc_msgSend_398( - this.pointer, - _sel_stringByAddingPercentEncodingWithAllowedCharacters_, - allowedCharacters.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get stringByRemovingPercentEncoding { - final _ret = - _objc_msgSend_44(this.pointer, _sel_stringByRemovingPercentEncoding); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? stringByAddingPercentEscapesUsingEncoding_(int enc) { - final _ret = _objc_msgSend_399( - this.pointer, _sel_stringByAddingPercentEscapesUsingEncoding_, enc); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? stringByReplacingPercentEscapesUsingEncoding_(int enc) { - final _ret = _objc_msgSend_399( - this.pointer, _sel_stringByReplacingPercentEscapesUsingEncoding_, enc); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSArray linguisticTagsInRange_scheme_options_orthography_tokenRanges_( - _NSRange range, - NSString scheme, - int options, - NSOrthography? orthography, - ffi.Pointer> tokenRanges) { - final _ret = _objc_msgSend_401( - this.pointer, - _sel_linguisticTagsInRange_scheme_options_orthography_tokenRanges_, - range, - scheme.pointer, - options, - orthography?.pointer ?? ffi.nullptr, - tokenRanges); - return NSArray._(_ret, retain: true, release: true); - } - - void enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_( - _NSRange range, - NSString scheme, - int options, - NSOrthography? orthography, - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool block) { - _objc_msgSend_402( - this.pointer, - _sel_enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_, - range, - scheme.pointer, - options, - orthography?.pointer ?? ffi.nullptr, - block.pointer); - } - - static NSString new1() { - final _ret = _objc_msgSend_2(_class_NSString, _sel_new); - return NSString._(_ret, retain: false, release: true); - } - - static NSString allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSString, _sel_allocWithZone_, zone); - return NSString._(_ret, retain: false, release: true); - } - - static NSString alloc() { - final _ret = _objc_msgSend_2(_class_NSString, _sel_alloc); - return NSString._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSString, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSString, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSString, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSString, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSString, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSString, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSString, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSString, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSString, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -extension StringToNSString on String { - NSString toNSString() => NSString(this); -} - -late final _class_NSString = objc.getClass("NSString"); -late final _sel_length = objc.registerName("length"); -late final _sel_characterAtIndex_ = objc.registerName("characterAtIndex:"); -final _objc_msgSend_18 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedShort Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, int)>(); - -class NSCoder extends NSObject { - NSCoder._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSCoder] that points to the same underlying object as [other]. - static NSCoder castFrom(T other) { - return NSCoder._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSCoder] that wraps the given raw object pointer. - static NSCoder castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCoder._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCoder]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSCoder); - } - - void encodeValueOfObjCType_at_( - ffi.Pointer type, ffi.Pointer addr) { - _objc_msgSend_19(this.pointer, _sel_encodeValueOfObjCType_at_, type, addr); - } - - void encodeDataObject_(NSData data) { - _objc_msgSend_285(this.pointer, _sel_encodeDataObject_, data.pointer); - } - - NSData? decodeDataObject() { - final _ret = _objc_msgSend_286(this.pointer, _sel_decodeDataObject); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - void decodeValueOfObjCType_at_size_( - ffi.Pointer type, ffi.Pointer data, int size) { - _objc_msgSend_287( - this.pointer, _sel_decodeValueOfObjCType_at_size_, type, data, size); - } - - int versionForClassName_(NSString className) { - return _objc_msgSend_288( - this.pointer, _sel_versionForClassName_, className.pointer); - } - - void encodeObject_(NSObject? object) { - _objc_msgSend_289( - this.pointer, _sel_encodeObject_, object?.pointer ?? ffi.nullptr); - } - - void encodeRootObject_(NSObject rootObject) { - _objc_msgSend_15(this.pointer, _sel_encodeRootObject_, rootObject.pointer); - } - - void encodeBycopyObject_(NSObject? anObject) { - _objc_msgSend_289(this.pointer, _sel_encodeBycopyObject_, - anObject?.pointer ?? ffi.nullptr); - } - - void encodeByrefObject_(NSObject? anObject) { - _objc_msgSend_289(this.pointer, _sel_encodeByrefObject_, - anObject?.pointer ?? ffi.nullptr); - } - - void encodeConditionalObject_(NSObject? object) { - _objc_msgSend_289(this.pointer, _sel_encodeConditionalObject_, - object?.pointer ?? ffi.nullptr); - } - - void encodeValuesOfObjCTypes_(ffi.Pointer types) { - _objc_msgSend_290(this.pointer, _sel_encodeValuesOfObjCTypes_, types); - } - - void encodeArrayOfObjCType_count_at_( - ffi.Pointer type, int count, ffi.Pointer array) { - _objc_msgSend_291( - this.pointer, _sel_encodeArrayOfObjCType_count_at_, type, count, array); - } - - void encodeBytes_length_(ffi.Pointer byteaddr, int length) { - _objc_msgSend_22(this.pointer, _sel_encodeBytes_length_, byteaddr, length); - } - - NSObject? decodeObject() { - final _ret = _objc_msgSend_17(this.pointer, _sel_decodeObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? decodeTopLevelObjectAndReturnError_( - ffi.Pointer> error) { - final _ret = _objc_msgSend_292( - this.pointer, _sel_decodeTopLevelObjectAndReturnError_, error); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - void decodeValuesOfObjCTypes_(ffi.Pointer types) { - _objc_msgSend_290(this.pointer, _sel_decodeValuesOfObjCTypes_, types); - } - - void decodeArrayOfObjCType_count_at_( - ffi.Pointer itemType, int count, ffi.Pointer array) { - _objc_msgSend_291(this.pointer, _sel_decodeArrayOfObjCType_count_at_, - itemType, count, array); - } - - ffi.Pointer decodeBytesWithReturnedLength_( - ffi.Pointer lengthp) { - return _objc_msgSend_293( - this.pointer, _sel_decodeBytesWithReturnedLength_, lengthp); - } - - void encodePropertyList_(NSObject aPropertyList) { - _objc_msgSend_15( - this.pointer, _sel_encodePropertyList_, aPropertyList.pointer); - } - - NSObject? decodePropertyList() { - final _ret = _objc_msgSend_17(this.pointer, _sel_decodePropertyList); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - void setObjectZone_(ffi.Pointer<_NSZone> zone) { - _objc_msgSend_294(this.pointer, _sel_setObjectZone_, zone); - } - - ffi.Pointer<_NSZone> objectZone() { - return _objc_msgSend_295(this.pointer, _sel_objectZone); - } - - int get systemVersion { - return _objc_msgSend_214(this.pointer, _sel_systemVersion); - } - - bool get allowsKeyedCoding { - return _objc_msgSend_12(this.pointer, _sel_allowsKeyedCoding); - } - - void encodeObject_forKey_(NSObject? object, NSString key) { - _objc_msgSend_135(this.pointer, _sel_encodeObject_forKey_, - object?.pointer ?? ffi.nullptr, key.pointer); - } - - void encodeConditionalObject_forKey_(NSObject? object, NSString key) { - _objc_msgSend_135(this.pointer, _sel_encodeConditionalObject_forKey_, - object?.pointer ?? ffi.nullptr, key.pointer); - } - - void encodeBool_forKey_(bool value, NSString key) { - _objc_msgSend_296( - this.pointer, _sel_encodeBool_forKey_, value, key.pointer); - } - - void encodeInt_forKey_(int value, NSString key) { - _objc_msgSend_297(this.pointer, _sel_encodeInt_forKey_, value, key.pointer); - } - - void encodeInt32_forKey_(int value, NSString key) { - _objc_msgSend_298( - this.pointer, _sel_encodeInt32_forKey_, value, key.pointer); - } - - void encodeInt64_forKey_(int value, NSString key) { - _objc_msgSend_299( - this.pointer, _sel_encodeInt64_forKey_, value, key.pointer); - } - - void encodeFloat_forKey_(double value, NSString key) { - _objc_msgSend_300( - this.pointer, _sel_encodeFloat_forKey_, value, key.pointer); - } - - void encodeDouble_forKey_(double value, NSString key) { - _objc_msgSend_301( - this.pointer, _sel_encodeDouble_forKey_, value, key.pointer); - } - - void encodeBytes_length_forKey_( - ffi.Pointer bytes, int length, NSString key) { - _objc_msgSend_302(this.pointer, _sel_encodeBytes_length_forKey_, bytes, - length, key.pointer); - } - - bool containsValueForKey_(NSString key) { - return _objc_msgSend_64( - this.pointer, _sel_containsValueForKey_, key.pointer); - } - - NSObject? decodeObjectForKey_(NSString key) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_decodeObjectForKey_, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? decodeTopLevelObjectForKey_error_( - NSString key, ffi.Pointer> error) { - final _ret = _objc_msgSend_303(this.pointer, - _sel_decodeTopLevelObjectForKey_error_, key.pointer, error); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - bool decodeBoolForKey_(NSString key) { - return _objc_msgSend_64(this.pointer, _sel_decodeBoolForKey_, key.pointer); - } - - int decodeIntForKey_(NSString key) { - return _objc_msgSend_304(this.pointer, _sel_decodeIntForKey_, key.pointer); - } - - int decodeInt32ForKey_(NSString key) { - return _objc_msgSend_305( - this.pointer, _sel_decodeInt32ForKey_, key.pointer); - } - - int decodeInt64ForKey_(NSString key) { - return _objc_msgSend_306( - this.pointer, _sel_decodeInt64ForKey_, key.pointer); - } - - double decodeFloatForKey_(NSString key) { - return objc.useMsgSendVariants - ? _objc_msgSend_307Fpret( - this.pointer, _sel_decodeFloatForKey_, key.pointer) - : _objc_msgSend_307(this.pointer, _sel_decodeFloatForKey_, key.pointer); - } - - double decodeDoubleForKey_(NSString key) { - return objc.useMsgSendVariants - ? _objc_msgSend_308Fpret( - this.pointer, _sel_decodeDoubleForKey_, key.pointer) - : _objc_msgSend_308( - this.pointer, _sel_decodeDoubleForKey_, key.pointer); - } - - ffi.Pointer decodeBytesForKey_returnedLength_( - NSString key, ffi.Pointer lengthp) { - return _objc_msgSend_309(this.pointer, - _sel_decodeBytesForKey_returnedLength_, key.pointer, lengthp); - } - - void encodeInteger_forKey_(int value, NSString key) { - _objc_msgSend_310( - this.pointer, _sel_encodeInteger_forKey_, value, key.pointer); - } - - int decodeIntegerForKey_(NSString key) { - return _objc_msgSend_288( - this.pointer, _sel_decodeIntegerForKey_, key.pointer); - } - - bool get requiresSecureCoding { - return _objc_msgSend_12(this.pointer, _sel_requiresSecureCoding); - } - - NSObject? decodeObjectOfClass_forKey_(NSObject aClass, NSString key) { - final _ret = _objc_msgSend_311(this.pointer, - _sel_decodeObjectOfClass_forKey_, aClass.pointer, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? decodeTopLevelObjectOfClass_forKey_error_(NSObject aClass, - NSString key, ffi.Pointer> error) { - final _ret = _objc_msgSend_312( - this.pointer, - _sel_decodeTopLevelObjectOfClass_forKey_error_, - aClass.pointer, - key.pointer, - error); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSArray? decodeArrayOfObjectsOfClass_forKey_(NSObject cls, NSString key) { - final _ret = _objc_msgSend_313(this.pointer, - _sel_decodeArrayOfObjectsOfClass_forKey_, cls.pointer, key.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSDictionary? decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_( - NSObject keyCls, NSObject objectCls, NSString key) { - final _ret = _objc_msgSend_314( - this.pointer, - _sel_decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_, - keyCls.pointer, - objectCls.pointer, - key.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSObject? decodeObjectOfClasses_forKey_(NSSet? classes, NSString key) { - final _ret = _objc_msgSend_315( - this.pointer, - _sel_decodeObjectOfClasses_forKey_, - classes?.pointer ?? ffi.nullptr, - key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? decodeTopLevelObjectOfClasses_forKey_error_(NSSet? classes, - NSString key, ffi.Pointer> error) { - final _ret = _objc_msgSend_316( - this.pointer, - _sel_decodeTopLevelObjectOfClasses_forKey_error_, - classes?.pointer ?? ffi.nullptr, - key.pointer, - error); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSArray? decodeArrayOfObjectsOfClasses_forKey_(NSSet classes, NSString key) { - final _ret = _objc_msgSend_317( - this.pointer, - _sel_decodeArrayOfObjectsOfClasses_forKey_, - classes.pointer, - key.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSDictionary? decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_( - NSSet keyClasses, NSSet objectClasses, NSString key) { - final _ret = _objc_msgSend_318( - this.pointer, - _sel_decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_, - keyClasses.pointer, - objectClasses.pointer, - key.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSObject? decodePropertyListForKey_(NSString key) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_decodePropertyListForKey_, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSSet? get allowedClasses { - final _ret = _objc_msgSend_319(this.pointer, _sel_allowedClasses); - return _ret.address == 0 - ? null - : NSSet._(_ret, retain: true, release: true); - } - - void failWithError_(NSError error) { - _objc_msgSend_320(this.pointer, _sel_failWithError_, error.pointer); - } - - int get decodingFailurePolicy { - return _objc_msgSend_321(this.pointer, _sel_decodingFailurePolicy); - } - - NSError? get error { - final _ret = _objc_msgSend_322(this.pointer, _sel_error); - return _ret.address == 0 - ? null - : NSError._(_ret, retain: true, release: true); - } - - void encodeNXObject_(NSObject object) { - _objc_msgSend_15(this.pointer, _sel_encodeNXObject_, object.pointer); - } - - NSObject? decodeNXObject() { - final _ret = _objc_msgSend_17(this.pointer, _sel_decodeNXObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - void decodeValueOfObjCType_at_( - ffi.Pointer type, ffi.Pointer data) { - _objc_msgSend_19(this.pointer, _sel_decodeValueOfObjCType_at_, type, data); - } - - void encodePoint_(CGPoint point) { - _objc_msgSend_323(this.pointer, _sel_encodePoint_, point); - } - - void decodePoint(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_59Stret(stret, this.pointer, _sel_decodePoint) - : stret.ref = _objc_msgSend_59(this.pointer, _sel_decodePoint); - } - - void encodeSize_(CGSize size) { - _objc_msgSend_324(this.pointer, _sel_encodeSize_, size); - } - - void decodeSize(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_60Stret(stret, this.pointer, _sel_decodeSize) - : stret.ref = _objc_msgSend_60(this.pointer, _sel_decodeSize); - } - - void encodeRect_(CGRect rect) { - _objc_msgSend_325(this.pointer, _sel_encodeRect_, rect); - } - - void decodeRect(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_61Stret(stret, this.pointer, _sel_decodeRect) - : stret.ref = _objc_msgSend_61(this.pointer, _sel_decodeRect); - } - - void encodePoint_forKey_(CGPoint point, NSString key) { - _objc_msgSend_326( - this.pointer, _sel_encodePoint_forKey_, point, key.pointer); - } - - void encodeSize_forKey_(CGSize size, NSString key) { - _objc_msgSend_327(this.pointer, _sel_encodeSize_forKey_, size, key.pointer); - } - - void encodeRect_forKey_(CGRect rect, NSString key) { - _objc_msgSend_328(this.pointer, _sel_encodeRect_forKey_, rect, key.pointer); - } - - void decodePointForKey_(ffi.Pointer stret, NSString key) { - objc.useMsgSendVariants - ? _objc_msgSend_329Stret( - stret, this.pointer, _sel_decodePointForKey_, key.pointer) - : stret.ref = _objc_msgSend_329( - this.pointer, _sel_decodePointForKey_, key.pointer); - } - - void decodeSizeForKey_(ffi.Pointer stret, NSString key) { - objc.useMsgSendVariants - ? _objc_msgSend_330Stret( - stret, this.pointer, _sel_decodeSizeForKey_, key.pointer) - : stret.ref = _objc_msgSend_330( - this.pointer, _sel_decodeSizeForKey_, key.pointer); - } - - void decodeRectForKey_(ffi.Pointer stret, NSString key) { - objc.useMsgSendVariants - ? _objc_msgSend_331Stret( - stret, this.pointer, _sel_decodeRectForKey_, key.pointer) - : stret.ref = _objc_msgSend_331( - this.pointer, _sel_decodeRectForKey_, key.pointer); - } - - @override - NSCoder init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSCoder._(_ret, retain: true, release: true); - } - - static NSCoder new1() { - final _ret = _objc_msgSend_2(_class_NSCoder, _sel_new); - return NSCoder._(_ret, retain: false, release: true); - } - - static NSCoder allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSCoder, _sel_allocWithZone_, zone); - return NSCoder._(_ret, retain: false, release: true); - } - - static NSCoder alloc() { - final _ret = _objc_msgSend_2(_class_NSCoder, _sel_alloc); - return NSCoder._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSCoder, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSCoder, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSCoder, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSCoder, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSCoder, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSCoder, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSCoder, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSCoder, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSCoder, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSCoder = objc.getClass("NSCoder"); -late final _sel_encodeValueOfObjCType_at_ = - objc.registerName("encodeValueOfObjCType:at:"); -final _objc_msgSend_19 = 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)>(); - -class NSData extends NSObject { - NSData._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSData] that points to the same underlying object as [other]. - static NSData castFrom(T other) { - return NSData._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSData] that wraps the given raw object pointer. - static NSData castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSData._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSData]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSData); - } - - int get length { - return _objc_msgSend_10(this.pointer, _sel_length); - } - - ffi.Pointer get bytes { - return _objc_msgSend_20(this.pointer, _sel_bytes); - } - - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - void getBytes_length_(ffi.Pointer buffer, int length) { - _objc_msgSend_22(this.pointer, _sel_getBytes_length_, buffer, length); - } - - void getBytes_range_(ffi.Pointer buffer, _NSRange range) { - _objc_msgSend_23(this.pointer, _sel_getBytes_range_, buffer, range); - } - - bool isEqualToData_(NSData other) { - return _objc_msgSend_24(this.pointer, _sel_isEqualToData_, other.pointer); - } - - NSData subdataWithRange_(_NSRange range) { - final _ret = _objc_msgSend_25(this.pointer, _sel_subdataWithRange_, range); - return NSData._(_ret, retain: true, release: true); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _objc_msgSend_26(this.pointer, _sel_writeToFile_atomically_, - path.pointer, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _objc_msgSend_134( - this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); - } - - bool writeToFile_options_error_(NSString path, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _objc_msgSend_269(this.pointer, _sel_writeToFile_options_error_, - path.pointer, writeOptionsMask, errorPtr); - } - - bool writeToURL_options_error_(NSURL url, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _objc_msgSend_270(this.pointer, _sel_writeToURL_options_error_, - url.pointer, writeOptionsMask, errorPtr); - } - - void rangeOfData_options_range_(ffi.Pointer<_NSRange> stret, - NSData dataToFind, int mask, _NSRange searchRange) { - objc.useMsgSendVariants - ? _objc_msgSend_271Stret( - stret, - this.pointer, - _sel_rangeOfData_options_range_, - dataToFind.pointer, - mask, - searchRange) - : stret.ref = _objc_msgSend_271( - this.pointer, - _sel_rangeOfData_options_range_, - dataToFind.pointer, - mask, - searchRange); - } - - void enumerateByteRangesUsingBlock_( - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool block) { - _objc_msgSend_272( - this.pointer, _sel_enumerateByteRangesUsingBlock_, block.pointer); - } - - static NSData data() { - final _ret = _objc_msgSend_2(_class_NSData, _sel_data); - return NSData._(_ret, retain: true, release: true); - } - - static NSData dataWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - _class_NSData, _sel_dataWithBytes_length_, bytes, length); - return NSData._(_ret, retain: true, release: true); - } - - static NSData dataWithBytesNoCopy_length_( - ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - _class_NSData, _sel_dataWithBytesNoCopy_length_, bytes, length); - return NSData._(_ret, retain: false, release: true); - } - - static NSData dataWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _objc_msgSend_274(_class_NSData, - _sel_dataWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); - return NSData._(_ret, retain: false, release: true); - } - - static NSData? dataWithContentsOfFile_options_error_(NSString path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_275( - _class_NSData, - _sel_dataWithContentsOfFile_options_error_, - path.pointer, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - static NSData? dataWithContentsOfURL_options_error_(NSURL url, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_276( - _class_NSData, - _sel_dataWithContentsOfURL_options_error_, - url.pointer, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - static NSData? dataWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSData, _sel_dataWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - static NSData? dataWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - _class_NSData, _sel_dataWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSData initWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - this.pointer, _sel_initWithBytes_length_, bytes, length); - return NSData._(_ret, retain: true, release: true); - } - - NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - this.pointer, _sel_initWithBytesNoCopy_length_, bytes, length); - return NSData._(_ret, retain: false, release: true); - } - - NSData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _objc_msgSend_274(this.pointer, - _sel_initWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); - return NSData._(_ret, retain: false, release: true); - } - - NSData initWithBytesNoCopy_length_deallocator_(ffi.Pointer bytes, - int length, ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _objc_msgSend_278( - this.pointer, - _sel_initWithBytesNoCopy_length_deallocator_, - bytes, - length, - deallocator?.pointer ?? ffi.nullptr); - return NSData._(_ret, retain: false, release: true); - } - - NSData? initWithContentsOfFile_options_error_(NSString path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_275( - this.pointer, - _sel_initWithContentsOfFile_options_error_, - path.pointer, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSData? initWithContentsOfURL_options_error_(NSURL url, int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_276( - this.pointer, - _sel_initWithContentsOfURL_options_error_, - url.pointer, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSData? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSData? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSData initWithData_(NSData data) { - final _ret = - _objc_msgSend_279(this.pointer, _sel_initWithData_, data.pointer); - return NSData._(_ret, retain: true, release: true); - } - - static NSData dataWithData_(NSData data) { - final _ret = - _objc_msgSend_279(_class_NSData, _sel_dataWithData_, data.pointer); - return NSData._(_ret, retain: true, release: true); - } - - NSData? initWithBase64EncodedString_options_( - NSString base64String, int options) { - final _ret = _objc_msgSend_280( - this.pointer, - _sel_initWithBase64EncodedString_options_, - base64String.pointer, - options); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSString base64EncodedStringWithOptions_(int options) { - final _ret = _objc_msgSend_281( - this.pointer, _sel_base64EncodedStringWithOptions_, options); - return NSString._(_ret, retain: true, release: true); - } - - NSData? initWithBase64EncodedData_options_(NSData base64Data, int options) { - final _ret = _objc_msgSend_282(this.pointer, - _sel_initWithBase64EncodedData_options_, base64Data.pointer, options); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSData base64EncodedDataWithOptions_(int options) { - final _ret = _objc_msgSend_283( - this.pointer, _sel_base64EncodedDataWithOptions_, options); - return NSData._(_ret, retain: true, release: true); - } - - NSData? decompressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _objc_msgSend_284(this.pointer, - _sel_decompressedDataUsingAlgorithm_error_, algorithm, error); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSData? compressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _objc_msgSend_284(this.pointer, - _sel_compressedDataUsingAlgorithm_error_, algorithm, error); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - void getBytes_(ffi.Pointer buffer) { - _objc_msgSend_52(this.pointer, _sel_getBytes_, buffer); - } - - static NSObject? dataWithContentsOfMappedFile_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSData, _sel_dataWithContentsOfMappedFile_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? initWithContentsOfMappedFile_(NSString path) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithContentsOfMappedFile_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? initWithBase64Encoding_(NSString base64String) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithBase64Encoding_, base64String.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSString base64Encoding() { - final _ret = _objc_msgSend_21(this.pointer, _sel_base64Encoding); - return NSString._(_ret, retain: true, release: true); - } - - @override - NSData init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSData._(_ret, retain: true, release: true); - } - - static NSData new1() { - final _ret = _objc_msgSend_2(_class_NSData, _sel_new); - return NSData._(_ret, retain: false, release: true); - } - - static NSData allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSData, _sel_allocWithZone_, zone); - return NSData._(_ret, retain: false, release: true); - } - - static NSData alloc() { - final _ret = _objc_msgSend_2(_class_NSData, _sel_alloc); - return NSData._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSData, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSData, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSData, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSData, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSData, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64( - _class_NSData, _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSData, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSData, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSData, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSData = objc.getClass("NSData"); -late final _sel_bytes = objc.registerName("bytes"); -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_description = objc.registerName("description"); -final _objc_msgSend_21 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_getBytes_length_ = objc.registerName("getBytes:length:"); -final _objc_msgSend_22 = 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)>(); - -final class _NSRange extends ffi.Struct { - @ffi.UnsignedLong() - external int location; - - @ffi.UnsignedLong() - external int length; -} - -late final _sel_getBytes_range_ = objc.registerName("getBytes:range:"); -final _objc_msgSend_23 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, _NSRange)>(); -late final _sel_isEqualToData_ = objc.registerName("isEqualToData:"); -final _objc_msgSend_24 = 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_subdataWithRange_ = objc.registerName("subdataWithRange:"); -final _objc_msgSend_25 = 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_writeToFile_atomically_ = - objc.registerName("writeToFile:atomically:"); -final _objc_msgSend_26 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); - -class NSURL extends NSObject { - NSURL._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSURL] that points to the same underlying object as [other]. - static NSURL castFrom(T other) { - return NSURL._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSURL] that wraps the given raw object pointer. - static NSURL castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURL._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURL]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSURL); - } - - NSURL? initWithScheme_host_path_( - NSString scheme, NSString? host, NSString path) { - final _ret = _objc_msgSend_27(this.pointer, _sel_initWithScheme_host_path_, - scheme.pointer, host?.pointer ?? ffi.nullptr, path.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL initFileURLWithPath_isDirectory_relativeToURL_( - NSString path, bool isDir, NSURL? baseURL) { - final _ret = _objc_msgSend_28( - this.pointer, - _sel_initFileURLWithPath_isDirectory_relativeToURL_, - path.pointer, - isDir, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); - } - - NSURL initFileURLWithPath_relativeToURL_(NSString path, NSURL? baseURL) { - final _ret = _objc_msgSend_29( - this.pointer, - _sel_initFileURLWithPath_relativeToURL_, - path.pointer, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); - } - - NSURL initFileURLWithPath_isDirectory_(NSString path, bool isDir) { - final _ret = _objc_msgSend_30(this.pointer, - _sel_initFileURLWithPath_isDirectory_, path.pointer, isDir); - return NSURL._(_ret, retain: true, release: true); - } - - NSURL initFileURLWithPath_(NSString path) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initFileURLWithPath_, path.pointer); - return NSURL._(_ret, retain: true, release: true); - } - - static NSURL fileURLWithPath_isDirectory_relativeToURL_( - NSString path, bool isDir, NSURL? baseURL) { - final _ret = _objc_msgSend_32( - _class_NSURL, - _sel_fileURLWithPath_isDirectory_relativeToURL_, - path.pointer, - isDir, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); - } - - static NSURL fileURLWithPath_relativeToURL_(NSString path, NSURL? baseURL) { - final _ret = _objc_msgSend_33( - _class_NSURL, - _sel_fileURLWithPath_relativeToURL_, - path.pointer, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); - } - - static NSURL fileURLWithPath_isDirectory_(NSString path, bool isDir) { - final _ret = _objc_msgSend_34( - _class_NSURL, _sel_fileURLWithPath_isDirectory_, path.pointer, isDir); - return NSURL._(_ret, retain: true, release: true); - } - - static NSURL fileURLWithPath_(NSString path) { - final _ret = - _objc_msgSend_35(_class_NSURL, _sel_fileURLWithPath_, path.pointer); - return NSURL._(_ret, retain: true, release: true); - } - - NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - ffi.Pointer path, bool isDir, NSURL? baseURL) { - final _ret = _objc_msgSend_36( - this.pointer, - _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_, - path, - isDir, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); - } - - static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - ffi.Pointer path, bool isDir, NSURL? baseURL) { - final _ret = _objc_msgSend_37( - _class_NSURL, - _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_, - path, - isDir, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); - } - - NSURL? initWithString_(NSString URLString) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_initWithString_, URLString.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? initWithString_relativeToURL_(NSString URLString, NSURL? baseURL) { - final _ret = _objc_msgSend_39( - this.pointer, - _sel_initWithString_relativeToURL_, - URLString.pointer, - baseURL?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - static NSURL? URLWithString_(NSString URLString) { - final _ret = - _objc_msgSend_38(_class_NSURL, _sel_URLWithString_, URLString.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - static NSURL? URLWithString_relativeToURL_( - NSString URLString, NSURL? baseURL) { - final _ret = _objc_msgSend_39( - _class_NSURL, - _sel_URLWithString_relativeToURL_, - URLString.pointer, - baseURL?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? initWithString_encodingInvalidCharacters_( - NSString URLString, bool encodingInvalidCharacters) { - final _ret = _objc_msgSend_40( - this.pointer, - _sel_initWithString_encodingInvalidCharacters_, - URLString.pointer, - encodingInvalidCharacters); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - static NSURL? URLWithString_encodingInvalidCharacters_( - NSString URLString, bool encodingInvalidCharacters) { - final _ret = _objc_msgSend_40( - _class_NSURL, - _sel_URLWithString_encodingInvalidCharacters_, - URLString.pointer, - encodingInvalidCharacters); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL initWithDataRepresentation_relativeToURL_(NSData data, NSURL? baseURL) { - final _ret = _objc_msgSend_41( - this.pointer, - _sel_initWithDataRepresentation_relativeToURL_, - data.pointer, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); - } - - static NSURL URLWithDataRepresentation_relativeToURL_( - NSData data, NSURL? baseURL) { - final _ret = _objc_msgSend_42( - _class_NSURL, - _sel_URLWithDataRepresentation_relativeToURL_, - data.pointer, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); - } - - NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( - NSData data, NSURL? baseURL) { - final _ret = _objc_msgSend_41( - this.pointer, - _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_, - data.pointer, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); - } - - static NSURL absoluteURLWithDataRepresentation_relativeToURL_( - NSData data, NSURL? baseURL) { - final _ret = _objc_msgSend_42( - _class_NSURL, - _sel_absoluteURLWithDataRepresentation_relativeToURL_, - data.pointer, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); - } - - NSData get dataRepresentation { - final _ret = _objc_msgSend_43(this.pointer, _sel_dataRepresentation); - return NSData._(_ret, retain: true, release: true); - } - - NSString? get absoluteString { - final _ret = _objc_msgSend_44(this.pointer, _sel_absoluteString); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString get relativeString { - final _ret = _objc_msgSend_21(this.pointer, _sel_relativeString); - return NSString._(_ret, retain: true, release: true); - } - - NSURL? get baseURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_baseURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? get absoluteURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_absoluteURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSString? get scheme { - final _ret = _objc_msgSend_44(this.pointer, _sel_scheme); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get resourceSpecifier { - final _ret = _objc_msgSend_44(this.pointer, _sel_resourceSpecifier); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get host { - final _ret = _objc_msgSend_44(this.pointer, _sel_host); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSNumber? get port { - final _ret = _objc_msgSend_215(this.pointer, _sel_port); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); - } - - NSString? get user { - final _ret = _objc_msgSend_44(this.pointer, _sel_user); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get password { - final _ret = _objc_msgSend_44(this.pointer, _sel_password); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get path { - final _ret = _objc_msgSend_44(this.pointer, _sel_path); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get fragment { - final _ret = _objc_msgSend_44(this.pointer, _sel_fragment); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get parameterString { - final _ret = _objc_msgSend_44(this.pointer, _sel_parameterString); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get query { - final _ret = _objc_msgSend_44(this.pointer, _sel_query); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get relativePath { - final _ret = _objc_msgSend_44(this.pointer, _sel_relativePath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - bool get hasDirectoryPath { - return _objc_msgSend_12(this.pointer, _sel_hasDirectoryPath); - } - - bool getFileSystemRepresentation_maxLength_( - ffi.Pointer buffer, int maxBufferLength) { - return _objc_msgSend_242(this.pointer, - _sel_getFileSystemRepresentation_maxLength_, buffer, maxBufferLength); - } - - ffi.Pointer get fileSystemRepresentation { - return _objc_msgSend_13(this.pointer, _sel_fileSystemRepresentation); - } - - bool get fileURL { - return _objc_msgSend_12(this.pointer, _sel_isFileURL); - } - - NSURL? get standardizedURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_standardizedURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - bool isFileReferenceURL() { - return _objc_msgSend_12(this.pointer, _sel_isFileReferenceURL); - } - - NSURL? fileReferenceURL() { - final _ret = _objc_msgSend_45(this.pointer, _sel_fileReferenceURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? get filePathURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_filePathURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - bool getResourceValue_forKey_error_( - ffi.Pointer> value, - NSString key, - ffi.Pointer> error) { - return _objc_msgSend_243(this.pointer, _sel_getResourceValue_forKey_error_, - value, key.pointer, error); - } - - NSObject? resourceValuesForKeys_error_( - NSArray keys, ffi.Pointer> error) { - final _ret = _objc_msgSend_244( - this.pointer, _sel_resourceValuesForKeys_error_, keys.pointer, error); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - bool setResourceValue_forKey_error_(NSObject? value, NSString key, - ffi.Pointer> error) { - return _objc_msgSend_245(this.pointer, _sel_setResourceValue_forKey_error_, - value?.pointer ?? ffi.nullptr, key.pointer, error); - } - - bool setResourceValues_error_( - NSObject keyedValues, ffi.Pointer> error) { - return _objc_msgSend_246(this.pointer, _sel_setResourceValues_error_, - keyedValues.pointer, error); - } - - void removeCachedResourceValueForKey_(NSString key) { - _objc_msgSend_247( - this.pointer, _sel_removeCachedResourceValueForKey_, key.pointer); - } - - void removeAllCachedResourceValues() { - _objc_msgSend_1(this.pointer, _sel_removeAllCachedResourceValues); - } - - void setTemporaryResourceValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setTemporaryResourceValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - NSData? - bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( - int options, - NSArray? keys, - NSURL? relativeURL, - ffi.Pointer> error) { - final _ret = _objc_msgSend_248( - this.pointer, - _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_, - options, - keys?.pointer ?? ffi.nullptr, - relativeURL?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSURL? - initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NSData bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _objc_msgSend_249( - this.pointer, - _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_, - bookmarkData.pointer, - options, - relativeURL?.pointer ?? ffi.nullptr, - isStale, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - static NSURL? - URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NSData bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _objc_msgSend_249( - _class_NSURL, - _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_, - bookmarkData.pointer, - options, - relativeURL?.pointer ?? ffi.nullptr, - isStale, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - static NSObject? resourceValuesForKeys_fromBookmarkData_( - NSArray keys, NSData bookmarkData) { - final _ret = _objc_msgSend_250( - _class_NSURL, - _sel_resourceValuesForKeys_fromBookmarkData_, - keys.pointer, - bookmarkData.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static bool writeBookmarkData_toURL_options_error_( - NSData bookmarkData, - NSURL bookmarkFileURL, - int options, - ffi.Pointer> error) { - return _objc_msgSend_251( - _class_NSURL, - _sel_writeBookmarkData_toURL_options_error_, - bookmarkData.pointer, - bookmarkFileURL.pointer, - options, - error); - } - - static NSData? bookmarkDataWithContentsOfURL_error_( - NSURL bookmarkFileURL, ffi.Pointer> error) { - final _ret = _objc_msgSend_252( - _class_NSURL, - _sel_bookmarkDataWithContentsOfURL_error_, - bookmarkFileURL.pointer, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - static NSURL? URLByResolvingAliasFileAtURL_options_error_( - NSURL url, int options, ffi.Pointer> error) { - final _ret = _objc_msgSend_253( - _class_NSURL, - _sel_URLByResolvingAliasFileAtURL_options_error_, - url.pointer, - options, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - bool startAccessingSecurityScopedResource() { - return _objc_msgSend_12( - this.pointer, _sel_startAccessingSecurityScopedResource); - } - - void stopAccessingSecurityScopedResource() { - _objc_msgSend_1(this.pointer, _sel_stopAccessingSecurityScopedResource); - } - - bool getPromisedItemResourceValue_forKey_error_( - ffi.Pointer> value, - NSString key, - ffi.Pointer> error) { - return _objc_msgSend_243( - this.pointer, - _sel_getPromisedItemResourceValue_forKey_error_, - value, - key.pointer, - error); - } - - NSDictionary? promisedItemResourceValuesForKeys_error_( - NSArray keys, ffi.Pointer> error) { - final _ret = _objc_msgSend_254(this.pointer, - _sel_promisedItemResourceValuesForKeys_error_, keys.pointer, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - bool checkPromisedItemIsReachableAndReturnError_( - ffi.Pointer> error) { - return _objc_msgSend_255( - this.pointer, _sel_checkPromisedItemIsReachableAndReturnError_, error); - } - - static NSURL? fileURLWithPathComponents_(NSArray components) { - final _ret = _objc_msgSend_256( - _class_NSURL, _sel_fileURLWithPathComponents_, components.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSArray? get pathComponents { - final _ret = _objc_msgSend_84(this.pointer, _sel_pathComponents); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSString? get lastPathComponent { - final _ret = _objc_msgSend_44(this.pointer, _sel_lastPathComponent); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get pathExtension { - final _ret = _objc_msgSend_44(this.pointer, _sel_pathExtension); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSURL? URLByAppendingPathComponent_(NSString pathComponent) { - final _ret = _objc_msgSend_257( - this.pointer, _sel_URLByAppendingPathComponent_, pathComponent.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? URLByAppendingPathComponent_isDirectory_( - NSString pathComponent, bool isDirectory) { - final _ret = _objc_msgSend_258( - this.pointer, - _sel_URLByAppendingPathComponent_isDirectory_, - pathComponent.pointer, - isDirectory); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? get URLByDeletingLastPathComponent { - final _ret = - _objc_msgSend_45(this.pointer, _sel_URLByDeletingLastPathComponent); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? URLByAppendingPathExtension_(NSString pathExtension) { - final _ret = _objc_msgSend_257( - this.pointer, _sel_URLByAppendingPathExtension_, pathExtension.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? get URLByDeletingPathExtension { - final _ret = - _objc_msgSend_45(this.pointer, _sel_URLByDeletingPathExtension); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - bool checkResourceIsReachableAndReturnError_( - ffi.Pointer> error) { - return _objc_msgSend_255( - this.pointer, _sel_checkResourceIsReachableAndReturnError_, error); - } - - NSURL? get URLByStandardizingPath { - final _ret = _objc_msgSend_45(this.pointer, _sel_URLByStandardizingPath); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? get URLByResolvingSymlinksInPath { - final _ret = - _objc_msgSend_45(this.pointer, _sel_URLByResolvingSymlinksInPath); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSData? resourceDataUsingCache_(bool shouldUseCache) { - final _ret = _objc_msgSend_259( - this.pointer, _sel_resourceDataUsingCache_, shouldUseCache); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - void loadResourceDataNotifyingClient_usingCache_( - NSObject client, bool shouldUseCache) { - _objc_msgSend_260( - this.pointer, - _sel_loadResourceDataNotifyingClient_usingCache_, - client.pointer, - shouldUseCache); - } - - NSObject? propertyForKey_(NSString propertyKey) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_propertyForKey_, propertyKey.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - bool setResourceData_(NSData data) { - return _objc_msgSend_24(this.pointer, _sel_setResourceData_, data.pointer); - } - - bool setProperty_forKey_(NSObject property, NSString propertyKey) { - return _objc_msgSend_261(this.pointer, _sel_setProperty_forKey_, - property.pointer, propertyKey.pointer); - } - - NSURLHandle? URLHandleUsingCache_(bool shouldUseCache) { - final _ret = _objc_msgSend_268( - this.pointer, _sel_URLHandleUsingCache_, shouldUseCache); - return _ret.address == 0 - ? null - : NSURLHandle._(_ret, retain: true, release: true); - } - - @override - NSURL init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURL._(_ret, retain: true, release: true); - } - - static NSURL new1() { - final _ret = _objc_msgSend_2(_class_NSURL, _sel_new); - return NSURL._(_ret, retain: false, release: true); - } - - static NSURL allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSURL, _sel_allocWithZone_, zone); - return NSURL._(_ret, retain: false, release: true); - } - - static NSURL alloc() { - final _ret = _objc_msgSend_2(_class_NSURL, _sel_alloc); - return NSURL._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURL, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURL, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12(_class_NSURL, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURL, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63( - _class_NSURL, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64( - _class_NSURL, _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURL, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSURL, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSURL, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSURL = objc.getClass("NSURL"); -late final _sel_initWithScheme_host_path_ = - objc.registerName("initWithScheme:host:path:"); -final _objc_msgSend_27 = 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_initFileURLWithPath_isDirectory_relativeToURL_ = - objc.registerName("initFileURLWithPath:isDirectory:relativeToURL:"); -final _objc_msgSend_28 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); -late final _sel_initFileURLWithPath_relativeToURL_ = - objc.registerName("initFileURLWithPath:relativeToURL:"); -final _objc_msgSend_29 = 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_initFileURLWithPath_isDirectory_ = - objc.registerName("initFileURLWithPath:isDirectory:"); -final _objc_msgSend_30 = 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_initFileURLWithPath_ = - objc.registerName("initFileURLWithPath:"); -final _objc_msgSend_31 = 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_fileURLWithPath_isDirectory_relativeToURL_ = - objc.registerName("fileURLWithPath:isDirectory:relativeToURL:"); -final _objc_msgSend_32 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); -late final _sel_fileURLWithPath_relativeToURL_ = - objc.registerName("fileURLWithPath:relativeToURL:"); -final _objc_msgSend_33 = 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_fileURLWithPath_isDirectory_ = - objc.registerName("fileURLWithPath:isDirectory:"); -final _objc_msgSend_34 = 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_fileURLWithPath_ = objc.registerName("fileURLWithPath:"); -final _objc_msgSend_35 = 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_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_ = - objc.registerName( - "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); -final _objc_msgSend_36 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); -late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_ = - objc.registerName( - "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); -final _objc_msgSend_37 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); -late final _sel_initWithString_ = objc.registerName("initWithString:"); -final _objc_msgSend_38 = 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_relativeToURL_ = - objc.registerName("initWithString:relativeToURL:"); -final _objc_msgSend_39 = 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_URLWithString_ = objc.registerName("URLWithString:"); -late final _sel_URLWithString_relativeToURL_ = - objc.registerName("URLWithString:relativeToURL:"); -late final _sel_initWithString_encodingInvalidCharacters_ = - objc.registerName("initWithString:encodingInvalidCharacters:"); -final _objc_msgSend_40 = 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_URLWithString_encodingInvalidCharacters_ = - objc.registerName("URLWithString:encodingInvalidCharacters:"); -late final _sel_initWithDataRepresentation_relativeToURL_ = - objc.registerName("initWithDataRepresentation:relativeToURL:"); -final _objc_msgSend_41 = 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_URLWithDataRepresentation_relativeToURL_ = - objc.registerName("URLWithDataRepresentation:relativeToURL:"); -final _objc_msgSend_42 = 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_initAbsoluteURLWithDataRepresentation_relativeToURL_ = - objc.registerName("initAbsoluteURLWithDataRepresentation:relativeToURL:"); -late final _sel_absoluteURLWithDataRepresentation_relativeToURL_ = - objc.registerName("absoluteURLWithDataRepresentation:relativeToURL:"); -late final _sel_dataRepresentation = objc.registerName("dataRepresentation"); -final _objc_msgSend_43 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_absoluteString = objc.registerName("absoluteString"); -final _objc_msgSend_44 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_relativeString = objc.registerName("relativeString"); -late final _sel_baseURL = objc.registerName("baseURL"); -final _objc_msgSend_45 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_absoluteURL = objc.registerName("absoluteURL"); -late final _sel_scheme = objc.registerName("scheme"); -late final _sel_resourceSpecifier = objc.registerName("resourceSpecifier"); -late final _sel_host = objc.registerName("host"); - -class NSNumber extends NSValue { - NSNumber._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSNumber] that points to the same underlying object as [other]. - static NSNumber castFrom(T other) { - return NSNumber._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSNumber] that wraps the given raw object pointer. - static NSNumber castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNumber._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSNumber]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSNumber); - } - - @override - NSNumber? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithChar_(int value) { - final _ret = _objc_msgSend_220(this.pointer, _sel_initWithChar_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithUnsignedChar_(int value) { - final _ret = - _objc_msgSend_221(this.pointer, _sel_initWithUnsignedChar_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithShort_(int value) { - final _ret = _objc_msgSend_222(this.pointer, _sel_initWithShort_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithUnsignedShort_(int value) { - final _ret = - _objc_msgSend_223(this.pointer, _sel_initWithUnsignedShort_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithInt_(int value) { - final _ret = _objc_msgSend_224(this.pointer, _sel_initWithInt_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithUnsignedInt_(int value) { - final _ret = - _objc_msgSend_225(this.pointer, _sel_initWithUnsignedInt_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithLong_(int value) { - final _ret = _objc_msgSend_226(this.pointer, _sel_initWithLong_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithUnsignedLong_(int value) { - final _ret = - _objc_msgSend_227(this.pointer, _sel_initWithUnsignedLong_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithLongLong_(int value) { - final _ret = _objc_msgSend_228(this.pointer, _sel_initWithLongLong_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithUnsignedLongLong_(int value) { - final _ret = - _objc_msgSend_229(this.pointer, _sel_initWithUnsignedLongLong_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithFloat_(double value) { - final _ret = _objc_msgSend_230(this.pointer, _sel_initWithFloat_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithDouble_(double value) { - final _ret = _objc_msgSend_231(this.pointer, _sel_initWithDouble_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithBool_(bool value) { - final _ret = _objc_msgSend_232(this.pointer, _sel_initWithBool_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithInteger_(int value) { - final _ret = _objc_msgSend_226(this.pointer, _sel_initWithInteger_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithUnsignedInteger_(int value) { - final _ret = - _objc_msgSend_227(this.pointer, _sel_initWithUnsignedInteger_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - int get charValue { - return _objc_msgSend_233(this.pointer, _sel_charValue); - } - - int get unsignedCharValue { - return _objc_msgSend_234(this.pointer, _sel_unsignedCharValue); - } - - int get shortValue { - return _objc_msgSend_235(this.pointer, _sel_shortValue); - } - - int get unsignedShortValue { - return _objc_msgSend_236(this.pointer, _sel_unsignedShortValue); - } - - int get intValue { - return _objc_msgSend_237(this.pointer, _sel_intValue); - } - - int get unsignedIntValue { - return _objc_msgSend_214(this.pointer, _sel_unsignedIntValue); - } - - int get longValue { - return _objc_msgSend_83(this.pointer, _sel_longValue); - } - - int get unsignedLongValue { - return _objc_msgSend_10(this.pointer, _sel_unsignedLongValue); - } - - int get longLongValue { - return _objc_msgSend_238(this.pointer, _sel_longLongValue); - } - - int get unsignedLongLongValue { - return _objc_msgSend_164(this.pointer, _sel_unsignedLongLongValue); - } - - double get floatValue { - return objc.useMsgSendVariants - ? _objc_msgSend_239Fpret(this.pointer, _sel_floatValue) - : _objc_msgSend_239(this.pointer, _sel_floatValue); - } - - double get doubleValue { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_doubleValue) - : _objc_msgSend_165(this.pointer, _sel_doubleValue); - } - - bool get boolValue { - return _objc_msgSend_12(this.pointer, _sel_boolValue); - } - - int get integerValue { - return _objc_msgSend_83(this.pointer, _sel_integerValue); - } - - int get unsignedIntegerValue { - return _objc_msgSend_10(this.pointer, _sel_unsignedIntegerValue); - } - - NSString get stringValue { - final _ret = _objc_msgSend_21(this.pointer, _sel_stringValue); - return NSString._(_ret, retain: true, release: true); - } - - int compare_(NSNumber otherNumber) { - return _objc_msgSend_240(this.pointer, _sel_compare_, otherNumber.pointer); - } - - bool isEqualToNumber_(NSNumber number) { - return _objc_msgSend_241( - this.pointer, _sel_isEqualToNumber_, number.pointer); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _objc_msgSend_70(this.pointer, _sel_descriptionWithLocale_, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } - - static NSNumber numberWithChar_(int value) { - final _ret = - _objc_msgSend_220(_class_NSNumber, _sel_numberWithChar_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber numberWithUnsignedChar_(int value) { - final _ret = - _objc_msgSend_221(_class_NSNumber, _sel_numberWithUnsignedChar_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber numberWithShort_(int value) { - final _ret = - _objc_msgSend_222(_class_NSNumber, _sel_numberWithShort_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber numberWithUnsignedShort_(int value) { - final _ret = _objc_msgSend_223( - _class_NSNumber, _sel_numberWithUnsignedShort_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber numberWithInt_(int value) { - final _ret = _objc_msgSend_224(_class_NSNumber, _sel_numberWithInt_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber numberWithUnsignedInt_(int value) { - final _ret = - _objc_msgSend_225(_class_NSNumber, _sel_numberWithUnsignedInt_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber numberWithLong_(int value) { - final _ret = - _objc_msgSend_226(_class_NSNumber, _sel_numberWithLong_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber numberWithUnsignedLong_(int value) { - final _ret = - _objc_msgSend_227(_class_NSNumber, _sel_numberWithUnsignedLong_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber numberWithLongLong_(int value) { - final _ret = - _objc_msgSend_228(_class_NSNumber, _sel_numberWithLongLong_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber numberWithUnsignedLongLong_(int value) { - final _ret = _objc_msgSend_229( - _class_NSNumber, _sel_numberWithUnsignedLongLong_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber numberWithFloat_(double value) { - final _ret = - _objc_msgSend_230(_class_NSNumber, _sel_numberWithFloat_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber numberWithDouble_(double value) { - final _ret = - _objc_msgSend_231(_class_NSNumber, _sel_numberWithDouble_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber numberWithBool_(bool value) { - final _ret = - _objc_msgSend_232(_class_NSNumber, _sel_numberWithBool_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber numberWithInteger_(int value) { - final _ret = - _objc_msgSend_226(_class_NSNumber, _sel_numberWithInteger_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber numberWithUnsignedInteger_(int value) { - final _ret = _objc_msgSend_227( - _class_NSNumber, _sel_numberWithUnsignedInteger_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - @override - NSNumber initWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _objc_msgSend_46( - this.pointer, _sel_initWithBytes_objCType_, value, type); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSValue valueWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _objc_msgSend_48( - _class_NSNumber, _sel_valueWithBytes_objCType_, value, type); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue value_withObjCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _objc_msgSend_48( - _class_NSNumber, _sel_value_withObjCType_, value, type); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithNonretainedObject_(NSObject? anObject) { - final _ret = _objc_msgSend_49(_class_NSNumber, - _sel_valueWithNonretainedObject_, anObject?.pointer ?? ffi.nullptr); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithPointer_(ffi.Pointer pointer) { - final _ret = - _objc_msgSend_50(_class_NSNumber, _sel_valueWithPointer_, pointer); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithRange_(_NSRange range) { - final _ret = _objc_msgSend_53(_class_NSNumber, _sel_valueWithRange_, range); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithPoint_(CGPoint point) { - final _ret = _objc_msgSend_55(_class_NSNumber, _sel_valueWithPoint_, point); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithSize_(CGSize size) { - final _ret = _objc_msgSend_56(_class_NSNumber, _sel_valueWithSize_, size); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithRect_(CGRect rect) { - final _ret = _objc_msgSend_57(_class_NSNumber, _sel_valueWithRect_, rect); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithEdgeInsets_(NSEdgeInsets insets) { - final _ret = - _objc_msgSend_58(_class_NSNumber, _sel_valueWithEdgeInsets_, insets); - return NSValue._(_ret, retain: true, release: true); - } - - @override - NSNumber init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber new1() { - final _ret = _objc_msgSend_2(_class_NSNumber, _sel_new); - return NSNumber._(_ret, retain: false, release: true); - } - - static NSNumber allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSNumber, _sel_allocWithZone_, zone); - return NSNumber._(_ret, retain: false, release: true); - } - - static NSNumber alloc() { - final _ret = _objc_msgSend_2(_class_NSNumber, _sel_alloc); - return NSNumber._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSNumber, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSNumber, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSNumber, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSNumber, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSNumber, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSNumber, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSNumber, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSNumber, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSNumber, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSNumber = objc.getClass("NSNumber"); - -class NSValue extends NSObject { - NSValue._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSValue] that points to the same underlying object as [other]. - static NSValue castFrom(T other) { - return NSValue._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSValue] that wraps the given raw object pointer. - static NSValue castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSValue._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSValue]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSValue); - } - - void getValue_size_(ffi.Pointer value, int size) { - _objc_msgSend_22(this.pointer, _sel_getValue_size_, value, size); - } - - ffi.Pointer get objCType { - return _objc_msgSend_13(this.pointer, _sel_objCType); - } - - NSValue initWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _objc_msgSend_46( - this.pointer, _sel_initWithBytes_objCType_, value, type); - return NSValue._(_ret, retain: true, release: true); - } - - NSValue? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _objc_msgSend_48( - _class_NSValue, _sel_valueWithBytes_objCType_, value, type); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue value_withObjCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = - _objc_msgSend_48(_class_NSValue, _sel_value_withObjCType_, value, type); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithNonretainedObject_(NSObject? anObject) { - final _ret = _objc_msgSend_49(_class_NSValue, - _sel_valueWithNonretainedObject_, anObject?.pointer ?? ffi.nullptr); - return NSValue._(_ret, retain: true, release: true); - } - - NSObject? get nonretainedObjectValue { - final _ret = _objc_msgSend_17(this.pointer, _sel_nonretainedObjectValue); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSValue valueWithPointer_(ffi.Pointer pointer) { - final _ret = - _objc_msgSend_50(_class_NSValue, _sel_valueWithPointer_, pointer); - return NSValue._(_ret, retain: true, release: true); - } - - ffi.Pointer get pointerValue { - return _objc_msgSend_20(this.pointer, _sel_pointerValue); - } - - bool isEqualToValue_(NSValue value) { - return _objc_msgSend_51(this.pointer, _sel_isEqualToValue_, value.pointer); - } - - void getValue_(ffi.Pointer value) { - _objc_msgSend_52(this.pointer, _sel_getValue_, value); - } - - static NSValue valueWithRange_(_NSRange range) { - final _ret = _objc_msgSend_53(_class_NSValue, _sel_valueWithRange_, range); - return NSValue._(_ret, retain: true, release: true); - } - - void getRangeValue(ffi.Pointer<_NSRange> stret) { - objc.useMsgSendVariants - ? _objc_msgSend_54Stret(stret, this.pointer, _sel_rangeValue) - : stret.ref = _objc_msgSend_54(this.pointer, _sel_rangeValue); - } - - static NSValue valueWithPoint_(CGPoint point) { - final _ret = _objc_msgSend_55(_class_NSValue, _sel_valueWithPoint_, point); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithSize_(CGSize size) { - final _ret = _objc_msgSend_56(_class_NSValue, _sel_valueWithSize_, size); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithRect_(CGRect rect) { - final _ret = _objc_msgSend_57(_class_NSValue, _sel_valueWithRect_, rect); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithEdgeInsets_(NSEdgeInsets insets) { - final _ret = - _objc_msgSend_58(_class_NSValue, _sel_valueWithEdgeInsets_, insets); - return NSValue._(_ret, retain: true, release: true); - } - - void getPointValue(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_59Stret(stret, this.pointer, _sel_pointValue) - : stret.ref = _objc_msgSend_59(this.pointer, _sel_pointValue); - } - - void getSizeValue(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_60Stret(stret, this.pointer, _sel_sizeValue) - : stret.ref = _objc_msgSend_60(this.pointer, _sel_sizeValue); - } - - void getRectValue(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_61Stret(stret, this.pointer, _sel_rectValue) - : stret.ref = _objc_msgSend_61(this.pointer, _sel_rectValue); - } - - void getEdgeInsetsValue(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_62Stret(stret, this.pointer, _sel_edgeInsetsValue) - : stret.ref = _objc_msgSend_62(this.pointer, _sel_edgeInsetsValue); - } - - @override - NSValue init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue new1() { - final _ret = _objc_msgSend_2(_class_NSValue, _sel_new); - return NSValue._(_ret, retain: false, release: true); - } - - static NSValue allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSValue, _sel_allocWithZone_, zone); - return NSValue._(_ret, retain: false, release: true); - } - - static NSValue alloc() { - final _ret = _objc_msgSend_2(_class_NSValue, _sel_alloc); - return NSValue._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSValue, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSValue, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSValue, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSValue, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSValue, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSValue, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSValue, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSValue, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSValue, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSValue = objc.getClass("NSValue"); -late final _sel_getValue_size_ = objc.registerName("getValue:size:"); -late final _sel_objCType = objc.registerName("objCType"); -late final _sel_initWithBytes_objCType_ = - objc.registerName("initWithBytes:objCType:"); -final _objc_msgSend_46 = 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_initWithCoder_ = objc.registerName("initWithCoder:"); -final _objc_msgSend_47 = 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_valueWithBytes_objCType_ = - objc.registerName("valueWithBytes:objCType:"); -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_value_withObjCType_ = objc.registerName("value:withObjCType:"); -late final _sel_valueWithNonretainedObject_ = - objc.registerName("valueWithNonretainedObject:"); -final _objc_msgSend_49 = 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_nonretainedObjectValue = - objc.registerName("nonretainedObjectValue"); -late final _sel_valueWithPointer_ = objc.registerName("valueWithPointer:"); -final _objc_msgSend_50 = 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_pointerValue = objc.registerName("pointerValue"); -late final _sel_isEqualToValue_ = objc.registerName("isEqualToValue:"); -final _objc_msgSend_51 = 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_getValue_ = objc.registerName("getValue:"); -final _objc_msgSend_52 = 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_valueWithRange_ = objc.registerName("valueWithRange:"); -final _objc_msgSend_53 = 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_rangeValue = objc.registerName("rangeValue"); -final _objc_msgSend_54 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - _NSRange Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_54Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>(); - -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_55 = 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_56 = 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_57 = 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_58 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSEdgeInsets)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSEdgeInsets)>(); -late final _sel_pointValue = objc.registerName("pointValue"); -final _objc_msgSend_59 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - CGPoint Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - CGPoint Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_59Stret = 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_sizeValue = objc.registerName("sizeValue"); -final _objc_msgSend_60 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - CGSize Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - CGSize Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_60Stret = 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_rectValue = objc.registerName("rectValue"); -final _objc_msgSend_61 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - CGRect Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - CGRect Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_61Stret = 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_edgeInsetsValue = objc.registerName("edgeInsetsValue"); -final _objc_msgSend_62 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - NSEdgeInsets Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - NSEdgeInsets Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_62Stret = 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_keyPathsForValuesAffectingValueForKey_ = - objc.registerName("keyPathsForValuesAffectingValueForKey:"); -final _objc_msgSend_63 = 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_64 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -class NSArray extends NSObject { - NSArray._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSArray] that points to the same underlying object as [other]. - static NSArray castFrom(T other) { - return NSArray._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSArray] that wraps the given raw object pointer. - static NSArray castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSArray._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSArray]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSArray); - } - - int get count { - return _objc_msgSend_10(this.pointer, _sel_count); - } - - NSObject objectAtIndex_(int index) { - final _ret = _objc_msgSend_65(this.pointer, _sel_objectAtIndex_, index); - return NSObject._(_ret, retain: true, release: true); - } - - @override - NSArray init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - this.pointer, _sel_initWithObjects_count_, objects, cnt); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSArray arrayByAddingObject_(NSObject anObject) { - final _ret = _objc_msgSend_67( - this.pointer, _sel_arrayByAddingObject_, anObject.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray arrayByAddingObjectsFromArray_(NSArray otherArray) { - final _ret = _objc_msgSend_68( - this.pointer, _sel_arrayByAddingObjectsFromArray_, otherArray.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSString componentsJoinedByString_(NSString separator) { - final _ret = _objc_msgSend_69( - this.pointer, _sel_componentsJoinedByString_, separator.pointer); - return NSString._(_ret, retain: true, release: true); - } - - bool containsObject_(NSObject anObject) { - return _objc_msgSend_0( - this.pointer, _sel_containsObject_, anObject.pointer); - } - - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _objc_msgSend_70(this.pointer, _sel_descriptionWithLocale_, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_indent_(NSObject? locale, int level) { - final _ret = _objc_msgSend_71( - this.pointer, - _sel_descriptionWithLocale_indent_, - locale?.pointer ?? ffi.nullptr, - level); - return NSString._(_ret, retain: true, release: true); - } - - NSObject? firstObjectCommonWithArray_(NSArray otherArray) { - final _ret = _objc_msgSend_72( - this.pointer, _sel_firstObjectCommonWithArray_, otherArray.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - void getObjects_range_( - ffi.Pointer> objects, _NSRange range) { - _objc_msgSend_73(this.pointer, _sel_getObjects_range_, objects, range); - } - - int indexOfObject_(NSObject anObject) { - return _objc_msgSend_74( - this.pointer, _sel_indexOfObject_, anObject.pointer); - } - - int indexOfObject_inRange_(NSObject anObject, _NSRange range) { - return _objc_msgSend_75( - this.pointer, _sel_indexOfObject_inRange_, anObject.pointer, range); - } - - int indexOfObjectIdenticalTo_(NSObject anObject) { - return _objc_msgSend_74( - this.pointer, _sel_indexOfObjectIdenticalTo_, anObject.pointer); - } - - int indexOfObjectIdenticalTo_inRange_(NSObject anObject, _NSRange range) { - return _objc_msgSend_75(this.pointer, - _sel_indexOfObjectIdenticalTo_inRange_, anObject.pointer, range); - } - - bool isEqualToArray_(NSArray otherArray) { - return _objc_msgSend_76( - this.pointer, _sel_isEqualToArray_, otherArray.pointer); - } - - NSObject? get firstObject { - final _ret = _objc_msgSend_17(this.pointer, _sel_firstObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? get lastObject { - final _ret = _objc_msgSend_17(this.pointer, _sel_lastObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSEnumerator objectEnumerator() { - final _ret = _objc_msgSend_77(this.pointer, _sel_objectEnumerator); - return NSEnumerator._(_ret, retain: true, release: true); - } - - NSEnumerator reverseObjectEnumerator() { - final _ret = _objc_msgSend_77(this.pointer, _sel_reverseObjectEnumerator); - return NSEnumerator._(_ret, retain: true, release: true); - } - - NSData get sortedArrayHint { - final _ret = _objc_msgSend_43(this.pointer, _sel_sortedArrayHint); - return NSData._(_ret, retain: true, release: true); - } - - NSArray sortedArrayUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context) { - final _ret = _objc_msgSend_78(this.pointer, - _sel_sortedArrayUsingFunction_context_, comparator, context); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray sortedArrayUsingFunction_context_hint_( - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - NSData? hint) { - final _ret = _objc_msgSend_79( - this.pointer, - _sel_sortedArrayUsingFunction_context_hint_, - comparator, - context, - hint?.pointer ?? ffi.nullptr); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { - final _ret = _objc_msgSend_80( - this.pointer, _sel_sortedArrayUsingSelector_, comparator); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray subarrayWithRange_(_NSRange range) { - final _ret = _objc_msgSend_81(this.pointer, _sel_subarrayWithRange_, range); - return NSArray._(_ret, retain: true, release: true); - } - - bool writeToURL_error_( - NSURL url, ffi.Pointer> error) { - return _objc_msgSend_89( - this.pointer, _sel_writeToURL_error_, url.pointer, error); - } - - void makeObjectsPerformSelector_(ffi.Pointer aSelector) { - _objc_msgSend_7(this.pointer, _sel_makeObjectsPerformSelector_, aSelector); - } - - void makeObjectsPerformSelector_withObject_( - ffi.Pointer aSelector, NSObject? argument) { - _objc_msgSend_90(this.pointer, _sel_makeObjectsPerformSelector_withObject_, - aSelector, argument?.pointer ?? ffi.nullptr); - } - - NSArray objectsAtIndexes_(NSIndexSet indexes) { - final _ret = _objc_msgSend_111( - this.pointer, _sel_objectsAtIndexes_, indexes.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSObject objectAtIndexedSubscript_(int idx) { - final _ret = - _objc_msgSend_65(this.pointer, _sel_objectAtIndexedSubscript_, idx); - return NSObject._(_ret, retain: true, release: true); - } - - void enumerateObjectsUsingBlock_( - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { - _objc_msgSend_112( - this.pointer, _sel_enumerateObjectsUsingBlock_, block.pointer); - } - - void enumerateObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { - _objc_msgSend_113(this.pointer, - _sel_enumerateObjectsWithOptions_usingBlock_, opts, block.pointer); - } - - void enumerateObjectsAtIndexes_options_usingBlock_(NSIndexSet s, int opts, - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { - _objc_msgSend_114( - this.pointer, - _sel_enumerateObjectsAtIndexes_options_usingBlock_, - s.pointer, - opts, - block.pointer); - } - - int indexOfObjectPassingTest_( - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_115( - this.pointer, _sel_indexOfObjectPassingTest_, predicate.pointer); - } - - int indexOfObjectWithOptions_passingTest_( - int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_116(this.pointer, - _sel_indexOfObjectWithOptions_passingTest_, opts, predicate.pointer); - } - - int indexOfObjectAtIndexes_options_passingTest_(NSIndexSet s, int opts, - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_117( - this.pointer, - _sel_indexOfObjectAtIndexes_options_passingTest_, - s.pointer, - opts, - predicate.pointer); - } - - NSIndexSet indexesOfObjectsPassingTest_( - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_118( - this.pointer, _sel_indexesOfObjectsPassingTest_, predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsWithOptions_passingTest_( - int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_119(this.pointer, - _sel_indexesOfObjectsWithOptions_passingTest_, opts, predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_(NSIndexSet s, - int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_120( - this.pointer, - _sel_indexesOfObjectsAtIndexes_options_passingTest_, - s.pointer, - opts, - predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); - } - - NSArray sortedArrayUsingComparator_( - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - final _ret = _objc_msgSend_121( - this.pointer, _sel_sortedArrayUsingComparator_, cmptr.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray sortedArrayWithOptions_usingComparator_(int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - final _ret = _objc_msgSend_122(this.pointer, - _sel_sortedArrayWithOptions_usingComparator_, opts, cmptr.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - int indexOfObject_inSortedRange_options_usingComparator_( - NSObject obj, - _NSRange r, - int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmp) { - return _objc_msgSend_123( - this.pointer, - _sel_indexOfObject_inSortedRange_options_usingComparator_, - obj.pointer, - r, - opts, - cmp.pointer); - } - - static NSArray array() { - final _ret = _objc_msgSend_2(_class_NSArray, _sel_array); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray arrayWithObject_(NSObject anObject) { - final _ret = _objc_msgSend_124( - _class_NSArray, _sel_arrayWithObject_, anObject.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray arrayWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - _class_NSArray, _sel_arrayWithObjects_count_, objects, cnt); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray arrayWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - _class_NSArray, _sel_arrayWithObjects_, firstObj.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray arrayWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(_class_NSArray, _sel_arrayWithArray_, array.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray initWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjects_, firstObj.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray initWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(this.pointer, _sel_initWithArray_, array.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray initWithArray_copyItems_(NSArray array, bool flag) { - final _ret = _objc_msgSend_126( - this.pointer, _sel_initWithArray_copyItems_, array.pointer, flag); - return NSArray._(_ret, retain: false, release: true); - } - - NSArray? initWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_127( - this.pointer, _sel_initWithContentsOfURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - static NSArray? arrayWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_127( - _class_NSArray, _sel_arrayWithContentsOfURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSObject differenceFromArray_withOptions_usingEquivalenceTest_(NSArray other, - int options, ObjCBlock_bool_objcObjCObject_objcObjCObject block) { - final _ret = _objc_msgSend_128( - this.pointer, - _sel_differenceFromArray_withOptions_usingEquivalenceTest_, - other.pointer, - options, - block.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - NSObject differenceFromArray_withOptions_(NSArray other, int options) { - final _ret = _objc_msgSend_129(this.pointer, - _sel_differenceFromArray_withOptions_, other.pointer, options); - return NSObject._(_ret, retain: true, release: true); - } - - NSObject differenceFromArray_(NSArray other) { - final _ret = _objc_msgSend_125( - this.pointer, _sel_differenceFromArray_, other.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - NSArray? arrayByApplyingDifference_(NSObject difference) { - final _ret = _objc_msgSend_130( - this.pointer, _sel_arrayByApplyingDifference_, difference.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - void getObjects_(ffi.Pointer> objects) { - _objc_msgSend_131(this.pointer, _sel_getObjects_, objects); - } - - static NSArray? arrayWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_132( - _class_NSArray, _sel_arrayWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - static NSArray? arrayWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_133( - _class_NSArray, _sel_arrayWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSArray? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_132( - this.pointer, _sel_initWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSArray? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_133( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _objc_msgSend_26(this.pointer, _sel_writeToFile_atomically_, - path.pointer, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _objc_msgSend_134( - this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); - } - - NSArray pathsMatchingExtensions_(NSArray filterTypes) { - final _ret = _objc_msgSend_68( - this.pointer, _sel_pathsMatchingExtensions_, filterTypes.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSObject valueForKey_(NSString key) { - final _ret = _objc_msgSend_31(this.pointer, _sel_valueForKey_, key.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - @override - void setValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - void addObserver_toObjectsAtIndexes_forKeyPath_options_context_( - NSObject observer, - NSIndexSet indexes, - NSString keyPath, - int options, - ffi.Pointer context) { - _objc_msgSend_136( - this.pointer, - _sel_addObserver_toObjectsAtIndexes_forKeyPath_options_context_, - observer.pointer, - indexes.pointer, - keyPath.pointer, - options, - context); - } - - void removeObserver_fromObjectsAtIndexes_forKeyPath_context_( - NSObject observer, - NSIndexSet indexes, - NSString keyPath, - ffi.Pointer context) { - _objc_msgSend_137( - this.pointer, - _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_context_, - observer.pointer, - indexes.pointer, - keyPath.pointer, - context); - } - - void removeObserver_fromObjectsAtIndexes_forKeyPath_( - NSObject observer, NSIndexSet indexes, NSString keyPath) { - _objc_msgSend_138( - this.pointer, - _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_, - observer.pointer, - indexes.pointer, - keyPath.pointer); - } - - @override - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _objc_msgSend_139( - this.pointer, - _sel_addObserver_forKeyPath_options_context_, - observer.pointer, - keyPath.pointer, - options, - context); - } - - @override - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _objc_msgSend_140(this.pointer, _sel_removeObserver_forKeyPath_context_, - observer.pointer, keyPath.pointer, context); - } - - @override - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _objc_msgSend_141(this.pointer, _sel_removeObserver_forKeyPath_, - observer.pointer, keyPath.pointer); - } - - NSArray sortedArrayUsingDescriptors_(NSArray sortDescriptors) { - final _ret = _objc_msgSend_68(this.pointer, - _sel_sortedArrayUsingDescriptors_, sortDescriptors.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray filteredArrayUsingPredicate_(NSPredicate predicate) { - final _ret = _objc_msgSend_219( - this.pointer, _sel_filteredArrayUsingPredicate_, predicate.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray new1() { - final _ret = _objc_msgSend_2(_class_NSArray, _sel_new); - return NSArray._(_ret, retain: false, release: true); - } - - static NSArray allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSArray, _sel_allocWithZone_, zone); - return NSArray._(_ret, retain: false, release: true); - } - - static NSArray alloc() { - final _ret = _objc_msgSend_2(_class_NSArray, _sel_alloc); - return NSArray._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSArray, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSArray, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSArray, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSArray, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSArray, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSArray, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSArray, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSArray, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSArray, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSArray = objc.getClass("NSArray"); -late final _sel_objectAtIndex_ = objc.registerName("objectAtIndex:"); -final _objc_msgSend_65 = 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_initWithObjects_count_ = - objc.registerName("initWithObjects:count:"); -final _objc_msgSend_66 = 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_arrayByAddingObject_ = - objc.registerName("arrayByAddingObject:"); -final _objc_msgSend_67 = 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_arrayByAddingObjectsFromArray_ = - objc.registerName("arrayByAddingObjectsFromArray:"); -final _objc_msgSend_68 = 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_componentsJoinedByString_ = - objc.registerName("componentsJoinedByString:"); -final _objc_msgSend_69 = 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_containsObject_ = objc.registerName("containsObject:"); -late final _sel_descriptionWithLocale_ = - objc.registerName("descriptionWithLocale:"); -final _objc_msgSend_70 = 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_descriptionWithLocale_indent_ = - objc.registerName("descriptionWithLocale:indent:"); -final _objc_msgSend_71 = 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_firstObjectCommonWithArray_ = - objc.registerName("firstObjectCommonWithArray:"); -final _objc_msgSend_72 = 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_getObjects_range_ = objc.registerName("getObjects:range:"); -final _objc_msgSend_73 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - _NSRange)>(); -late final _sel_indexOfObject_ = objc.registerName("indexOfObject:"); -final _objc_msgSend_74 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_indexOfObject_inRange_ = - objc.registerName("indexOfObject:inRange:"); -final _objc_msgSend_75 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_indexOfObjectIdenticalTo_ = - objc.registerName("indexOfObjectIdenticalTo:"); -late final _sel_indexOfObjectIdenticalTo_inRange_ = - objc.registerName("indexOfObjectIdenticalTo:inRange:"); -late final _sel_isEqualToArray_ = objc.registerName("isEqualToArray:"); -final _objc_msgSend_76 = 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_firstObject = objc.registerName("firstObject"); -late final _sel_lastObject = objc.registerName("lastObject"); -late final _sel_objectEnumerator = objc.registerName("objectEnumerator"); -final _objc_msgSend_77 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_reverseObjectEnumerator = - objc.registerName("reverseObjectEnumerator"); -late final _sel_sortedArrayHint = objc.registerName("sortedArrayHint"); -late final _sel_sortedArrayUsingFunction_context_ = - objc.registerName("sortedArrayUsingFunction:context:"); -final _objc_msgSend_78 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); -late final _sel_sortedArrayUsingFunction_context_hint_ = - objc.registerName("sortedArrayUsingFunction:context:hint:"); -final _objc_msgSend_79 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_sortedArrayUsingSelector_ = - objc.registerName("sortedArrayUsingSelector:"); -final _objc_msgSend_80 = 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_subarrayWithRange_ = objc.registerName("subarrayWithRange:"); -final _objc_msgSend_81 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); - -class NSError extends NSObject { - NSError._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSError] that points to the same underlying object as [other]. - static NSError castFrom(T other) { - return NSError._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSError] that wraps the given raw object pointer. - static NSError castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSError._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSError]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSError); - } - - NSError initWithDomain_code_userInfo_( - NSString domain, int code, NSObject? dict) { - final _ret = _objc_msgSend_82( - this.pointer, - _sel_initWithDomain_code_userInfo_, - domain.pointer, - code, - dict?.pointer ?? ffi.nullptr); - return NSError._(_ret, retain: true, release: true); - } - - static NSError errorWithDomain_code_userInfo_( - NSString domain, int code, NSObject? dict) { - final _ret = _objc_msgSend_82( - _class_NSError, - _sel_errorWithDomain_code_userInfo_, - domain.pointer, - code, - dict?.pointer ?? ffi.nullptr); - return NSError._(_ret, retain: true, release: true); - } - - NSString get domain { - final _ret = _objc_msgSend_21(this.pointer, _sel_domain); - return NSString._(_ret, retain: true, release: true); - } - - int get code { - return _objc_msgSend_83(this.pointer, _sel_code); - } - - NSObject get userInfo { - final _ret = _objc_msgSend_2(this.pointer, _sel_userInfo); - return NSObject._(_ret, retain: true, release: true); - } - - NSString get localizedDescription { - final _ret = _objc_msgSend_21(this.pointer, _sel_localizedDescription); - return NSString._(_ret, retain: true, release: true); - } - - NSString? get localizedFailureReason { - final _ret = _objc_msgSend_44(this.pointer, _sel_localizedFailureReason); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get localizedRecoverySuggestion { - final _ret = - _objc_msgSend_44(this.pointer, _sel_localizedRecoverySuggestion); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSArray? get localizedRecoveryOptions { - final _ret = _objc_msgSend_84(this.pointer, _sel_localizedRecoveryOptions); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSObject? get recoveryAttempter { - final _ret = _objc_msgSend_17(this.pointer, _sel_recoveryAttempter); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSString? get helpAnchor { - final _ret = _objc_msgSend_44(this.pointer, _sel_helpAnchor); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSArray get underlyingErrors { - final _ret = _objc_msgSend_85(this.pointer, _sel_underlyingErrors); - return NSArray._(_ret, retain: true, release: true); - } - - static void setUserInfoValueProviderForDomain_provider_(NSString errorDomain, - ObjCBlock_objcObjCObject_NSError_NSString? provider) { - _objc_msgSend_86( - _class_NSError, - _sel_setUserInfoValueProviderForDomain_provider_, - errorDomain.pointer, - provider?.pointer ?? ffi.nullptr); - } - - static ObjCBlock_objcObjCObject_NSError_NSString? - userInfoValueProviderForDomain_( - NSError err, NSString userInfoKey, NSString errorDomain) { - final _ret = _objc_msgSend_87( - _class_NSError, - _sel_userInfoValueProviderForDomain_, - err.pointer, - userInfoKey.pointer, - errorDomain.pointer); - return _ret.address == 0 - ? null - : ObjCBlock_objcObjCObject_NSError_NSString._(_ret, - retain: true, release: true); - } - - @override - NSError init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSError._(_ret, retain: true, release: true); - } - - static NSError new1() { - final _ret = _objc_msgSend_2(_class_NSError, _sel_new); - return NSError._(_ret, retain: false, release: true); - } - - static NSError allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSError, _sel_allocWithZone_, zone); - return NSError._(_ret, retain: false, release: true); - } - - static NSError alloc() { - final _ret = _objc_msgSend_2(_class_NSError, _sel_alloc); - return NSError._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSError, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSError, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSError, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSError, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSError, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSError, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSError, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSError, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSError, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSError = objc.getClass("NSError"); -late final _sel_initWithDomain_code_userInfo_ = - objc.registerName("initWithDomain:code:userInfo:"); -final _objc_msgSend_82 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_errorWithDomain_code_userInfo_ = - objc.registerName("errorWithDomain:code:userInfo:"); -late final _sel_domain = objc.registerName("domain"); -late final _sel_code = objc.registerName("code"); -final _objc_msgSend_83 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_userInfo = objc.registerName("userInfo"); -late final _sel_localizedDescription = - objc.registerName("localizedDescription"); -late final _sel_localizedFailureReason = - objc.registerName("localizedFailureReason"); -late final _sel_localizedRecoverySuggestion = - objc.registerName("localizedRecoverySuggestion"); -late final _sel_localizedRecoveryOptions = - objc.registerName("localizedRecoveryOptions"); -final _objc_msgSend_84 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_recoveryAttempter = objc.registerName("recoveryAttempter"); -late final _sel_helpAnchor = objc.registerName("helpAnchor"); -late final _sel_underlyingErrors = objc.registerName("underlyingErrors"); -final _objc_msgSend_85 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -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); -final _ObjCBlock_objcObjCObject_NSError_NSString_closureRegistry = Function( - ffi.Pointer, ffi.Pointer)>{}; -int _ObjCBlock_objcObjCObject_NSError_NSString_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_objcObjCObject_NSError_NSString_registerClosure( - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_objcObjCObject_NSError_NSString_closureRegistryIndex; - _ObjCBlock_objcObjCObject_NSError_NSString_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer - _ObjCBlock_objcObjCObject_NSError_NSString_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_objcObjCObject_NSError_NSString_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_objcObjCObject_NSError_NSString extends objc.ObjCBlockBase { - ObjCBlock_objcObjCObject_NSError_NSString._( - 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_objcObjCObject_NSError_NSString castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_objcObjCObject_NSError_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. - ObjCBlock_objcObjCObject_NSError_NSString.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_NSError_NSString_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_objcObjCObject_NSError_NSString.fromFunction(NSObject? Function(NSError, NSString) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_NSError_NSString_closureTrampoline) - .cast(), - _ObjCBlock_objcObjCObject_NSError_NSString_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(NSError._(arg0, retain: true, release: true), NSString._(arg1, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr))); - static ffi.Pointer? _dartFuncTrampoline; - - NSObject? call(NSError arg0, NSString arg1) => 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)>() - (pointer, arg0.pointer, arg1.pointer) - .address == - 0 - ? null - : NSObject._( - pointer.ref.invoke - .cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(pointer, arg0.pointer, arg1.pointer), - retain: false, - release: true); -} - -late final _sel_setUserInfoValueProviderForDomain_provider_ = - objc.registerName("setUserInfoValueProviderForDomain:provider:"); -final _objc_msgSend_86 = 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_userInfoValueProviderForDomain_ = - objc.registerName("userInfoValueProviderForDomain:"); -final _objc_msgSend_87 = 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_setKeys_triggerChangeNotificationsForDependentKey_ = - objc.registerName("setKeys:triggerChangeNotificationsForDependentKey:"); -final _objc_msgSend_88 = 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_classFallbacksForKeyedArchiver = - objc.registerName("classFallbacksForKeyedArchiver"); -late final _sel_classForKeyedUnarchiver = - objc.registerName("classForKeyedUnarchiver"); -late final _sel_writeToURL_error_ = objc.registerName("writeToURL:error:"); -final _objc_msgSend_89 = 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_makeObjectsPerformSelector_ = - objc.registerName("makeObjectsPerformSelector:"); -late final _sel_makeObjectsPerformSelector_withObject_ = - objc.registerName("makeObjectsPerformSelector:withObject:"); -final _objc_msgSend_90 = 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)>(); - -class NSIndexSet extends NSObject { - NSIndexSet._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSIndexSet] that points to the same underlying object as [other]. - static NSIndexSet castFrom(T other) { - return NSIndexSet._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSIndexSet] that wraps the given raw object pointer. - static NSIndexSet castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSIndexSet._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSIndexSet]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSIndexSet); - } - - static NSIndexSet indexSet() { - final _ret = _objc_msgSend_2(_class_NSIndexSet, _sel_indexSet); - return NSIndexSet._(_ret, retain: true, release: true); - } - - static NSIndexSet indexSetWithIndex_(int value) { - final _ret = - _objc_msgSend_65(_class_NSIndexSet, _sel_indexSetWithIndex_, value); - return NSIndexSet._(_ret, retain: true, release: true); - } - - static NSIndexSet indexSetWithIndexesInRange_(_NSRange range) { - final _ret = _objc_msgSend_91( - _class_NSIndexSet, _sel_indexSetWithIndexesInRange_, range); - return NSIndexSet._(_ret, retain: true, release: true); - } - - NSIndexSet initWithIndexesInRange_(_NSRange range) { - final _ret = - _objc_msgSend_91(this.pointer, _sel_initWithIndexesInRange_, range); - return NSIndexSet._(_ret, retain: true, release: true); - } - - NSIndexSet initWithIndexSet_(NSIndexSet indexSet) { - final _ret = _objc_msgSend_92( - this.pointer, _sel_initWithIndexSet_, indexSet.pointer); - return NSIndexSet._(_ret, retain: true, release: true); - } - - NSIndexSet initWithIndex_(int value) { - final _ret = _objc_msgSend_65(this.pointer, _sel_initWithIndex_, value); - return NSIndexSet._(_ret, retain: true, release: true); - } - - bool isEqualToIndexSet_(NSIndexSet indexSet) { - return _objc_msgSend_93( - this.pointer, _sel_isEqualToIndexSet_, indexSet.pointer); - } - - int get count { - return _objc_msgSend_10(this.pointer, _sel_count); - } - - int get firstIndex { - return _objc_msgSend_10(this.pointer, _sel_firstIndex); - } - - int get lastIndex { - return _objc_msgSend_10(this.pointer, _sel_lastIndex); - } - - int indexGreaterThanIndex_(int value) { - return _objc_msgSend_94(this.pointer, _sel_indexGreaterThanIndex_, value); - } - - int indexLessThanIndex_(int value) { - return _objc_msgSend_94(this.pointer, _sel_indexLessThanIndex_, value); - } - - int indexGreaterThanOrEqualToIndex_(int value) { - return _objc_msgSend_94( - this.pointer, _sel_indexGreaterThanOrEqualToIndex_, value); - } - - int indexLessThanOrEqualToIndex_(int value) { - return _objc_msgSend_94( - this.pointer, _sel_indexLessThanOrEqualToIndex_, value); - } - - int getIndexes_maxCount_inIndexRange_( - ffi.Pointer indexBuffer, - int bufferSize, - ffi.Pointer<_NSRange> range) { - return _objc_msgSend_95(this.pointer, - _sel_getIndexes_maxCount_inIndexRange_, indexBuffer, bufferSize, range); - } - - int countOfIndexesInRange_(_NSRange range) { - return _objc_msgSend_96(this.pointer, _sel_countOfIndexesInRange_, range); - } - - bool containsIndex_(int value) { - return _objc_msgSend_97(this.pointer, _sel_containsIndex_, value); - } - - bool containsIndexesInRange_(_NSRange range) { - return _objc_msgSend_98(this.pointer, _sel_containsIndexesInRange_, range); - } - - bool containsIndexes_(NSIndexSet indexSet) { - return _objc_msgSend_93( - this.pointer, _sel_containsIndexes_, indexSet.pointer); - } - - bool intersectsIndexesInRange_(_NSRange range) { - return _objc_msgSend_98( - this.pointer, _sel_intersectsIndexesInRange_, range); - } - - void enumerateIndexesUsingBlock_( - ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { - _objc_msgSend_99( - this.pointer, _sel_enumerateIndexesUsingBlock_, block.pointer); - } - - void enumerateIndexesWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { - _objc_msgSend_100(this.pointer, - _sel_enumerateIndexesWithOptions_usingBlock_, opts, block.pointer); - } - - void enumerateIndexesInRange_options_usingBlock_( - _NSRange range, int opts, ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { - _objc_msgSend_101( - this.pointer, - _sel_enumerateIndexesInRange_options_usingBlock_, - range, - opts, - block.pointer); - } - - int indexPassingTest_(ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_102( - this.pointer, _sel_indexPassingTest_, predicate.pointer); - } - - int indexWithOptions_passingTest_( - int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_103(this.pointer, _sel_indexWithOptions_passingTest_, - opts, predicate.pointer); - } - - int indexInRange_options_passingTest_( - _NSRange range, int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_104(this.pointer, - _sel_indexInRange_options_passingTest_, range, opts, predicate.pointer); - } - - NSIndexSet indexesPassingTest_( - ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_105( - this.pointer, _sel_indexesPassingTest_, predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); - } - - NSIndexSet indexesWithOptions_passingTest_( - int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_106(this.pointer, - _sel_indexesWithOptions_passingTest_, opts, predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); - } - - NSIndexSet indexesInRange_options_passingTest_( - _NSRange range, int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_107( - this.pointer, - _sel_indexesInRange_options_passingTest_, - range, - opts, - predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); - } - - void enumerateRangesUsingBlock_(ObjCBlock_ffiVoid_NSRange_bool block) { - _objc_msgSend_108( - this.pointer, _sel_enumerateRangesUsingBlock_, block.pointer); - } - - void enumerateRangesWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_NSRange_bool block) { - _objc_msgSend_109(this.pointer, _sel_enumerateRangesWithOptions_usingBlock_, - opts, block.pointer); - } - - void enumerateRangesInRange_options_usingBlock_( - _NSRange range, int opts, ObjCBlock_ffiVoid_NSRange_bool block) { - _objc_msgSend_110( - this.pointer, - _sel_enumerateRangesInRange_options_usingBlock_, - range, - opts, - block.pointer); - } - - @override - NSIndexSet init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSIndexSet._(_ret, retain: true, release: true); - } - - static NSIndexSet new1() { - final _ret = _objc_msgSend_2(_class_NSIndexSet, _sel_new); - return NSIndexSet._(_ret, retain: false, release: true); - } - - static NSIndexSet allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSIndexSet, _sel_allocWithZone_, zone); - return NSIndexSet._(_ret, retain: false, release: true); - } - - static NSIndexSet alloc() { - final _ret = _objc_msgSend_2(_class_NSIndexSet, _sel_alloc); - return NSIndexSet._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSIndexSet, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSIndexSet, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSIndexSet, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSIndexSet, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSIndexSet, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSIndexSet, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSIndexSet, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSIndexSet, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSIndexSet, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSIndexSet = objc.getClass("NSIndexSet"); -late final _sel_indexSet = objc.registerName("indexSet"); -late final _sel_indexSetWithIndex_ = objc.registerName("indexSetWithIndex:"); -late final _sel_indexSetWithIndexesInRange_ = - objc.registerName("indexSetWithIndexesInRange:"); -final _objc_msgSend_91 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); -late final _sel_initWithIndexesInRange_ = - objc.registerName("initWithIndexesInRange:"); -late final _sel_initWithIndexSet_ = objc.registerName("initWithIndexSet:"); -final _objc_msgSend_92 = 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_initWithIndex_ = objc.registerName("initWithIndex:"); -late final _sel_isEqualToIndexSet_ = objc.registerName("isEqualToIndexSet:"); -final _objc_msgSend_93 = 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_firstIndex = objc.registerName("firstIndex"); -late final _sel_lastIndex = objc.registerName("lastIndex"); -late final _sel_indexGreaterThanIndex_ = - objc.registerName("indexGreaterThanIndex:"); -final _objc_msgSend_94 = 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_indexLessThanIndex_ = objc.registerName("indexLessThanIndex:"); -late final _sel_indexGreaterThanOrEqualToIndex_ = - objc.registerName("indexGreaterThanOrEqualToIndex:"); -late final _sel_indexLessThanOrEqualToIndex_ = - objc.registerName("indexLessThanOrEqualToIndex:"); -late final _sel_getIndexes_maxCount_inIndexRange_ = - objc.registerName("getIndexes:maxCount:inIndexRange:"); -final _objc_msgSend_95 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_NSRange>)>(); -late final _sel_countOfIndexesInRange_ = - objc.registerName("countOfIndexesInRange:"); -final _objc_msgSend_96 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); -late final _sel_containsIndex_ = objc.registerName("containsIndex:"); -final _objc_msgSend_97 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_containsIndexesInRange_ = - objc.registerName("containsIndexesInRange:"); -final _objc_msgSend_98 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); -late final _sel_containsIndexes_ = objc.registerName("containsIndexes:"); -late final _sel_intersectsIndexesInRange_ = - objc.registerName("intersectsIndexesInRange:"); -void _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_fnPtrTrampoline( - ffi.Pointer block, - int arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( - void Function(int, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer block, - int arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ffiUnsignedLong_bool extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_ffiUnsignedLong_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_ffiUnsignedLong_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_ffiUnsignedLong_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiUnsignedLong_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiUnsignedLong_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_ffiUnsignedLong_bool.fromFunction( - void Function(int, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( - (int arg0, ffi.Pointer arg1) => fn(arg0, arg1)))); - 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_ffiUnsignedLong_bool.listener( - void Function(int, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( - (int arg0, ffi.Pointer arg1) => fn(arg0, arg1)))); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(int arg0, ffi.Pointer arg1) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, int, - ffi.Pointer)>()(pointer, arg0, arg1); -} - -late final _sel_enumerateIndexesUsingBlock_ = - objc.registerName("enumerateIndexesUsingBlock:"); -final _objc_msgSend_99 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSEnumerationOptions { - static const int NSEnumerationConcurrent = 1; - static const int NSEnumerationReverse = 2; -} - -late final _sel_enumerateIndexesWithOptions_usingBlock_ = - objc.registerName("enumerateIndexesWithOptions:usingBlock:"); -final _objc_msgSend_100 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_enumerateIndexesInRange_options_usingBlock_ = - objc.registerName("enumerateIndexesInRange:options:usingBlock:"); -final _objc_msgSend_101 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); -bool _ObjCBlock_bool_ffiUnsignedLong_bool_fnPtrTrampoline( - ffi.Pointer block, - int arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction)>()(arg0, arg1); -final _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry = - )>{}; -int _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_ffiUnsignedLong_bool_registerClosure( - bool Function(int, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer block, - int arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_bool_ffiUnsignedLong_bool extends objc.ObjCBlockBase { - ObjCBlock_bool_ffiUnsignedLong_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_bool_ffiUnsignedLong_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_bool_ffiUnsignedLong_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_ffiUnsignedLong_bool.fromFunctionPointer( - ffi.Pointer< - ffi - .NativeFunction< - ffi.Bool Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_bool_ffiUnsignedLong_bool_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_ffiUnsignedLong_bool.fromFunction( - bool Function(int, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_bool_ffiUnsignedLong_bool_closureTrampoline, - false) - .cast(), - _ObjCBlock_bool_ffiUnsignedLong_bool_registerClosure( - (int arg0, ffi.Pointer arg1) => fn(arg0, arg1)))); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(int arg0, ffi.Pointer arg1) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer block, - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer, int, - ffi.Pointer)>()(pointer, arg0, arg1); -} - -late final _sel_indexPassingTest_ = objc.registerName("indexPassingTest:"); -final _objc_msgSend_102 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_indexWithOptions_passingTest_ = - objc.registerName("indexWithOptions:passingTest:"); -final _objc_msgSend_103 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_indexInRange_options_passingTest_ = - objc.registerName("indexInRange:options:passingTest:"); -final _objc_msgSend_104 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); -late final _sel_indexesPassingTest_ = objc.registerName("indexesPassingTest:"); -final _objc_msgSend_105 = 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_indexesWithOptions_passingTest_ = - objc.registerName("indexesWithOptions:passingTest:"); -final _objc_msgSend_106 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_indexesInRange_options_passingTest_ = - objc.registerName("indexesInRange:options:passingTest:"); -final _objc_msgSend_107 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); -void _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline( - ffi.Pointer block, - _NSRange arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(_NSRange arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(_NSRange, ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( - void Function(_NSRange, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline( - ffi.Pointer block, - _NSRange arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_ffiVoid_NSRange_bool extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSRange_bool._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSRange_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSRange_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSRange_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(_NSRange arg0, ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSRange_bool.fromFunction( - void Function(_NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( - (_NSRange arg0, ffi.Pointer arg1) => - fn(arg0, arg1)))); - 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_NSRange_bool.listener( - void Function(_NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( - (_NSRange arg0, ffi.Pointer arg1) => - fn(arg0, arg1)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, _NSRange, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(_NSRange arg0, ffi.Pointer arg1) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - _NSRange arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, _NSRange, - ffi.Pointer)>()(pointer, arg0, arg1); -} - -late final _sel_enumerateRangesUsingBlock_ = - objc.registerName("enumerateRangesUsingBlock:"); -final _objc_msgSend_108 = 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_enumerateRangesWithOptions_usingBlock_ = - objc.registerName("enumerateRangesWithOptions:usingBlock:"); -final _objc_msgSend_109 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_enumerateRangesInRange_options_usingBlock_ = - objc.registerName("enumerateRangesInRange:options:usingBlock:"); -final _objc_msgSend_110 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); -late final _sel_objectsAtIndexes_ = objc.registerName("objectsAtIndexes:"); -final _objc_msgSend_111 = 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_objectAtIndexedSubscript_ = - objc.registerName("objectAtIndexedSubscript:"); -void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_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); -final _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry = - , int, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( - void Function(ffi.Pointer, int, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = - fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool - extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1, ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.fromFunction( - void Function(NSObject, int, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.listener( - void Function(NSObject, int, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject arg0, int 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, arg1, arg2); -} - -late final _sel_enumerateObjectsUsingBlock_ = - objc.registerName("enumerateObjectsUsingBlock:"); -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_enumerateObjectsWithOptions_usingBlock_ = - objc.registerName("enumerateObjectsWithOptions:usingBlock:"); -final _objc_msgSend_113 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_enumerateObjectsAtIndexes_options_usingBlock_ = - objc.registerName("enumerateObjectsAtIndexes:options:usingBlock:"); -final _objc_msgSend_114 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() - .asFunction< - bool Function(ffi.Pointer, int, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry = - , int, ffi.Pointer)>{}; -int _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_registerClosure( - bool Function(ffi.Pointer, int, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool - extends objc.ObjCBlockBase { - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_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_bool_objcObjCObject_ffiUnsignedLong_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1, ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_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_objcObjCObject_ffiUnsignedLong_bool.fromFunction( - bool Function(NSObject, int, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_registerClosure( - (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => - fn(NSObject._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, int arg1, ffi.Pointer arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.UnsignedLong arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>()(pointer, arg0.pointer, arg1, arg2); -} - -late final _sel_indexOfObjectPassingTest_ = - objc.registerName("indexOfObjectPassingTest:"); -final _objc_msgSend_115 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_indexOfObjectWithOptions_passingTest_ = - objc.registerName("indexOfObjectWithOptions:passingTest:"); -final _objc_msgSend_116 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_indexOfObjectAtIndexes_options_passingTest_ = - objc.registerName("indexOfObjectAtIndexes:options:passingTest:"); -final _objc_msgSend_117 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_indexesOfObjectsPassingTest_ = - objc.registerName("indexesOfObjectsPassingTest:"); -final _objc_msgSend_118 = 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_indexesOfObjectsWithOptions_passingTest_ = - objc.registerName("indexesOfObjectsWithOptions:passingTest:"); -final _objc_msgSend_119 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_indexesOfObjectsAtIndexes_options_passingTest_ = - objc.registerName("indexesOfObjectsAtIndexes:options:passingTest:"); -final _objc_msgSend_120 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_registerClosure( - int Function(ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistryIndex; - _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry[ - id] = fn; - return ffi.Pointer.fromAddress(id); -} - -int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject - extends objc.ObjCBlockBase { - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._( - 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_NSComparisonResult_objcObjCObject_objcObjCObject - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._(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_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline, - 0) - .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_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunction( - int Function(NSObject, NSObject) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline, 0) - .cast(), - _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(NSObject._(arg0, retain: true, release: true), NSObject._(arg1, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - int call(NSObject arg0, NSObject arg1) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, arg0.pointer, arg1.pointer); -} - -abstract class NSComparisonResult { - static const int NSOrderedAscending = -1; - static const int NSOrderedSame = 0; - static const int NSOrderedDescending = 1; -} - -late final _sel_sortedArrayUsingComparator_ = - objc.registerName("sortedArrayUsingComparator:"); -final _objc_msgSend_121 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSSortOptions { - static const int NSSortConcurrent = 1; - static const int NSSortStable = 16; -} - -late final _sel_sortedArrayWithOptions_usingComparator_ = - objc.registerName("sortedArrayWithOptions:usingComparator:"); -final _objc_msgSend_122 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - -abstract class NSBinarySearchingOptions { - static const int NSBinarySearchingFirstEqual = 256; - static const int NSBinarySearchingLastEqual = 512; - static const int NSBinarySearchingInsertionIndex = 1024; -} - -late final _sel_indexOfObject_inSortedRange_options_usingComparator_ = - objc.registerName("indexOfObject:inSortedRange:options:usingComparator:"); -final _objc_msgSend_123 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); -late final _sel_array = objc.registerName("array"); -late final _sel_arrayWithObject_ = objc.registerName("arrayWithObject:"); -final _objc_msgSend_124 = 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_arrayWithObjects_count_ = - objc.registerName("arrayWithObjects:count:"); -late final _sel_arrayWithObjects_ = objc.registerName("arrayWithObjects:"); -late final _sel_arrayWithArray_ = objc.registerName("arrayWithArray:"); -final _objc_msgSend_125 = 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_initWithObjects_ = objc.registerName("initWithObjects:"); -late final _sel_initWithArray_ = objc.registerName("initWithArray:"); -late final _sel_initWithArray_copyItems_ = - objc.registerName("initWithArray:copyItems:"); -final _objc_msgSend_126 = 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_initWithContentsOfURL_error_ = - objc.registerName("initWithContentsOfURL:error:"); -final _objc_msgSend_127 = 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_arrayWithContentsOfURL_error_ = - objc.registerName("arrayWithContentsOfURL:error:"); - -abstract class NSOrderedCollectionDifferenceCalculationOptions { - static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = - 1; - static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = - 2; - static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; -} - -bool _ObjCBlock_bool_objcObjCObject_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); -final _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_bool_objcObjCObject_objcObjCObject_registerClosure( - bool Function( - ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistryIndex; - _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_bool_objcObjCObject_objcObjCObject extends objc.ObjCBlockBase { - ObjCBlock_bool_objcObjCObject_objcObjCObject._( - 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_objcObjCObject_objcObjCObject castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_bool_objcObjCObject_objcObjCObject._(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_objcObjCObject_objcObjCObject.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_objcObjCObject_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_objcObjCObject_objcObjCObject.fromFunction( - bool Function(NSObject, NSObject) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_objcObjCObject_objcObjCObject_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSObject._(arg0, retain: true, release: true), NSObject._(arg1, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, NSObject 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_differenceFromArray_withOptions_usingEquivalenceTest_ = - objc.registerName("differenceFromArray:withOptions:usingEquivalenceTest:"); -final _objc_msgSend_128 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_differenceFromArray_withOptions_ = - objc.registerName("differenceFromArray:withOptions:"); -final _objc_msgSend_129 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_differenceFromArray_ = - objc.registerName("differenceFromArray:"); -late final _sel_arrayByApplyingDifference_ = - objc.registerName("arrayByApplyingDifference:"); -final _objc_msgSend_130 = 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_getObjects_ = objc.registerName("getObjects:"); -final _objc_msgSend_131 = 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_arrayWithContentsOfFile_ = - objc.registerName("arrayWithContentsOfFile:"); -final _objc_msgSend_132 = 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_arrayWithContentsOfURL_ = - objc.registerName("arrayWithContentsOfURL:"); -final _objc_msgSend_133 = 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_initWithContentsOfFile_ = - objc.registerName("initWithContentsOfFile:"); -late final _sel_initWithContentsOfURL_ = - objc.registerName("initWithContentsOfURL:"); -late final _sel_writeToURL_atomically_ = - objc.registerName("writeToURL:atomically:"); -final _objc_msgSend_134 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_pathsMatchingExtensions_ = - objc.registerName("pathsMatchingExtensions:"); -late final _sel_valueForKey_ = objc.registerName("valueForKey:"); -late final _sel_setValue_forKey_ = objc.registerName("setValue:forKey:"); -final _objc_msgSend_135 = 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)>(); - -abstract class NSKeyValueObservingOptions { - static const int NSKeyValueObservingOptionNew = 1; - static const int NSKeyValueObservingOptionOld = 2; - static const int NSKeyValueObservingOptionInitial = 4; - static const int NSKeyValueObservingOptionPrior = 8; -} - -late final _sel_addObserver_toObjectsAtIndexes_forKeyPath_options_context_ = - objc.registerName( - "addObserver:toObjectsAtIndexes:forKeyPath:options:context:"); -final _objc_msgSend_136 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_context_ = objc - .registerName("removeObserver:fromObjectsAtIndexes:forKeyPath:context:"); -final _objc_msgSend_137 = 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)>(); -late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_ = - objc.registerName("removeObserver:fromObjectsAtIndexes:forKeyPath:"); -final _objc_msgSend_138 = 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_addObserver_forKeyPath_options_context_ = - objc.registerName("addObserver:forKeyPath:options:context:"); -final _objc_msgSend_139 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_removeObserver_forKeyPath_context_ = - objc.registerName("removeObserver:forKeyPath:context:"); -final _objc_msgSend_140 = 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_removeObserver_forKeyPath_ = - objc.registerName("removeObserver:forKeyPath:"); -final _objc_msgSend_141 = 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_sortedArrayUsingDescriptors_ = - objc.registerName("sortedArrayUsingDescriptors:"); - -class NSPredicate extends NSObject { - NSPredicate._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSPredicate] that points to the same underlying object as [other]. - static NSPredicate castFrom(T other) { - return NSPredicate._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSPredicate] that wraps the given raw object pointer. - static NSPredicate castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPredicate._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSPredicate]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSPredicate); - } - - static NSPredicate predicateWithFormat_argumentArray_( - NSString predicateFormat, NSArray? arguments) { - final _ret = _objc_msgSend_142( - _class_NSPredicate, - _sel_predicateWithFormat_argumentArray_, - predicateFormat.pointer, - arguments?.pointer ?? ffi.nullptr); - return NSPredicate._(_ret, retain: true, release: true); - } - - static NSPredicate predicateWithFormat_(NSString predicateFormat) { - final _ret = _objc_msgSend_143( - _class_NSPredicate, _sel_predicateWithFormat_, predicateFormat.pointer); - return NSPredicate._(_ret, retain: true, release: true); - } - - static NSPredicate predicateWithFormat_arguments_( - NSString predicateFormat, ffi.Pointer<__va_list_tag> argList) { - final _ret = _objc_msgSend_144(_class_NSPredicate, - _sel_predicateWithFormat_arguments_, predicateFormat.pointer, argList); - return NSPredicate._(_ret, retain: true, release: true); - } - - static NSPredicate? predicateFromMetadataQueryString_(NSString queryString) { - final _ret = _objc_msgSend_145(_class_NSPredicate, - _sel_predicateFromMetadataQueryString_, queryString.pointer); - return _ret.address == 0 - ? null - : NSPredicate._(_ret, retain: true, release: true); - } - - static NSPredicate predicateWithValue_(bool value) { - final _ret = - _objc_msgSend_146(_class_NSPredicate, _sel_predicateWithValue_, value); - return NSPredicate._(_ret, retain: true, release: true); - } - - static NSPredicate predicateWithBlock_( - ObjCBlock_bool_objcObjCObject_NSDictionary block) { - final _ret = _objc_msgSend_216( - _class_NSPredicate, _sel_predicateWithBlock_, block.pointer); - return NSPredicate._(_ret, retain: true, release: true); - } - - NSString get predicateFormat { - final _ret = _objc_msgSend_21(this.pointer, _sel_predicateFormat); - return NSString._(_ret, retain: true, release: true); - } - - NSPredicate predicateWithSubstitutionVariables_(NSDictionary variables) { - final _ret = _objc_msgSend_159(this.pointer, - _sel_predicateWithSubstitutionVariables_, variables.pointer); - return NSPredicate._(_ret, retain: true, release: true); - } - - bool evaluateWithObject_(NSObject? object) { - return _objc_msgSend_217( - this.pointer, _sel_evaluateWithObject_, object?.pointer ?? ffi.nullptr); - } - - bool evaluateWithObject_substitutionVariables_( - NSObject? object, NSDictionary? bindings) { - return _objc_msgSend_218( - this.pointer, - _sel_evaluateWithObject_substitutionVariables_, - object?.pointer ?? ffi.nullptr, - bindings?.pointer ?? ffi.nullptr); - } - - void allowEvaluation() { - _objc_msgSend_1(this.pointer, _sel_allowEvaluation); - } - - @override - NSPredicate init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSPredicate._(_ret, retain: true, release: true); - } - - static NSPredicate new1() { - final _ret = _objc_msgSend_2(_class_NSPredicate, _sel_new); - return NSPredicate._(_ret, retain: false, release: true); - } - - static NSPredicate allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSPredicate, _sel_allocWithZone_, zone); - return NSPredicate._(_ret, retain: false, release: true); - } - - static NSPredicate alloc() { - final _ret = _objc_msgSend_2(_class_NSPredicate, _sel_alloc); - return NSPredicate._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSPredicate, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSPredicate, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSPredicate, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSPredicate, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSPredicate, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSPredicate, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSPredicate, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSPredicate, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSPredicate, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSPredicate = objc.getClass("NSPredicate"); -late final _sel_predicateWithFormat_argumentArray_ = - objc.registerName("predicateWithFormat:argumentArray:"); -final _objc_msgSend_142 = 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_predicateWithFormat_ = - objc.registerName("predicateWithFormat:"); -final _objc_msgSend_143 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -final class __va_list_tag extends ffi.Struct { - @ffi.UnsignedInt() - external int gp_offset; - - @ffi.UnsignedInt() - external int fp_offset; - - external ffi.Pointer overflow_arg_area; - - external ffi.Pointer reg_save_area; -} - -late final _sel_predicateWithFormat_arguments_ = - objc.registerName("predicateWithFormat:arguments:"); -final _objc_msgSend_144 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); -late final _sel_predicateFromMetadataQueryString_ = - objc.registerName("predicateFromMetadataQueryString:"); -final _objc_msgSend_145 = 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_predicateWithValue_ = objc.registerName("predicateWithValue:"); -final _objc_msgSend_146 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, bool)>(); -bool _ObjCBlock_bool_objcObjCObject_NSDictionary_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); -final _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_bool_objcObjCObject_NSDictionary_registerClosure( - bool Function( - ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistryIndex; - _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_objcObjCObject_NSDictionary_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_bool_objcObjCObject_NSDictionary extends objc.ObjCBlockBase { - ObjCBlock_bool_objcObjCObject_NSDictionary._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_objcObjCObject_NSDictionary castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_bool_objcObjCObject_NSDictionary._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_objcObjCObject_NSDictionary.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_NSDictionary_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_objcObjCObject_NSDictionary.fromFunction( - bool Function(NSObject?, NSDictionary?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_NSDictionary_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_objcObjCObject_NSDictionary_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0.address == 0 ? null : NSObject._(arg0, retain: true, release: true), arg1.address == 0 ? null : NSDictionary._(arg1, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject? arg0, NSDictionary? 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 ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr); -} - -class NSDictionary extends NSObject { - NSDictionary._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSDictionary] that points to the same underlying object as [other]. - static NSDictionary castFrom(T other) { - return NSDictionary._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSDictionary] that wraps the given raw object pointer. - static NSDictionary castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDictionary._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSDictionary]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSDictionary); - } - - int get count { - return _objc_msgSend_10(this.pointer, _sel_count); - } - - NSObject? objectForKey_(NSObject aKey) { - final _ret = - _objc_msgSend_16(this.pointer, _sel_objectForKey_, aKey.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSEnumerator keyEnumerator() { - final _ret = _objc_msgSend_77(this.pointer, _sel_keyEnumerator); - return NSEnumerator._(_ret, retain: true, release: true); - } - - @override - NSDictionary init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSDictionary._(_ret, retain: true, release: true); - } - - NSDictionary initWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _objc_msgSend_147( - this.pointer, _sel_initWithObjects_forKeys_count_, objects, keys, cnt); - return NSDictionary._(_ret, retain: true, release: true); - } - - NSDictionary? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSArray get allKeys { - final _ret = _objc_msgSend_85(this.pointer, _sel_allKeys); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray allKeysForObject_(NSObject anObject) { - final _ret = _objc_msgSend_67( - this.pointer, _sel_allKeysForObject_, anObject.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get allValues { - final _ret = _objc_msgSend_85(this.pointer, _sel_allValues); - return NSArray._(_ret, retain: true, release: true); - } - - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - NSString get descriptionInStringsFileFormat { - final _ret = - _objc_msgSend_21(this.pointer, _sel_descriptionInStringsFileFormat); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _objc_msgSend_70(this.pointer, _sel_descriptionWithLocale_, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_indent_(NSObject? locale, int level) { - final _ret = _objc_msgSend_71( - this.pointer, - _sel_descriptionWithLocale_indent_, - locale?.pointer ?? ffi.nullptr, - level); - return NSString._(_ret, retain: true, release: true); - } - - bool isEqualToDictionary_(NSDictionary otherDictionary) { - return _objc_msgSend_148( - this.pointer, _sel_isEqualToDictionary_, otherDictionary.pointer); - } - - NSEnumerator objectEnumerator() { - final _ret = _objc_msgSend_77(this.pointer, _sel_objectEnumerator); - return NSEnumerator._(_ret, retain: true, release: true); - } - - NSArray objectsForKeys_notFoundMarker_(NSArray keys, NSObject marker) { - final _ret = _objc_msgSend_149(this.pointer, - _sel_objectsForKeys_notFoundMarker_, keys.pointer, marker.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - bool writeToURL_error_( - NSURL url, ffi.Pointer> error) { - return _objc_msgSend_89( - this.pointer, _sel_writeToURL_error_, url.pointer, error); - } - - NSArray keysSortedByValueUsingSelector_( - ffi.Pointer comparator) { - final _ret = _objc_msgSend_80( - this.pointer, _sel_keysSortedByValueUsingSelector_, comparator); - return NSArray._(_ret, retain: true, release: true); - } - - void getObjects_andKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int count) { - _objc_msgSend_150( - this.pointer, _sel_getObjects_andKeys_count_, objects, keys, count); - } - - NSObject? objectForKeyedSubscript_(NSObject key) { - final _ret = _objc_msgSend_16( - this.pointer, _sel_objectForKeyedSubscript_, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - void enumerateKeysAndObjectsUsingBlock_( - ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool block) { - _objc_msgSend_151( - this.pointer, _sel_enumerateKeysAndObjectsUsingBlock_, block.pointer); - } - - void enumerateKeysAndObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool block) { - _objc_msgSend_152( - this.pointer, - _sel_enumerateKeysAndObjectsWithOptions_usingBlock_, - opts, - block.pointer); - } - - NSArray keysSortedByValueUsingComparator_( - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - final _ret = _objc_msgSend_121( - this.pointer, _sel_keysSortedByValueUsingComparator_, cmptr.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray keysSortedByValueWithOptions_usingComparator_(int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - final _ret = _objc_msgSend_122( - this.pointer, - _sel_keysSortedByValueWithOptions_usingComparator_, - opts, - cmptr.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSObject keysOfEntriesPassingTest_( - ObjCBlock_bool_objcObjCObject_objcObjCObject_bool predicate) { - final _ret = _objc_msgSend_153( - this.pointer, _sel_keysOfEntriesPassingTest_, predicate.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - NSObject keysOfEntriesWithOptions_passingTest_( - int opts, ObjCBlock_bool_objcObjCObject_objcObjCObject_bool predicate) { - final _ret = _objc_msgSend_154(this.pointer, - _sel_keysOfEntriesWithOptions_passingTest_, opts, predicate.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - void getObjects_andKeys_(ffi.Pointer> objects, - ffi.Pointer> keys) { - _objc_msgSend_155(this.pointer, _sel_getObjects_andKeys_, objects, keys); - } - - static NSDictionary? dictionaryWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_156( - _class_NSDictionary, _sel_dictionaryWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - static NSDictionary? dictionaryWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_157( - _class_NSDictionary, _sel_dictionaryWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSDictionary? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_156( - this.pointer, _sel_initWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSDictionary? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_157( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _objc_msgSend_26(this.pointer, _sel_writeToFile_atomically_, - path.pointer, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _objc_msgSend_134( - this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); - } - - static NSDictionary dictionary() { - final _ret = _objc_msgSend_2(_class_NSDictionary, _sel_dictionary); - return NSDictionary._(_ret, retain: true, release: true); - } - - static NSDictionary dictionaryWithObject_forKey_( - NSObject object, NSObject key) { - final _ret = _objc_msgSend_158(_class_NSDictionary, - _sel_dictionaryWithObject_forKey_, object.pointer, key.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } - - static NSDictionary dictionaryWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _objc_msgSend_147(_class_NSDictionary, - _sel_dictionaryWithObjects_forKeys_count_, objects, keys, cnt); - return NSDictionary._(_ret, retain: true, release: true); - } - - static NSDictionary dictionaryWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _objc_msgSend_124(_class_NSDictionary, - _sel_dictionaryWithObjectsAndKeys_, firstObject.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } - - static NSDictionary dictionaryWithDictionary_(NSDictionary dict) { - final _ret = _objc_msgSend_159( - _class_NSDictionary, _sel_dictionaryWithDictionary_, dict.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } - - static NSDictionary dictionaryWithObjects_forKeys_( - NSArray objects, NSArray keys) { - final _ret = _objc_msgSend_160(_class_NSDictionary, - _sel_dictionaryWithObjects_forKeys_, objects.pointer, keys.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } - - NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjectsAndKeys_, firstObject.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } - - NSDictionary initWithDictionary_(NSDictionary otherDictionary) { - final _ret = _objc_msgSend_159( - this.pointer, _sel_initWithDictionary_, otherDictionary.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } - - NSDictionary initWithDictionary_copyItems_( - NSDictionary otherDictionary, bool flag) { - final _ret = _objc_msgSend_161(this.pointer, - _sel_initWithDictionary_copyItems_, otherDictionary.pointer, flag); - return NSDictionary._(_ret, retain: false, release: true); - } - - NSDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { - final _ret = _objc_msgSend_160(this.pointer, _sel_initWithObjects_forKeys_, - objects.pointer, keys.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } - - NSDictionary? initWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_162( - this.pointer, _sel_initWithContentsOfURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - static NSDictionary? dictionaryWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_162(_class_NSDictionary, - _sel_dictionaryWithContentsOfURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - static NSObject sharedKeySetForKeys_(NSArray keys) { - final _ret = _objc_msgSend_125( - _class_NSDictionary, _sel_sharedKeySetForKeys_, keys.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - int countByEnumeratingWithState_objects_count_( - ffi.Pointer state, - ffi.Pointer> buffer, - int len) { - return _objc_msgSend_163(this.pointer, - _sel_countByEnumeratingWithState_objects_count_, state, buffer, len); - } - - int fileSize() { - return _objc_msgSend_164(this.pointer, _sel_fileSize); - } - - NSDate? fileModificationDate() { - final _ret = _objc_msgSend_183(this.pointer, _sel_fileModificationDate); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - NSString? fileType() { - final _ret = _objc_msgSend_44(this.pointer, _sel_fileType); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - int filePosixPermissions() { - return _objc_msgSend_10(this.pointer, _sel_filePosixPermissions); - } - - NSString? fileOwnerAccountName() { - final _ret = _objc_msgSend_44(this.pointer, _sel_fileOwnerAccountName); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? fileGroupOwnerAccountName() { - final _ret = _objc_msgSend_44(this.pointer, _sel_fileGroupOwnerAccountName); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - int fileSystemNumber() { - return _objc_msgSend_83(this.pointer, _sel_fileSystemNumber); - } - - int fileSystemFileNumber() { - return _objc_msgSend_10(this.pointer, _sel_fileSystemFileNumber); - } - - bool fileExtensionHidden() { - return _objc_msgSend_12(this.pointer, _sel_fileExtensionHidden); - } - - int fileHFSCreatorCode() { - return _objc_msgSend_214(this.pointer, _sel_fileHFSCreatorCode); - } - - int fileHFSTypeCode() { - return _objc_msgSend_214(this.pointer, _sel_fileHFSTypeCode); - } - - bool fileIsImmutable() { - return _objc_msgSend_12(this.pointer, _sel_fileIsImmutable); - } - - bool fileIsAppendOnly() { - return _objc_msgSend_12(this.pointer, _sel_fileIsAppendOnly); - } - - NSDate? fileCreationDate() { - final _ret = _objc_msgSend_183(this.pointer, _sel_fileCreationDate); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - NSNumber? fileOwnerAccountID() { - final _ret = _objc_msgSend_215(this.pointer, _sel_fileOwnerAccountID); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); - } - - NSNumber? fileGroupOwnerAccountID() { - final _ret = _objc_msgSend_215(this.pointer, _sel_fileGroupOwnerAccountID); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); - } - - @override - NSObject? valueForKey_(NSString key) { - final _ret = _objc_msgSend_38(this.pointer, _sel_valueForKey_, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSDictionary new1() { - final _ret = _objc_msgSend_2(_class_NSDictionary, _sel_new); - return NSDictionary._(_ret, retain: false, release: true); - } - - static NSDictionary allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSDictionary, _sel_allocWithZone_, zone); - return NSDictionary._(_ret, retain: false, release: true); - } - - static NSDictionary alloc() { - final _ret = _objc_msgSend_2(_class_NSDictionary, _sel_alloc); - return NSDictionary._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSDictionary, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSDictionary, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSDictionary, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSDictionary, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSDictionary, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSDictionary, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSDictionary, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSDictionary, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSDictionary, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSDictionary = objc.getClass("NSDictionary"); -late final _sel_objectForKey_ = objc.registerName("objectForKey:"); -late final _sel_keyEnumerator = objc.registerName("keyEnumerator"); -late final _sel_initWithObjects_forKeys_count_ = - objc.registerName("initWithObjects:forKeys:count:"); -final _objc_msgSend_147 = 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_allKeys = objc.registerName("allKeys"); -late final _sel_allKeysForObject_ = objc.registerName("allKeysForObject:"); -late final _sel_allValues = objc.registerName("allValues"); -late final _sel_descriptionInStringsFileFormat = - objc.registerName("descriptionInStringsFileFormat"); -late final _sel_isEqualToDictionary_ = - objc.registerName("isEqualToDictionary:"); -final _objc_msgSend_148 = 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_objectsForKeys_notFoundMarker_ = - objc.registerName("objectsForKeys:notFoundMarker:"); -final _objc_msgSend_149 = 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_keysSortedByValueUsingSelector_ = - objc.registerName("keysSortedByValueUsingSelector:"); -late final _sel_getObjects_andKeys_count_ = - objc.registerName("getObjects:andKeys:count:"); -final _objc_msgSend_150 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.UnsignedLong)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - int)>(); -late final _sel_objectForKeyedSubscript_ = - objc.registerName("objectForKeyedSubscript:"); -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); -final _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureRegistry = - , - ffi.Pointer, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_registerClosure( - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureRegistry[id] = - fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool - extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool.fromFunction( - void Function(NSObject, NSObject, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, retain: true, release: true), NSObject._(arg1, retain: true, release: true), arg2)))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool.listener( - void Function(NSObject, NSObject, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, retain: true, release: true), NSObject._(arg1, retain: true, release: true), arg2)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, arg0.pointer, arg1.pointer, arg2); -} - -late final _sel_enumerateKeysAndObjectsUsingBlock_ = - objc.registerName("enumerateKeysAndObjectsUsingBlock:"); -final _objc_msgSend_151 = 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_enumerateKeysAndObjectsWithOptions_usingBlock_ = - objc.registerName("enumerateKeysAndObjectsWithOptions:usingBlock:"); -final _objc_msgSend_152 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_keysSortedByValueUsingComparator_ = - objc.registerName("keysSortedByValueUsingComparator:"); -late final _sel_keysSortedByValueWithOptions_usingComparator_ = - objc.registerName("keysSortedByValueWithOptions:usingComparator:"); -bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_registerClosure( - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureRegistryIndex; - _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_bool_objcObjCObject_objcObjCObject_bool - extends objc.ObjCBlockBase { - ObjCBlock_bool_objcObjCObject_objcObjCObject_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_bool_objcObjCObject_objcObjCObject_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_bool_objcObjCObject_objcObjCObject_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_objcObjCObject_objcObjCObject_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_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_objcObjCObject_objcObjCObject_bool.fromFunction( - bool Function(NSObject, NSObject, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_registerClosure((ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, retain: true, release: true), NSObject._(arg1, retain: true, release: true), arg2)))); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, arg0.pointer, arg1.pointer, arg2); -} - -late final _sel_keysOfEntriesPassingTest_ = - objc.registerName("keysOfEntriesPassingTest:"); -final _objc_msgSend_153 = 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_keysOfEntriesWithOptions_passingTest_ = - objc.registerName("keysOfEntriesWithOptions:passingTest:"); -final _objc_msgSend_154 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_getObjects_andKeys_ = objc.registerName("getObjects:andKeys:"); -final _objc_msgSend_155 = 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_dictionaryWithContentsOfFile_ = - objc.registerName("dictionaryWithContentsOfFile:"); -final _objc_msgSend_156 = 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_dictionaryWithContentsOfURL_ = - objc.registerName("dictionaryWithContentsOfURL:"); -final _objc_msgSend_157 = 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_dictionary = objc.registerName("dictionary"); -late final _sel_dictionaryWithObject_forKey_ = - objc.registerName("dictionaryWithObject:forKey:"); -final _objc_msgSend_158 = 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_dictionaryWithObjects_forKeys_count_ = - objc.registerName("dictionaryWithObjects:forKeys:count:"); -late final _sel_dictionaryWithObjectsAndKeys_ = - objc.registerName("dictionaryWithObjectsAndKeys:"); -late final _sel_dictionaryWithDictionary_ = - objc.registerName("dictionaryWithDictionary:"); -final _objc_msgSend_159 = 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_dictionaryWithObjects_forKeys_ = - objc.registerName("dictionaryWithObjects:forKeys:"); -final _objc_msgSend_160 = 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_initWithObjectsAndKeys_ = - objc.registerName("initWithObjectsAndKeys:"); -late final _sel_initWithDictionary_ = objc.registerName("initWithDictionary:"); -late final _sel_initWithDictionary_copyItems_ = - objc.registerName("initWithDictionary:copyItems:"); -final _objc_msgSend_161 = 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_initWithObjects_forKeys_ = - objc.registerName("initWithObjects:forKeys:"); -final _objc_msgSend_162 = 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_dictionaryWithContentsOfURL_error_ = - objc.registerName("dictionaryWithContentsOfURL:error:"); -late final _sel_sharedKeySetForKeys_ = - objc.registerName("sharedKeySetForKeys:"); - -final class NSFastEnumerationState extends ffi.Struct { - @ffi.UnsignedLong() - external int state; - - external ffi.Pointer> itemsPtr; - - external ffi.Pointer mutationsPtr; - - @ffi.Array.multi([5]) - external ffi.Array extra; -} - -late final _sel_countByEnumeratingWithState_objects_count_ = - objc.registerName("countByEnumeratingWithState:objects:count:"); -final _objc_msgSend_163 = 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)>(); -late final _sel_fileSize = objc.registerName("fileSize"); -final _objc_msgSend_164 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLongLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); - -class NSDate extends NSObject { - NSDate._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSDate] that points to the same underlying object as [other]. - static NSDate castFrom(T other) { - return NSDate._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSDate] that wraps the given raw object pointer. - static NSDate castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDate._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSDate]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSDate); - } - - double get timeIntervalSinceReferenceDate { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret( - this.pointer, _sel_timeIntervalSinceReferenceDate) - : _objc_msgSend_165(this.pointer, _sel_timeIntervalSinceReferenceDate); - } - - @override - NSDate init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSDate._(_ret, retain: true, release: true); - } - - NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _objc_msgSend_166( - this.pointer, _sel_initWithTimeIntervalSinceReferenceDate_, ti); - return NSDate._(_ret, retain: true, release: true); - } - - NSDate? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - double timeIntervalSinceDate_(NSDate anotherDate) { - return objc.useMsgSendVariants - ? _objc_msgSend_167Fpret( - this.pointer, _sel_timeIntervalSinceDate_, anotherDate.pointer) - : _objc_msgSend_167( - this.pointer, _sel_timeIntervalSinceDate_, anotherDate.pointer); - } - - double get timeIntervalSinceNow { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_timeIntervalSinceNow) - : _objc_msgSend_165(this.pointer, _sel_timeIntervalSinceNow); - } - - double get timeIntervalSince1970 { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_timeIntervalSince1970) - : _objc_msgSend_165(this.pointer, _sel_timeIntervalSince1970); - } - - NSObject addTimeInterval_(double seconds) { - final _ret = - _objc_msgSend_166(this.pointer, _sel_addTimeInterval_, seconds); - return NSObject._(_ret, retain: true, release: true); - } - - NSDate dateByAddingTimeInterval_(double ti) { - final _ret = - _objc_msgSend_166(this.pointer, _sel_dateByAddingTimeInterval_, ti); - return NSDate._(_ret, retain: true, release: true); - } - - NSDate earlierDate_(NSDate anotherDate) { - final _ret = - _objc_msgSend_168(this.pointer, _sel_earlierDate_, anotherDate.pointer); - return NSDate._(_ret, retain: true, release: true); - } - - NSDate laterDate_(NSDate anotherDate) { - final _ret = - _objc_msgSend_168(this.pointer, _sel_laterDate_, anotherDate.pointer); - return NSDate._(_ret, retain: true, release: true); - } - - int compare_(NSDate other) { - return _objc_msgSend_169(this.pointer, _sel_compare_, other.pointer); - } - - bool isEqualToDate_(NSDate otherDate) { - return _objc_msgSend_170( - this.pointer, _sel_isEqualToDate_, otherDate.pointer); - } - - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _objc_msgSend_70(this.pointer, _sel_descriptionWithLocale_, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } - - static NSDate date() { - final _ret = _objc_msgSend_2(_class_NSDate, _sel_date); - return NSDate._(_ret, retain: true, release: true); - } - - static NSDate dateWithTimeIntervalSinceNow_(double secs) { - final _ret = _objc_msgSend_166( - _class_NSDate, _sel_dateWithTimeIntervalSinceNow_, secs); - return NSDate._(_ret, retain: true, release: true); - } - - static NSDate dateWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _objc_msgSend_166( - _class_NSDate, _sel_dateWithTimeIntervalSinceReferenceDate_, ti); - return NSDate._(_ret, retain: true, release: true); - } - - static NSDate dateWithTimeIntervalSince1970_(double secs) { - final _ret = _objc_msgSend_166( - _class_NSDate, _sel_dateWithTimeIntervalSince1970_, secs); - return NSDate._(_ret, retain: true, release: true); - } - - static NSDate dateWithTimeInterval_sinceDate_( - double secsToBeAdded, NSDate date) { - final _ret = _objc_msgSend_171(_class_NSDate, - _sel_dateWithTimeInterval_sinceDate_, secsToBeAdded, date.pointer); - return NSDate._(_ret, retain: true, release: true); - } - - static NSDate getDistantFuture() { - final _ret = _objc_msgSend_172(_class_NSDate, _sel_distantFuture); - return NSDate._(_ret, retain: true, release: true); - } - - static NSDate getDistantPast() { - final _ret = _objc_msgSend_172(_class_NSDate, _sel_distantPast); - return NSDate._(_ret, retain: true, release: true); - } - - static NSDate getNow() { - final _ret = _objc_msgSend_172(_class_NSDate, _sel_now); - return NSDate._(_ret, retain: true, release: true); - } - - NSDate initWithTimeIntervalSinceNow_(double secs) { - final _ret = _objc_msgSend_166( - this.pointer, _sel_initWithTimeIntervalSinceNow_, secs); - return NSDate._(_ret, retain: true, release: true); - } - - NSDate initWithTimeIntervalSince1970_(double secs) { - final _ret = _objc_msgSend_166( - this.pointer, _sel_initWithTimeIntervalSince1970_, secs); - return NSDate._(_ret, retain: true, release: true); - } - - NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate date) { - final _ret = _objc_msgSend_171(this.pointer, - _sel_initWithTimeInterval_sinceDate_, secsToBeAdded, date.pointer); - return NSDate._(_ret, retain: true, release: true); - } - - static NSObject? dateWithNaturalLanguageString_locale_( - NSString string, NSObject? locale) { - final _ret = _objc_msgSend_173( - _class_NSDate, - _sel_dateWithNaturalLanguageString_locale_, - string.pointer, - locale?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSObject? dateWithNaturalLanguageString_(NSString string) { - final _ret = _objc_msgSend_38( - _class_NSDate, _sel_dateWithNaturalLanguageString_, string.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSObject dateWithString_(NSString aString) { - final _ret = - _objc_msgSend_31(_class_NSDate, _sel_dateWithString_, aString.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - NSCalendarDate dateWithCalendarFormat_timeZone_( - NSString? format, NSTimeZone? aTimeZone) { - final _ret = _objc_msgSend_212( - this.pointer, - _sel_dateWithCalendarFormat_timeZone_, - format?.pointer ?? ffi.nullptr, - aTimeZone?.pointer ?? ffi.nullptr); - return NSCalendarDate._(_ret, retain: true, release: true); - } - - NSString? descriptionWithCalendarFormat_timeZone_locale_( - NSString? format, NSTimeZone? aTimeZone, NSObject? locale) { - final _ret = _objc_msgSend_213( - this.pointer, - _sel_descriptionWithCalendarFormat_timeZone_locale_, - format?.pointer ?? ffi.nullptr, - aTimeZone?.pointer ?? ffi.nullptr, - locale?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSObject? initWithString_(NSString description) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithString_, description.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSDate new1() { - final _ret = _objc_msgSend_2(_class_NSDate, _sel_new); - return NSDate._(_ret, retain: false, release: true); - } - - static NSDate allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSDate, _sel_allocWithZone_, zone); - return NSDate._(_ret, retain: false, release: true); - } - - static NSDate alloc() { - final _ret = _objc_msgSend_2(_class_NSDate, _sel_alloc); - return NSDate._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSDate, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSDate, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSDate, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSDate, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSDate, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64( - _class_NSDate, _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSDate, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSDate, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSDate, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSDate = objc.getClass("NSDate"); -late final _sel_timeIntervalSinceReferenceDate = - objc.registerName("timeIntervalSinceReferenceDate"); -final _objc_msgSend_165 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - double Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_165Fpret = objc.msgSendFpretPointer - .cast< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - double Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithTimeIntervalSinceReferenceDate_ = - objc.registerName("initWithTimeIntervalSinceReferenceDate:"); -final _objc_msgSend_166 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, double)>(); -late final _sel_timeIntervalSinceDate_ = - objc.registerName("timeIntervalSinceDate:"); -final _objc_msgSend_167 = 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_167Fpret = objc.msgSendFpretPointer - .cast< - ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - double Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_timeIntervalSinceNow = - objc.registerName("timeIntervalSinceNow"); -late final _sel_timeIntervalSince1970 = - objc.registerName("timeIntervalSince1970"); -late final _sel_addTimeInterval_ = objc.registerName("addTimeInterval:"); -late final _sel_dateByAddingTimeInterval_ = - objc.registerName("dateByAddingTimeInterval:"); -late final _sel_earlierDate_ = objc.registerName("earlierDate:"); -final _objc_msgSend_168 = 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_laterDate_ = objc.registerName("laterDate:"); -late final _sel_compare_ = objc.registerName("compare:"); -final _objc_msgSend_169 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_isEqualToDate_ = objc.registerName("isEqualToDate:"); -final _objc_msgSend_170 = 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_date = objc.registerName("date"); -late final _sel_dateWithTimeIntervalSinceNow_ = - objc.registerName("dateWithTimeIntervalSinceNow:"); -late final _sel_dateWithTimeIntervalSinceReferenceDate_ = - objc.registerName("dateWithTimeIntervalSinceReferenceDate:"); -late final _sel_dateWithTimeIntervalSince1970_ = - objc.registerName("dateWithTimeIntervalSince1970:"); -late final _sel_dateWithTimeInterval_sinceDate_ = - objc.registerName("dateWithTimeInterval:sinceDate:"); -final _objc_msgSend_171 = 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)>(); -late final _sel_distantFuture = objc.registerName("distantFuture"); -final _objc_msgSend_172 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_distantPast = objc.registerName("distantPast"); -late final _sel_now = objc.registerName("now"); -late final _sel_initWithTimeIntervalSinceNow_ = - objc.registerName("initWithTimeIntervalSinceNow:"); -late final _sel_initWithTimeIntervalSince1970_ = - objc.registerName("initWithTimeIntervalSince1970:"); -late final _sel_initWithTimeInterval_sinceDate_ = - objc.registerName("initWithTimeInterval:sinceDate:"); -late final _sel_dateWithNaturalLanguageString_locale_ = - objc.registerName("dateWithNaturalLanguageString:locale:"); -final _objc_msgSend_173 = 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_dateWithNaturalLanguageString_ = - objc.registerName("dateWithNaturalLanguageString:"); -late final _sel_dateWithString_ = objc.registerName("dateWithString:"); - -class NSCalendarDate extends NSDate { - NSCalendarDate._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSCalendarDate] that points to the same underlying object as [other]. - static NSCalendarDate castFrom(T other) { - return NSCalendarDate._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSCalendarDate] that wraps the given raw object pointer. - static NSCalendarDate castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCalendarDate._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCalendarDate]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSCalendarDate); - } - - static NSObject calendarDate() { - final _ret = _objc_msgSend_2(_class_NSCalendarDate, _sel_calendarDate); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject? dateWithString_calendarFormat_locale_( - NSString description, NSString format, NSObject? locale) { - final _ret = _objc_msgSend_174( - _class_NSCalendarDate, - _sel_dateWithString_calendarFormat_locale_, - description.pointer, - format.pointer, - locale?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSObject? dateWithString_calendarFormat_( - NSString description, NSString format) { - final _ret = _objc_msgSend_175( - _class_NSCalendarDate, - _sel_dateWithString_calendarFormat_, - description.pointer, - format.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSObject dateWithYear_month_day_hour_minute_second_timeZone_( - int year, - int month, - int day, - int hour, - int minute, - int second, - NSTimeZone? aTimeZone) { - final _ret = _objc_msgSend_206( - _class_NSCalendarDate, - _sel_dateWithYear_month_day_hour_minute_second_timeZone_, - year, - month, - day, - hour, - minute, - second, - aTimeZone?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); - } - - NSCalendarDate dateByAddingYears_months_days_hours_minutes_seconds_( - int year, int month, int day, int hour, int minute, int second) { - final _ret = _objc_msgSend_207( - this.pointer, - _sel_dateByAddingYears_months_days_hours_minutes_seconds_, - year, - month, - day, - hour, - minute, - second); - return NSCalendarDate._(_ret, retain: true, release: true); - } - - int dayOfCommonEra() { - return _objc_msgSend_83(this.pointer, _sel_dayOfCommonEra); - } - - int dayOfMonth() { - return _objc_msgSend_83(this.pointer, _sel_dayOfMonth); - } - - int dayOfWeek() { - return _objc_msgSend_83(this.pointer, _sel_dayOfWeek); - } - - int dayOfYear() { - return _objc_msgSend_83(this.pointer, _sel_dayOfYear); - } - - int hourOfDay() { - return _objc_msgSend_83(this.pointer, _sel_hourOfDay); - } - - int minuteOfHour() { - return _objc_msgSend_83(this.pointer, _sel_minuteOfHour); - } - - int monthOfYear() { - return _objc_msgSend_83(this.pointer, _sel_monthOfYear); - } - - int secondOfMinute() { - return _objc_msgSend_83(this.pointer, _sel_secondOfMinute); - } - - int yearOfCommonEra() { - return _objc_msgSend_83(this.pointer, _sel_yearOfCommonEra); - } - - NSString calendarFormat() { - final _ret = _objc_msgSend_21(this.pointer, _sel_calendarFormat); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithCalendarFormat_locale_( - NSString format, NSObject? locale) { - final _ret = _objc_msgSend_208( - this.pointer, - _sel_descriptionWithCalendarFormat_locale_, - format.pointer, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithCalendarFormat_(NSString format) { - final _ret = _objc_msgSend_69( - this.pointer, _sel_descriptionWithCalendarFormat_, format.pointer); - return NSString._(_ret, retain: true, release: true); - } - - @override - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _objc_msgSend_70(this.pointer, _sel_descriptionWithLocale_, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } - - NSTimeZone timeZone() { - final _ret = _objc_msgSend_179(this.pointer, _sel_timeZone); - return NSTimeZone._(_ret, retain: true, release: true); - } - - NSObject? initWithString_calendarFormat_locale_( - NSString description, NSString format, NSObject? locale) { - final _ret = _objc_msgSend_174( - this.pointer, - _sel_initWithString_calendarFormat_locale_, - description.pointer, - format.pointer, - locale?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? initWithString_calendarFormat_( - NSString description, NSString format) { - final _ret = _objc_msgSend_175( - this.pointer, - _sel_initWithString_calendarFormat_, - description.pointer, - format.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - @override - NSObject? initWithString_(NSString description) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithString_, description.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject initWithYear_month_day_hour_minute_second_timeZone_( - int year, - int month, - int day, - int hour, - int minute, - int second, - NSTimeZone? aTimeZone) { - final _ret = _objc_msgSend_206( - this.pointer, - _sel_initWithYear_month_day_hour_minute_second_timeZone_, - year, - month, - day, - hour, - minute, - second, - aTimeZone?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); - } - - void setCalendarFormat_(NSString? format) { - _objc_msgSend_209( - this.pointer, _sel_setCalendarFormat_, format?.pointer ?? ffi.nullptr); - } - - void setTimeZone_(NSTimeZone? aTimeZone) { - _objc_msgSend_210( - this.pointer, _sel_setTimeZone_, aTimeZone?.pointer ?? ffi.nullptr); - } - - void years_months_days_hours_minutes_seconds_sinceDate_( - ffi.Pointer yp, - ffi.Pointer mop, - ffi.Pointer dp, - ffi.Pointer hp, - ffi.Pointer mip, - ffi.Pointer sp, - NSCalendarDate date) { - _objc_msgSend_211( - this.pointer, - _sel_years_months_days_hours_minutes_seconds_sinceDate_, - yp, - mop, - dp, - hp, - mip, - sp, - date.pointer); - } - - static NSDate getDistantFuture() { - final _ret = _objc_msgSend_172(_class_NSCalendarDate, _sel_distantFuture); - return NSDate._(_ret, retain: true, release: true); - } - - static NSDate getDistantPast() { - final _ret = _objc_msgSend_172(_class_NSCalendarDate, _sel_distantPast); - return NSDate._(_ret, retain: true, release: true); - } - - @override - NSCalendarDate init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSCalendarDate._(_ret, retain: true, release: true); - } - - @override - NSCalendarDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _objc_msgSend_166( - this.pointer, _sel_initWithTimeIntervalSinceReferenceDate_, ti); - return NSCalendarDate._(_ret, retain: true, release: true); - } - - @override - NSCalendarDate? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSCalendarDate._(_ret, retain: true, release: true); - } - - @override - NSCalendarDate dateByAddingTimeInterval_(double ti) { - final _ret = - _objc_msgSend_166(this.pointer, _sel_dateByAddingTimeInterval_, ti); - return NSCalendarDate._(_ret, retain: true, release: true); - } - - static NSCalendarDate date() { - final _ret = _objc_msgSend_2(_class_NSCalendarDate, _sel_date); - return NSCalendarDate._(_ret, retain: true, release: true); - } - - static NSCalendarDate dateWithTimeIntervalSinceNow_(double secs) { - final _ret = _objc_msgSend_166( - _class_NSCalendarDate, _sel_dateWithTimeIntervalSinceNow_, secs); - return NSCalendarDate._(_ret, retain: true, release: true); - } - - static NSCalendarDate dateWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _objc_msgSend_166(_class_NSCalendarDate, - _sel_dateWithTimeIntervalSinceReferenceDate_, ti); - return NSCalendarDate._(_ret, retain: true, release: true); - } - - static NSCalendarDate dateWithTimeIntervalSince1970_(double secs) { - final _ret = _objc_msgSend_166( - _class_NSCalendarDate, _sel_dateWithTimeIntervalSince1970_, secs); - return NSCalendarDate._(_ret, retain: true, release: true); - } - - static NSCalendarDate dateWithTimeInterval_sinceDate_( - double secsToBeAdded, NSDate date) { - final _ret = _objc_msgSend_171(_class_NSCalendarDate, - _sel_dateWithTimeInterval_sinceDate_, secsToBeAdded, date.pointer); - return NSCalendarDate._(_ret, retain: true, release: true); - } - - static NSDate getNow() { - final _ret = _objc_msgSend_172(_class_NSCalendarDate, _sel_now); - return NSDate._(_ret, retain: true, release: true); - } - - @override - NSCalendarDate initWithTimeIntervalSinceNow_(double secs) { - final _ret = _objc_msgSend_166( - this.pointer, _sel_initWithTimeIntervalSinceNow_, secs); - return NSCalendarDate._(_ret, retain: true, release: true); - } - - @override - NSCalendarDate initWithTimeIntervalSince1970_(double secs) { - final _ret = _objc_msgSend_166( - this.pointer, _sel_initWithTimeIntervalSince1970_, secs); - return NSCalendarDate._(_ret, retain: true, release: true); - } - - @override - NSCalendarDate initWithTimeInterval_sinceDate_( - double secsToBeAdded, NSDate date) { - final _ret = _objc_msgSend_171(this.pointer, - _sel_initWithTimeInterval_sinceDate_, secsToBeAdded, date.pointer); - return NSCalendarDate._(_ret, retain: true, release: true); - } - - static NSObject? dateWithNaturalLanguageString_locale_( - NSString string, NSObject? locale) { - final _ret = _objc_msgSend_173( - _class_NSCalendarDate, - _sel_dateWithNaturalLanguageString_locale_, - string.pointer, - locale?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSObject? dateWithNaturalLanguageString_(NSString string) { - final _ret = _objc_msgSend_38(_class_NSCalendarDate, - _sel_dateWithNaturalLanguageString_, string.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSObject dateWithString_(NSString aString) { - final _ret = _objc_msgSend_31( - _class_NSCalendarDate, _sel_dateWithString_, aString.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSCalendarDate new1() { - final _ret = _objc_msgSend_2(_class_NSCalendarDate, _sel_new); - return NSCalendarDate._(_ret, retain: false, release: true); - } - - static NSCalendarDate allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSCalendarDate, _sel_allocWithZone_, zone); - return NSCalendarDate._(_ret, retain: false, release: true); - } - - static NSCalendarDate alloc() { - final _ret = _objc_msgSend_2(_class_NSCalendarDate, _sel_alloc); - return NSCalendarDate._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSCalendarDate, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSCalendarDate, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSCalendarDate, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSCalendarDate, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSCalendarDate, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSCalendarDate, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSCalendarDate, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSCalendarDate, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSCalendarDate, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSCalendarDate = objc.getClass("NSCalendarDate"); -late final _sel_calendarDate = objc.registerName("calendarDate"); -late final _sel_dateWithString_calendarFormat_locale_ = - objc.registerName("dateWithString:calendarFormat:locale:"); -final _objc_msgSend_174 = 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_dateWithString_calendarFormat_ = - objc.registerName("dateWithString:calendarFormat:"); -final _objc_msgSend_175 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); - -class NSTimeZone extends NSObject { - NSTimeZone._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSTimeZone] that points to the same underlying object as [other]. - static NSTimeZone castFrom(T other) { - return NSTimeZone._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSTimeZone] that wraps the given raw object pointer. - static NSTimeZone castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSTimeZone._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSTimeZone]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTimeZone); - } - - NSString get name { - final _ret = _objc_msgSend_21(this.pointer, _sel_name); - return NSString._(_ret, retain: true, release: true); - } - - NSData get data { - final _ret = _objc_msgSend_43(this.pointer, _sel_data); - return NSData._(_ret, retain: true, release: true); - } - - int secondsFromGMTForDate_(NSDate aDate) { - return _objc_msgSend_176( - this.pointer, _sel_secondsFromGMTForDate_, aDate.pointer); - } - - NSString? abbreviationForDate_(NSDate aDate) { - final _ret = _objc_msgSend_177( - this.pointer, _sel_abbreviationForDate_, aDate.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - bool isDaylightSavingTimeForDate_(NSDate aDate) { - return _objc_msgSend_170( - this.pointer, _sel_isDaylightSavingTimeForDate_, aDate.pointer); - } - - double daylightSavingTimeOffsetForDate_(NSDate aDate) { - return objc.useMsgSendVariants - ? _objc_msgSend_167Fpret( - this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer) - : _objc_msgSend_167( - this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer); - } - - NSDate? nextDaylightSavingTimeTransitionAfterDate_(NSDate aDate) { - final _ret = _objc_msgSend_178(this.pointer, - _sel_nextDaylightSavingTimeTransitionAfterDate_, aDate.pointer); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - static NSTimeZone getSystemTimeZone() { - final _ret = _objc_msgSend_179(_class_NSTimeZone, _sel_systemTimeZone); - return NSTimeZone._(_ret, retain: true, release: true); - } - - static void resetSystemTimeZone() { - _objc_msgSend_1(_class_NSTimeZone, _sel_resetSystemTimeZone); - } - - static NSTimeZone getDefaultTimeZone() { - final _ret = _objc_msgSend_179(_class_NSTimeZone, _sel_defaultTimeZone); - return NSTimeZone._(_ret, retain: true, release: true); - } - - static void setDefaultTimeZone(NSTimeZone value) { - return _objc_msgSend_180( - _class_NSTimeZone, _sel_setDefaultTimeZone_, value.pointer); - } - - static NSTimeZone getLocalTimeZone() { - final _ret = _objc_msgSend_179(_class_NSTimeZone, _sel_localTimeZone); - return NSTimeZone._(_ret, retain: true, release: true); - } - - static NSArray getKnownTimeZoneNames() { - final _ret = _objc_msgSend_85(_class_NSTimeZone, _sel_knownTimeZoneNames); - return NSArray._(_ret, retain: true, release: true); - } - - static NSDictionary getAbbreviationDictionary() { - final _ret = - _objc_msgSend_181(_class_NSTimeZone, _sel_abbreviationDictionary); - return NSDictionary._(_ret, retain: true, release: true); - } - - static void setAbbreviationDictionary(NSDictionary value) { - return _objc_msgSend_182( - _class_NSTimeZone, _sel_setAbbreviationDictionary_, value.pointer); - } - - static NSString getTimeZoneDataVersion() { - final _ret = _objc_msgSend_21(_class_NSTimeZone, _sel_timeZoneDataVersion); - return NSString._(_ret, retain: true, release: true); - } - - int get secondsFromGMT { - return _objc_msgSend_83(this.pointer, _sel_secondsFromGMT); - } - - NSString? get abbreviation { - final _ret = _objc_msgSend_44(this.pointer, _sel_abbreviation); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - bool get daylightSavingTime { - return _objc_msgSend_12(this.pointer, _sel_isDaylightSavingTime); - } - - double get daylightSavingTimeOffset { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_daylightSavingTimeOffset) - : _objc_msgSend_165(this.pointer, _sel_daylightSavingTimeOffset); - } - - NSDate? get nextDaylightSavingTimeTransition { - final _ret = - _objc_msgSend_183(this.pointer, _sel_nextDaylightSavingTimeTransition); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - bool isEqualToTimeZone_(NSTimeZone aTimeZone) { - return _objc_msgSend_184( - this.pointer, _sel_isEqualToTimeZone_, aTimeZone.pointer); - } - - NSString? localizedName_locale_(int style, NSLocale? locale) { - final _ret = _objc_msgSend_203(this.pointer, _sel_localizedName_locale_, - style, locale?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - static NSTimeZone? timeZoneWithName_(NSString tzName) { - final _ret = _objc_msgSend_38( - _class_NSTimeZone, _sel_timeZoneWithName_, tzName.pointer); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, retain: true, release: true); - } - - static NSTimeZone? timeZoneWithName_data_(NSString tzName, NSData? aData) { - final _ret = _objc_msgSend_204( - _class_NSTimeZone, - _sel_timeZoneWithName_data_, - tzName.pointer, - aData?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, retain: true, release: true); - } - - NSTimeZone? initWithName_(NSString tzName) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_initWithName_, tzName.pointer); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, retain: true, release: true); - } - - NSTimeZone? initWithName_data_(NSString tzName, NSData? aData) { - final _ret = _objc_msgSend_204(this.pointer, _sel_initWithName_data_, - tzName.pointer, aData?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, retain: true, release: true); - } - - static NSTimeZone timeZoneForSecondsFromGMT_(int seconds) { - final _ret = _objc_msgSend_205( - _class_NSTimeZone, _sel_timeZoneForSecondsFromGMT_, seconds); - return NSTimeZone._(_ret, retain: true, release: true); - } - - static NSTimeZone? timeZoneWithAbbreviation_(NSString abbreviation) { - final _ret = _objc_msgSend_38(_class_NSTimeZone, - _sel_timeZoneWithAbbreviation_, abbreviation.pointer); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, retain: true, release: true); - } - - @override - NSTimeZone init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSTimeZone._(_ret, retain: true, release: true); - } - - static NSTimeZone new1() { - final _ret = _objc_msgSend_2(_class_NSTimeZone, _sel_new); - return NSTimeZone._(_ret, retain: false, release: true); - } - - static NSTimeZone allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSTimeZone, _sel_allocWithZone_, zone); - return NSTimeZone._(_ret, retain: false, release: true); - } - - static NSTimeZone alloc() { - final _ret = _objc_msgSend_2(_class_NSTimeZone, _sel_alloc); - return NSTimeZone._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSTimeZone, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSTimeZone, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSTimeZone, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSTimeZone, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSTimeZone, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSTimeZone, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSTimeZone, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSTimeZone, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSTimeZone, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -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_176 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_abbreviationForDate_ = - objc.registerName("abbreviationForDate:"); -final _objc_msgSend_177 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_isDaylightSavingTimeForDate_ = - objc.registerName("isDaylightSavingTimeForDate:"); -late final _sel_daylightSavingTimeOffsetForDate_ = - objc.registerName("daylightSavingTimeOffsetForDate:"); -late final _sel_nextDaylightSavingTimeTransitionAfterDate_ = - objc.registerName("nextDaylightSavingTimeTransitionAfterDate:"); -final _objc_msgSend_178 = 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_179 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_resetSystemTimeZone = objc.registerName("resetSystemTimeZone"); -late final _sel_defaultTimeZone = objc.registerName("defaultTimeZone"); -late final _sel_setDefaultTimeZone_ = objc.registerName("setDefaultTimeZone:"); -final _objc_msgSend_180 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_localTimeZone = objc.registerName("localTimeZone"); -late final _sel_knownTimeZoneNames = objc.registerName("knownTimeZoneNames"); -late final _sel_abbreviationDictionary = - objc.registerName("abbreviationDictionary"); -final _objc_msgSend_181 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setAbbreviationDictionary_ = - objc.registerName("setAbbreviationDictionary:"); -final _objc_msgSend_182 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_timeZoneDataVersion = objc.registerName("timeZoneDataVersion"); -late final _sel_secondsFromGMT = objc.registerName("secondsFromGMT"); -late final _sel_abbreviation = objc.registerName("abbreviation"); -late final _sel_isDaylightSavingTime = - objc.registerName("isDaylightSavingTime"); -late final _sel_daylightSavingTimeOffset = - objc.registerName("daylightSavingTimeOffset"); -late final _sel_nextDaylightSavingTimeTransition = - objc.registerName("nextDaylightSavingTimeTransition"); -final _objc_msgSend_183 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_isEqualToTimeZone_ = objc.registerName("isEqualToTimeZone:"); -final _objc_msgSend_184 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSTimeZoneNameStyle { - static const int NSTimeZoneNameStyleStandard = 0; - static const int NSTimeZoneNameStyleShortStandard = 1; - static const int NSTimeZoneNameStyleDaylightSaving = 2; - static const int NSTimeZoneNameStyleShortDaylightSaving = 3; - static const int NSTimeZoneNameStyleGeneric = 4; - static const int NSTimeZoneNameStyleShortGeneric = 5; -} - -class NSLocale extends NSObject { - NSLocale._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSLocale] that points to the same underlying object as [other]. - static NSLocale castFrom(T other) { - return NSLocale._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSLocale] that wraps the given raw object pointer. - static NSLocale castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSLocale._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSLocale]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSLocale); - } - - NSObject? objectForKey_(NSString key) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_objectForKey_, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSString? displayNameForKey_value_(NSString key, NSObject value) { - final _ret = _objc_msgSend_185(this.pointer, _sel_displayNameForKey_value_, - key.pointer, value.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSLocale initWithLocaleIdentifier_(NSString string) { - final _ret = _objc_msgSend_31( - this.pointer, _sel_initWithLocaleIdentifier_, string.pointer); - return NSLocale._(_ret, retain: true, release: true); - } - - NSLocale? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSLocale._(_ret, retain: true, release: true); - } - - NSString get localeIdentifier { - final _ret = _objc_msgSend_21(this.pointer, _sel_localeIdentifier); - return NSString._(_ret, retain: true, release: true); - } - - NSString localizedStringForLocaleIdentifier_(NSString localeIdentifier) { - final _ret = _objc_msgSend_69(this.pointer, - _sel_localizedStringForLocaleIdentifier_, localeIdentifier.pointer); - return NSString._(_ret, retain: true, release: true); - } - - NSString get languageCode { - final _ret = _objc_msgSend_21(this.pointer, _sel_languageCode); - return NSString._(_ret, retain: true, release: true); - } - - NSString? localizedStringForLanguageCode_(NSString languageCode) { - final _ret = _objc_msgSend_186(this.pointer, - _sel_localizedStringForLanguageCode_, languageCode.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString get languageIdentifier { - final _ret = _objc_msgSend_21(this.pointer, _sel_languageIdentifier); - return NSString._(_ret, retain: true, release: true); - } - - NSString? get countryCode { - final _ret = _objc_msgSend_44(this.pointer, _sel_countryCode); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? localizedStringForCountryCode_(NSString countryCode) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_localizedStringForCountryCode_, countryCode.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get regionCode { - final _ret = _objc_msgSend_44(this.pointer, _sel_regionCode); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get scriptCode { - final _ret = _objc_msgSend_44(this.pointer, _sel_scriptCode); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? localizedStringForScriptCode_(NSString scriptCode) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_localizedStringForScriptCode_, scriptCode.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get variantCode { - final _ret = _objc_msgSend_44(this.pointer, _sel_variantCode); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? localizedStringForVariantCode_(NSString variantCode) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_localizedStringForVariantCode_, variantCode.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSCharacterSet get exemplarCharacterSet { - final _ret = _objc_msgSend_187(this.pointer, _sel_exemplarCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - NSString get calendarIdentifier { - final _ret = _objc_msgSend_21(this.pointer, _sel_calendarIdentifier); - return NSString._(_ret, retain: true, release: true); - } - - NSString? localizedStringForCalendarIdentifier_(NSString calendarIdentifier) { - final _ret = _objc_msgSend_186(this.pointer, - _sel_localizedStringForCalendarIdentifier_, calendarIdentifier.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get collationIdentifier { - final _ret = _objc_msgSend_44(this.pointer, _sel_collationIdentifier); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? localizedStringForCollationIdentifier_( - NSString collationIdentifier) { - final _ret = _objc_msgSend_186( - this.pointer, - _sel_localizedStringForCollationIdentifier_, - collationIdentifier.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - bool get usesMetricSystem { - return _objc_msgSend_12(this.pointer, _sel_usesMetricSystem); - } - - NSString get decimalSeparator { - final _ret = _objc_msgSend_21(this.pointer, _sel_decimalSeparator); - return NSString._(_ret, retain: true, release: true); - } - - NSString get groupingSeparator { - final _ret = _objc_msgSend_21(this.pointer, _sel_groupingSeparator); - return NSString._(_ret, retain: true, release: true); - } - - NSString get currencySymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_currencySymbol); - return NSString._(_ret, retain: true, release: true); - } - - NSString? get currencyCode { - final _ret = _objc_msgSend_44(this.pointer, _sel_currencyCode); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? localizedStringForCurrencyCode_(NSString currencyCode) { - final _ret = _objc_msgSend_186(this.pointer, - _sel_localizedStringForCurrencyCode_, currencyCode.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString get collatorIdentifier { - final _ret = _objc_msgSend_21(this.pointer, _sel_collatorIdentifier); - return NSString._(_ret, retain: true, release: true); - } - - NSString? localizedStringForCollatorIdentifier_(NSString collatorIdentifier) { - final _ret = _objc_msgSend_186(this.pointer, - _sel_localizedStringForCollatorIdentifier_, collatorIdentifier.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString get quotationBeginDelimiter { - final _ret = _objc_msgSend_21(this.pointer, _sel_quotationBeginDelimiter); - return NSString._(_ret, retain: true, release: true); - } - - NSString get quotationEndDelimiter { - final _ret = _objc_msgSend_21(this.pointer, _sel_quotationEndDelimiter); - return NSString._(_ret, retain: true, release: true); - } - - NSString get alternateQuotationBeginDelimiter { - final _ret = - _objc_msgSend_21(this.pointer, _sel_alternateQuotationBeginDelimiter); - return NSString._(_ret, retain: true, release: true); - } - - NSString get alternateQuotationEndDelimiter { - final _ret = - _objc_msgSend_21(this.pointer, _sel_alternateQuotationEndDelimiter); - return NSString._(_ret, retain: true, release: true); - } - - static NSLocale getAutoupdatingCurrentLocale() { - final _ret = - _objc_msgSend_197(_class_NSLocale, _sel_autoupdatingCurrentLocale); - return NSLocale._(_ret, retain: true, release: true); - } - - static NSLocale getCurrentLocale() { - final _ret = _objc_msgSend_197(_class_NSLocale, _sel_currentLocale); - return NSLocale._(_ret, retain: true, release: true); - } - - static NSLocale getSystemLocale() { - final _ret = _objc_msgSend_197(_class_NSLocale, _sel_systemLocale); - return NSLocale._(_ret, retain: true, release: true); - } - - static NSLocale localeWithLocaleIdentifier_(NSString ident) { - final _ret = _objc_msgSend_31( - _class_NSLocale, _sel_localeWithLocaleIdentifier_, ident.pointer); - return NSLocale._(_ret, retain: true, release: true); - } - - @override - NSLocale init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSLocale._(_ret, retain: true, release: true); - } - - static NSArray getAvailableLocaleIdentifiers() { - final _ret = - _objc_msgSend_85(_class_NSLocale, _sel_availableLocaleIdentifiers); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray getISOLanguageCodes() { - final _ret = _objc_msgSend_85(_class_NSLocale, _sel_ISOLanguageCodes); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray getISOCountryCodes() { - final _ret = _objc_msgSend_85(_class_NSLocale, _sel_ISOCountryCodes); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray getISOCurrencyCodes() { - final _ret = _objc_msgSend_85(_class_NSLocale, _sel_ISOCurrencyCodes); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray getCommonISOCurrencyCodes() { - final _ret = _objc_msgSend_85(_class_NSLocale, _sel_commonISOCurrencyCodes); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray getPreferredLanguages() { - final _ret = _objc_msgSend_85(_class_NSLocale, _sel_preferredLanguages); - return NSArray._(_ret, retain: true, release: true); - } - - static NSDictionary componentsFromLocaleIdentifier_(NSString string) { - final _ret = _objc_msgSend_198( - _class_NSLocale, _sel_componentsFromLocaleIdentifier_, string.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } - - static NSString localeIdentifierFromComponents_(NSDictionary dict) { - final _ret = _objc_msgSend_199( - _class_NSLocale, _sel_localeIdentifierFromComponents_, dict.pointer); - return NSString._(_ret, retain: true, release: true); - } - - static NSString canonicalLocaleIdentifierFromString_(NSString string) { - final _ret = _objc_msgSend_69(_class_NSLocale, - _sel_canonicalLocaleIdentifierFromString_, string.pointer); - return NSString._(_ret, retain: true, release: true); - } - - static NSString canonicalLanguageIdentifierFromString_(NSString string) { - final _ret = _objc_msgSend_69(_class_NSLocale, - _sel_canonicalLanguageIdentifierFromString_, string.pointer); - return NSString._(_ret, retain: true, release: true); - } - - static NSString? localeIdentifierFromWindowsLocaleCode_(int lcid) { - final _ret = _objc_msgSend_200( - _class_NSLocale, _sel_localeIdentifierFromWindowsLocaleCode_, lcid); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - static int windowsLocaleCodeFromLocaleIdentifier_(NSString localeIdentifier) { - return _objc_msgSend_201(_class_NSLocale, - _sel_windowsLocaleCodeFromLocaleIdentifier_, localeIdentifier.pointer); - } - - static int characterDirectionForLanguage_(NSString isoLangCode) { - return _objc_msgSend_202(_class_NSLocale, - _sel_characterDirectionForLanguage_, isoLangCode.pointer); - } - - static int lineDirectionForLanguage_(NSString isoLangCode) { - return _objc_msgSend_202( - _class_NSLocale, _sel_lineDirectionForLanguage_, isoLangCode.pointer); - } - - static NSLocale new1() { - final _ret = _objc_msgSend_2(_class_NSLocale, _sel_new); - return NSLocale._(_ret, retain: false, release: true); - } - - static NSLocale allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSLocale, _sel_allocWithZone_, zone); - return NSLocale._(_ret, retain: false, release: true); - } - - static NSLocale alloc() { - final _ret = _objc_msgSend_2(_class_NSLocale, _sel_alloc); - return NSLocale._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSLocale, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSLocale, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSLocale, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSLocale, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSLocale, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSLocale, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSLocale, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSLocale, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSLocale, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSLocale = objc.getClass("NSLocale"); -late final _sel_displayNameForKey_value_ = - objc.registerName("displayNameForKey:value:"); -final _objc_msgSend_185 = 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_initWithLocaleIdentifier_ = - objc.registerName("initWithLocaleIdentifier:"); -late final _sel_localeIdentifier = objc.registerName("localeIdentifier"); -late final _sel_localizedStringForLocaleIdentifier_ = - objc.registerName("localizedStringForLocaleIdentifier:"); -late final _sel_languageCode = objc.registerName("languageCode"); -late final _sel_localizedStringForLanguageCode_ = - objc.registerName("localizedStringForLanguageCode:"); -final _objc_msgSend_186 = 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_languageIdentifier = objc.registerName("languageIdentifier"); -late final _sel_countryCode = objc.registerName("countryCode"); -late final _sel_localizedStringForCountryCode_ = - objc.registerName("localizedStringForCountryCode:"); -late final _sel_regionCode = objc.registerName("regionCode"); -late final _sel_scriptCode = objc.registerName("scriptCode"); -late final _sel_localizedStringForScriptCode_ = - objc.registerName("localizedStringForScriptCode:"); -late final _sel_variantCode = objc.registerName("variantCode"); -late final _sel_localizedStringForVariantCode_ = - objc.registerName("localizedStringForVariantCode:"); - -class NSCharacterSet extends NSObject { - NSCharacterSet._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSCharacterSet] that points to the same underlying object as [other]. - static NSCharacterSet castFrom(T other) { - return NSCharacterSet._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSCharacterSet] that wraps the given raw object pointer. - static NSCharacterSet castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCharacterSet._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCharacterSet]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSCharacterSet); - } - - static NSCharacterSet getControlCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_controlCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getWhitespaceCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_whitespaceCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getWhitespaceAndNewlineCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_whitespaceAndNewlineCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getDecimalDigitCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_decimalDigitCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getLetterCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_letterCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getLowercaseLetterCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_lowercaseLetterCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getUppercaseLetterCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_uppercaseLetterCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getNonBaseCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_nonBaseCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getAlphanumericCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_alphanumericCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getDecomposableCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_decomposableCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getIllegalCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_illegalCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getPunctuationCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_punctuationCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getCapitalizedLetterCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_capitalizedLetterCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getSymbolCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_symbolCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getNewlineCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_newlineCharacterSet); - return NSCharacterSet._(_ret, retain: false, release: true); - } - - static NSCharacterSet characterSetWithRange_(_NSRange aRange) { - final _ret = _objc_msgSend_188( - _class_NSCharacterSet, _sel_characterSetWithRange_, aRange); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet characterSetWithCharactersInString_(NSString aString) { - final _ret = _objc_msgSend_189(_class_NSCharacterSet, - _sel_characterSetWithCharactersInString_, aString.pointer); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet characterSetWithBitmapRepresentation_(NSData data) { - final _ret = _objc_msgSend_190(_class_NSCharacterSet, - _sel_characterSetWithBitmapRepresentation_, data.pointer); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet? characterSetWithContentsOfFile_(NSString fName) { - final _ret = _objc_msgSend_191(_class_NSCharacterSet, - _sel_characterSetWithContentsOfFile_, fName.pointer); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, retain: true, release: true); - } - - NSCharacterSet initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_192(this.pointer, _sel_initWithCoder_, coder.pointer); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - bool characterIsMember_(int aCharacter) { - return _objc_msgSend_193(this.pointer, _sel_characterIsMember_, aCharacter); - } - - NSData get bitmapRepresentation { - final _ret = _objc_msgSend_43(this.pointer, _sel_bitmapRepresentation); - return NSData._(_ret, retain: true, release: true); - } - - NSCharacterSet get invertedSet { - final _ret = _objc_msgSend_187(this.pointer, _sel_invertedSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - bool longCharacterIsMember_(int theLongChar) { - return _objc_msgSend_194( - this.pointer, _sel_longCharacterIsMember_, theLongChar); - } - - bool isSupersetOfSet_(NSCharacterSet theOtherSet) { - return _objc_msgSend_195( - this.pointer, _sel_isSupersetOfSet_, theOtherSet.pointer); - } - - bool hasMemberInPlane_(int thePlane) { - return _objc_msgSend_196(this.pointer, _sel_hasMemberInPlane_, thePlane); - } - - static NSCharacterSet getURLUserAllowedCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_URLUserAllowedCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getURLPasswordAllowedCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_URLPasswordAllowedCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getURLHostAllowedCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_URLHostAllowedCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getURLPathAllowedCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_URLPathAllowedCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getURLQueryAllowedCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_URLQueryAllowedCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getURLFragmentAllowedCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_URLFragmentAllowedCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - @override - NSCharacterSet init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet new1() { - final _ret = _objc_msgSend_2(_class_NSCharacterSet, _sel_new); - return NSCharacterSet._(_ret, retain: false, release: true); - } - - static NSCharacterSet allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSCharacterSet, _sel_allocWithZone_, zone); - return NSCharacterSet._(_ret, retain: false, release: true); - } - - static NSCharacterSet alloc() { - final _ret = _objc_msgSend_2(_class_NSCharacterSet, _sel_alloc); - return NSCharacterSet._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSCharacterSet, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSCharacterSet, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSCharacterSet, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSCharacterSet, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSCharacterSet, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSCharacterSet, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSCharacterSet, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSCharacterSet, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSCharacterSet, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSCharacterSet = objc.getClass("NSCharacterSet"); -late final _sel_controlCharacterSet = objc.registerName("controlCharacterSet"); -final _objc_msgSend_187 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_whitespaceCharacterSet = - objc.registerName("whitespaceCharacterSet"); -late final _sel_whitespaceAndNewlineCharacterSet = - objc.registerName("whitespaceAndNewlineCharacterSet"); -late final _sel_decimalDigitCharacterSet = - objc.registerName("decimalDigitCharacterSet"); -late final _sel_letterCharacterSet = objc.registerName("letterCharacterSet"); -late final _sel_lowercaseLetterCharacterSet = - objc.registerName("lowercaseLetterCharacterSet"); -late final _sel_uppercaseLetterCharacterSet = - objc.registerName("uppercaseLetterCharacterSet"); -late final _sel_nonBaseCharacterSet = objc.registerName("nonBaseCharacterSet"); -late final _sel_alphanumericCharacterSet = - objc.registerName("alphanumericCharacterSet"); -late final _sel_decomposableCharacterSet = - objc.registerName("decomposableCharacterSet"); -late final _sel_illegalCharacterSet = objc.registerName("illegalCharacterSet"); -late final _sel_punctuationCharacterSet = - objc.registerName("punctuationCharacterSet"); -late final _sel_capitalizedLetterCharacterSet = - objc.registerName("capitalizedLetterCharacterSet"); -late final _sel_symbolCharacterSet = objc.registerName("symbolCharacterSet"); -late final _sel_newlineCharacterSet = objc.registerName("newlineCharacterSet"); -late final _sel_characterSetWithRange_ = - objc.registerName("characterSetWithRange:"); -final _objc_msgSend_188 = 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_characterSetWithCharactersInString_ = - objc.registerName("characterSetWithCharactersInString:"); -final _objc_msgSend_189 = 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_characterSetWithBitmapRepresentation_ = - objc.registerName("characterSetWithBitmapRepresentation:"); -final _objc_msgSend_190 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_characterSetWithContentsOfFile_ = - objc.registerName("characterSetWithContentsOfFile:"); -final _objc_msgSend_191 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_192 = 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_characterIsMember_ = objc.registerName("characterIsMember:"); -final _objc_msgSend_193 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedShort)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_bitmapRepresentation = - objc.registerName("bitmapRepresentation"); -late final _sel_invertedSet = objc.registerName("invertedSet"); -late final _sel_longCharacterIsMember_ = - objc.registerName("longCharacterIsMember:"); -final _objc_msgSend_194 = 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_isSupersetOfSet_ = objc.registerName("isSupersetOfSet:"); -final _objc_msgSend_195 = 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_hasMemberInPlane_ = objc.registerName("hasMemberInPlane:"); -final _objc_msgSend_196 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Uint8)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_URLUserAllowedCharacterSet = - objc.registerName("URLUserAllowedCharacterSet"); -late final _sel_URLPasswordAllowedCharacterSet = - objc.registerName("URLPasswordAllowedCharacterSet"); -late final _sel_URLHostAllowedCharacterSet = - objc.registerName("URLHostAllowedCharacterSet"); -late final _sel_URLPathAllowedCharacterSet = - objc.registerName("URLPathAllowedCharacterSet"); -late final _sel_URLQueryAllowedCharacterSet = - objc.registerName("URLQueryAllowedCharacterSet"); -late final _sel_URLFragmentAllowedCharacterSet = - objc.registerName("URLFragmentAllowedCharacterSet"); -late final _sel_exemplarCharacterSet = - objc.registerName("exemplarCharacterSet"); -late final _sel_calendarIdentifier = objc.registerName("calendarIdentifier"); -late final _sel_localizedStringForCalendarIdentifier_ = - objc.registerName("localizedStringForCalendarIdentifier:"); -late final _sel_collationIdentifier = objc.registerName("collationIdentifier"); -late final _sel_localizedStringForCollationIdentifier_ = - objc.registerName("localizedStringForCollationIdentifier:"); -late final _sel_usesMetricSystem = objc.registerName("usesMetricSystem"); -late final _sel_decimalSeparator = objc.registerName("decimalSeparator"); -late final _sel_groupingSeparator = objc.registerName("groupingSeparator"); -late final _sel_currencySymbol = objc.registerName("currencySymbol"); -late final _sel_currencyCode = objc.registerName("currencyCode"); -late final _sel_localizedStringForCurrencyCode_ = - objc.registerName("localizedStringForCurrencyCode:"); -late final _sel_collatorIdentifier = objc.registerName("collatorIdentifier"); -late final _sel_localizedStringForCollatorIdentifier_ = - objc.registerName("localizedStringForCollatorIdentifier:"); -late final _sel_quotationBeginDelimiter = - objc.registerName("quotationBeginDelimiter"); -late final _sel_quotationEndDelimiter = - objc.registerName("quotationEndDelimiter"); -late final _sel_alternateQuotationBeginDelimiter = - objc.registerName("alternateQuotationBeginDelimiter"); -late final _sel_alternateQuotationEndDelimiter = - objc.registerName("alternateQuotationEndDelimiter"); -late final _sel_autoupdatingCurrentLocale = - objc.registerName("autoupdatingCurrentLocale"); -final _objc_msgSend_197 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_currentLocale = objc.registerName("currentLocale"); -late final _sel_systemLocale = objc.registerName("systemLocale"); -late final _sel_localeWithLocaleIdentifier_ = - objc.registerName("localeWithLocaleIdentifier:"); -late final _sel_availableLocaleIdentifiers = - objc.registerName("availableLocaleIdentifiers"); -late final _sel_ISOLanguageCodes = objc.registerName("ISOLanguageCodes"); -late final _sel_ISOCountryCodes = objc.registerName("ISOCountryCodes"); -late final _sel_ISOCurrencyCodes = objc.registerName("ISOCurrencyCodes"); -late final _sel_commonISOCurrencyCodes = - objc.registerName("commonISOCurrencyCodes"); -late final _sel_preferredLanguages = objc.registerName("preferredLanguages"); -late final _sel_componentsFromLocaleIdentifier_ = - objc.registerName("componentsFromLocaleIdentifier:"); -final _objc_msgSend_198 = 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_localeIdentifierFromComponents_ = - objc.registerName("localeIdentifierFromComponents:"); -final _objc_msgSend_199 = 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_canonicalLocaleIdentifierFromString_ = - objc.registerName("canonicalLocaleIdentifierFromString:"); -late final _sel_canonicalLanguageIdentifierFromString_ = - objc.registerName("canonicalLanguageIdentifierFromString:"); -late final _sel_localeIdentifierFromWindowsLocaleCode_ = - objc.registerName("localeIdentifierFromWindowsLocaleCode:"); -final _objc_msgSend_200 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Uint32)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_windowsLocaleCodeFromLocaleIdentifier_ = - objc.registerName("windowsLocaleCodeFromLocaleIdentifier:"); -final _objc_msgSend_201 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Uint32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSLocaleLanguageDirection { - static const int NSLocaleLanguageDirectionUnknown = 0; - static const int NSLocaleLanguageDirectionLeftToRight = 1; - static const int NSLocaleLanguageDirectionRightToLeft = 2; - static const int NSLocaleLanguageDirectionTopToBottom = 3; - static const int NSLocaleLanguageDirectionBottomToTop = 4; -} - -late final _sel_characterDirectionForLanguage_ = - objc.registerName("characterDirectionForLanguage:"); -final _objc_msgSend_202 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_lineDirectionForLanguage_ = - objc.registerName("lineDirectionForLanguage:"); -late final _sel_localizedName_locale_ = - objc.registerName("localizedName:locale:"); -final _objc_msgSend_203 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_timeZoneWithName_ = objc.registerName("timeZoneWithName:"); -late final _sel_timeZoneWithName_data_ = - objc.registerName("timeZoneWithName:data:"); -final _objc_msgSend_204 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_initWithName_ = objc.registerName("initWithName:"); -late final _sel_initWithName_data_ = objc.registerName("initWithName:data:"); -late final _sel_timeZoneForSecondsFromGMT_ = - objc.registerName("timeZoneForSecondsFromGMT:"); -final _objc_msgSend_205 = 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_dateWithYear_month_day_hour_minute_second_timeZone_ = - objc.registerName("dateWithYear:month:day:hour:minute:second:timeZone:"); -final _objc_msgSend_206 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - int, - int, - int, - int, - ffi.Pointer)>(); -late final _sel_dateByAddingYears_months_days_hours_minutes_seconds_ = - objc.registerName("dateByAddingYears:months:days:hours:minutes:seconds:"); -final _objc_msgSend_207 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - 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)>(); -late final _sel_dayOfCommonEra = objc.registerName("dayOfCommonEra"); -late final _sel_dayOfMonth = objc.registerName("dayOfMonth"); -late final _sel_dayOfWeek = objc.registerName("dayOfWeek"); -late final _sel_dayOfYear = objc.registerName("dayOfYear"); -late final _sel_hourOfDay = objc.registerName("hourOfDay"); -late final _sel_minuteOfHour = objc.registerName("minuteOfHour"); -late final _sel_monthOfYear = objc.registerName("monthOfYear"); -late final _sel_secondOfMinute = objc.registerName("secondOfMinute"); -late final _sel_yearOfCommonEra = objc.registerName("yearOfCommonEra"); -late final _sel_calendarFormat = objc.registerName("calendarFormat"); -late final _sel_descriptionWithCalendarFormat_locale_ = - objc.registerName("descriptionWithCalendarFormat:locale:"); -final _objc_msgSend_208 = 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_descriptionWithCalendarFormat_ = - objc.registerName("descriptionWithCalendarFormat:"); -late final _sel_timeZone = objc.registerName("timeZone"); -late final _sel_initWithString_calendarFormat_locale_ = - objc.registerName("initWithString:calendarFormat:locale:"); -late final _sel_initWithString_calendarFormat_ = - objc.registerName("initWithString:calendarFormat:"); -late final _sel_initWithYear_month_day_hour_minute_second_timeZone_ = - objc.registerName("initWithYear:month:day:hour:minute:second:timeZone:"); -late final _sel_setCalendarFormat_ = objc.registerName("setCalendarFormat:"); -final _objc_msgSend_209 = 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_setTimeZone_ = objc.registerName("setTimeZone:"); -final _objc_msgSend_210 = 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_years_months_days_hours_minutes_seconds_sinceDate_ = - objc.registerName("years:months:days:hours:minutes:seconds:sinceDate:"); -final _objc_msgSend_211 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - 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, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_dateWithCalendarFormat_timeZone_ = - objc.registerName("dateWithCalendarFormat:timeZone:"); -final _objc_msgSend_212 = 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_descriptionWithCalendarFormat_timeZone_locale_ = - objc.registerName("descriptionWithCalendarFormat:timeZone:locale:"); -final _objc_msgSend_213 = 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_fileModificationDate = - objc.registerName("fileModificationDate"); -late final _sel_fileType = objc.registerName("fileType"); -late final _sel_filePosixPermissions = - objc.registerName("filePosixPermissions"); -late final _sel_fileOwnerAccountName = - objc.registerName("fileOwnerAccountName"); -late final _sel_fileGroupOwnerAccountName = - objc.registerName("fileGroupOwnerAccountName"); -late final _sel_fileSystemNumber = objc.registerName("fileSystemNumber"); -late final _sel_fileSystemFileNumber = - objc.registerName("fileSystemFileNumber"); -late final _sel_fileExtensionHidden = objc.registerName("fileExtensionHidden"); -late final _sel_fileHFSCreatorCode = objc.registerName("fileHFSCreatorCode"); -final _objc_msgSend_214 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedInt Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_fileHFSTypeCode = objc.registerName("fileHFSTypeCode"); -late final _sel_fileIsImmutable = objc.registerName("fileIsImmutable"); -late final _sel_fileIsAppendOnly = objc.registerName("fileIsAppendOnly"); -late final _sel_fileCreationDate = objc.registerName("fileCreationDate"); -late final _sel_fileOwnerAccountID = objc.registerName("fileOwnerAccountID"); -final _objc_msgSend_215 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_fileGroupOwnerAccountID = - objc.registerName("fileGroupOwnerAccountID"); -late final _sel_predicateWithBlock_ = objc.registerName("predicateWithBlock:"); -final _objc_msgSend_216 = 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_predicateFormat = objc.registerName("predicateFormat"); -late final _sel_predicateWithSubstitutionVariables_ = - objc.registerName("predicateWithSubstitutionVariables:"); -late final _sel_evaluateWithObject_ = objc.registerName("evaluateWithObject:"); -final _objc_msgSend_217 = 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_evaluateWithObject_substitutionVariables_ = - objc.registerName("evaluateWithObject:substitutionVariables:"); -final _objc_msgSend_218 = 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_allowEvaluation = objc.registerName("allowEvaluation"); -late final _sel_filteredArrayUsingPredicate_ = - objc.registerName("filteredArrayUsingPredicate:"); -final _objc_msgSend_219 = 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_initWithChar_ = objc.registerName("initWithChar:"); -final _objc_msgSend_220 = 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_initWithUnsignedChar_ = - objc.registerName("initWithUnsignedChar:"); -final _objc_msgSend_221 = 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_initWithShort_ = objc.registerName("initWithShort:"); -final _objc_msgSend_222 = 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_initWithUnsignedShort_ = - objc.registerName("initWithUnsignedShort:"); -final _objc_msgSend_223 = 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_initWithInt_ = objc.registerName("initWithInt:"); -final _objc_msgSend_224 = 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_initWithUnsignedInt_ = - objc.registerName("initWithUnsignedInt:"); -final _objc_msgSend_225 = 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_initWithLong_ = objc.registerName("initWithLong:"); -final _objc_msgSend_226 = 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_initWithUnsignedLong_ = - objc.registerName("initWithUnsignedLong:"); -final _objc_msgSend_227 = 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_initWithLongLong_ = objc.registerName("initWithLongLong:"); -final _objc_msgSend_228 = 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_initWithUnsignedLongLong_ = - objc.registerName("initWithUnsignedLongLong:"); -final _objc_msgSend_229 = 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_initWithFloat_ = objc.registerName("initWithFloat:"); -final _objc_msgSend_230 = 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_initWithDouble_ = objc.registerName("initWithDouble:"); -final _objc_msgSend_231 = 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_initWithBool_ = objc.registerName("initWithBool:"); -final _objc_msgSend_232 = 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_initWithInteger_ = objc.registerName("initWithInteger:"); -late final _sel_initWithUnsignedInteger_ = - objc.registerName("initWithUnsignedInteger:"); -late final _sel_charValue = objc.registerName("charValue"); -final _objc_msgSend_233 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Char Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_unsignedCharValue = objc.registerName("unsignedCharValue"); -final _objc_msgSend_234 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedChar Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_shortValue = objc.registerName("shortValue"); -final _objc_msgSend_235 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Short Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_unsignedShortValue = objc.registerName("unsignedShortValue"); -final _objc_msgSend_236 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedShort Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_intValue = objc.registerName("intValue"); -final _objc_msgSend_237 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_unsignedIntValue = objc.registerName("unsignedIntValue"); -late final _sel_longValue = objc.registerName("longValue"); -late final _sel_unsignedLongValue = objc.registerName("unsignedLongValue"); -late final _sel_longLongValue = objc.registerName("longLongValue"); -final _objc_msgSend_238 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_unsignedLongLongValue = - objc.registerName("unsignedLongLongValue"); -late final _sel_floatValue = objc.registerName("floatValue"); -final _objc_msgSend_239 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - double Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_239Fpret = objc.msgSendFpretPointer - .cast< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - double Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_doubleValue = objc.registerName("doubleValue"); -late final _sel_boolValue = objc.registerName("boolValue"); -late final _sel_integerValue = objc.registerName("integerValue"); -late final _sel_unsignedIntegerValue = - objc.registerName("unsignedIntegerValue"); -late final _sel_stringValue = objc.registerName("stringValue"); -final _objc_msgSend_240 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_isEqualToNumber_ = objc.registerName("isEqualToNumber:"); -final _objc_msgSend_241 = 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_numberWithChar_ = objc.registerName("numberWithChar:"); -late final _sel_numberWithUnsignedChar_ = - objc.registerName("numberWithUnsignedChar:"); -late final _sel_numberWithShort_ = objc.registerName("numberWithShort:"); -late final _sel_numberWithUnsignedShort_ = - objc.registerName("numberWithUnsignedShort:"); -late final _sel_numberWithInt_ = objc.registerName("numberWithInt:"); -late final _sel_numberWithUnsignedInt_ = - objc.registerName("numberWithUnsignedInt:"); -late final _sel_numberWithLong_ = objc.registerName("numberWithLong:"); -late final _sel_numberWithUnsignedLong_ = - objc.registerName("numberWithUnsignedLong:"); -late final _sel_numberWithLongLong_ = objc.registerName("numberWithLongLong:"); -late final _sel_numberWithUnsignedLongLong_ = - objc.registerName("numberWithUnsignedLongLong:"); -late final _sel_numberWithFloat_ = objc.registerName("numberWithFloat:"); -late final _sel_numberWithDouble_ = objc.registerName("numberWithDouble:"); -late final _sel_numberWithBool_ = objc.registerName("numberWithBool:"); -late final _sel_numberWithInteger_ = objc.registerName("numberWithInteger:"); -late final _sel_numberWithUnsignedInteger_ = - objc.registerName("numberWithUnsignedInteger:"); -late final _sel_port = objc.registerName("port"); -late final _sel_user = objc.registerName("user"); -late final _sel_password = objc.registerName("password"); -late final _sel_path = objc.registerName("path"); -late final _sel_fragment = objc.registerName("fragment"); -late final _sel_parameterString = objc.registerName("parameterString"); -late final _sel_query = objc.registerName("query"); -late final _sel_relativePath = objc.registerName("relativePath"); -late final _sel_hasDirectoryPath = objc.registerName("hasDirectoryPath"); -late final _sel_getFileSystemRepresentation_maxLength_ = - objc.registerName("getFileSystemRepresentation:maxLength:"); -final _objc_msgSend_242 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); -late final _sel_fileSystemRepresentation = - objc.registerName("fileSystemRepresentation"); -late final _sel_isFileURL = objc.registerName("isFileURL"); -late final _sel_standardizedURL = objc.registerName("standardizedURL"); -late final _sel_isFileReferenceURL = objc.registerName("isFileReferenceURL"); -late final _sel_fileReferenceURL = objc.registerName("fileReferenceURL"); -late final _sel_filePathURL = objc.registerName("filePathURL"); -late final _sel_getResourceValue_forKey_error_ = - objc.registerName("getResourceValue:forKey:error:"); -final _objc_msgSend_243 = 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_resourceValuesForKeys_error_ = - objc.registerName("resourceValuesForKeys:error:"); -final _objc_msgSend_244 = 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_setResourceValue_forKey_error_ = - objc.registerName("setResourceValue:forKey:error:"); -final _objc_msgSend_245 = 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_setResourceValues_error_ = - objc.registerName("setResourceValues:error:"); -final _objc_msgSend_246 = 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_removeCachedResourceValueForKey_ = - objc.registerName("removeCachedResourceValueForKey:"); -final _objc_msgSend_247 = 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_removeAllCachedResourceValues = - objc.registerName("removeAllCachedResourceValues"); -late final _sel_setTemporaryResourceValue_forKey_ = - objc.registerName("setTemporaryResourceValue:forKey:"); - -abstract class NSURLBookmarkCreationOptions { - static const int NSURLBookmarkCreationPreferFileIDResolution = 256; - static const int NSURLBookmarkCreationMinimalBookmark = 512; - static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; - static const int NSURLBookmarkCreationWithSecurityScope = 2048; - static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; - static const int NSURLBookmarkCreationWithoutImplicitSecurityScope = - 536870912; -} - -late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_ = - objc.registerName( - "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); -final _objc_msgSend_248 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - -abstract class NSURLBookmarkResolutionOptions { - static const int NSURLBookmarkResolutionWithoutUI = 256; - static const int NSURLBookmarkResolutionWithoutMounting = 512; - static const int NSURLBookmarkResolutionWithSecurityScope = 1024; - static const int NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; -} - -late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ = - objc.registerName( - "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); -final _objc_msgSend_249 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ = - objc.registerName( - "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); -late final _sel_resourceValuesForKeys_fromBookmarkData_ = - objc.registerName("resourceValuesForKeys:fromBookmarkData:"); -final _objc_msgSend_250 = 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_writeBookmarkData_toURL_options_error_ = - objc.registerName("writeBookmarkData:toURL:options:error:"); -final _objc_msgSend_251 = 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_bookmarkDataWithContentsOfURL_error_ = - objc.registerName("bookmarkDataWithContentsOfURL:error:"); -final _objc_msgSend_252 = 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_URLByResolvingAliasFileAtURL_options_error_ = - objc.registerName("URLByResolvingAliasFileAtURL:options:error:"); -final _objc_msgSend_253 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_startAccessingSecurityScopedResource = - objc.registerName("startAccessingSecurityScopedResource"); -late final _sel_stopAccessingSecurityScopedResource = - objc.registerName("stopAccessingSecurityScopedResource"); -late final _sel_getPromisedItemResourceValue_forKey_error_ = - objc.registerName("getPromisedItemResourceValue:forKey:error:"); -late final _sel_promisedItemResourceValuesForKeys_error_ = - objc.registerName("promisedItemResourceValuesForKeys:error:"); -final _objc_msgSend_254 = 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_checkPromisedItemIsReachableAndReturnError_ = - objc.registerName("checkPromisedItemIsReachableAndReturnError:"); -final _objc_msgSend_255 = 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_fileURLWithPathComponents_ = - objc.registerName("fileURLWithPathComponents:"); -final _objc_msgSend_256 = 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_pathComponents = objc.registerName("pathComponents"); -late final _sel_lastPathComponent = objc.registerName("lastPathComponent"); -late final _sel_pathExtension = objc.registerName("pathExtension"); -late final _sel_URLByAppendingPathComponent_ = - objc.registerName("URLByAppendingPathComponent:"); -final _objc_msgSend_257 = 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_URLByAppendingPathComponent_isDirectory_ = - objc.registerName("URLByAppendingPathComponent:isDirectory:"); -final _objc_msgSend_258 = 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_URLByDeletingLastPathComponent = - objc.registerName("URLByDeletingLastPathComponent"); -late final _sel_URLByAppendingPathExtension_ = - objc.registerName("URLByAppendingPathExtension:"); -late final _sel_URLByDeletingPathExtension = - objc.registerName("URLByDeletingPathExtension"); -late final _sel_checkResourceIsReachableAndReturnError_ = - objc.registerName("checkResourceIsReachableAndReturnError:"); -late final _sel_URLByStandardizingPath = - objc.registerName("URLByStandardizingPath"); -late final _sel_URLByResolvingSymlinksInPath = - objc.registerName("URLByResolvingSymlinksInPath"); -late final _sel_resourceDataUsingCache_ = - objc.registerName("resourceDataUsingCache:"); -final _objc_msgSend_259 = 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_loadResourceDataNotifyingClient_usingCache_ = - objc.registerName("loadResourceDataNotifyingClient:usingCache:"); -final _objc_msgSend_260 = 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_propertyForKey_ = objc.registerName("propertyForKey:"); -late final _sel_setResourceData_ = objc.registerName("setResourceData:"); -late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); -final _objc_msgSend_261 = 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)>(); - -class NSURLHandle extends NSObject { - NSURLHandle._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSURLHandle] that points to the same underlying object as [other]. - static NSURLHandle castFrom(T other) { - return NSURLHandle._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSURLHandle] that wraps the given raw object pointer. - static NSURLHandle castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLHandle._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLHandle]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLHandle); - } - - static void registerURLHandleClass_(NSObject anURLHandleSubclass) { - _objc_msgSend_15(_class_NSURLHandle, _sel_registerURLHandleClass_, - anURLHandleSubclass.pointer); - } - - static NSObject URLHandleClassForURL_(NSURL anURL) { - final _ret = _objc_msgSend_262( - _class_NSURLHandle, _sel_URLHandleClassForURL_, anURL.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - int status() { - return _objc_msgSend_263(this.pointer, _sel_status); - } - - NSString failureReason() { - final _ret = _objc_msgSend_21(this.pointer, _sel_failureReason); - return NSString._(_ret, retain: true, release: true); - } - - void addClient_(NSObject client) { - _objc_msgSend_15(this.pointer, _sel_addClient_, client.pointer); - } - - void removeClient_(NSObject client) { - _objc_msgSend_15(this.pointer, _sel_removeClient_, client.pointer); - } - - void loadInBackground() { - _objc_msgSend_1(this.pointer, _sel_loadInBackground); - } - - void cancelLoadInBackground() { - _objc_msgSend_1(this.pointer, _sel_cancelLoadInBackground); - } - - NSData resourceData() { - final _ret = _objc_msgSend_43(this.pointer, _sel_resourceData); - return NSData._(_ret, retain: true, release: true); - } - - NSData availableResourceData() { - final _ret = _objc_msgSend_43(this.pointer, _sel_availableResourceData); - return NSData._(_ret, retain: true, release: true); - } - - int expectedResourceDataSize() { - return _objc_msgSend_238(this.pointer, _sel_expectedResourceDataSize); - } - - void flushCachedData() { - _objc_msgSend_1(this.pointer, _sel_flushCachedData); - } - - void backgroundLoadDidFailWithReason_(NSString reason) { - _objc_msgSend_247( - this.pointer, _sel_backgroundLoadDidFailWithReason_, reason.pointer); - } - - void didLoadBytes_loadComplete_(NSData newBytes, bool yorn) { - _objc_msgSend_264( - this.pointer, _sel_didLoadBytes_loadComplete_, newBytes.pointer, yorn); - } - - static bool canInitWithURL_(NSURL anURL) { - return _objc_msgSend_265( - _class_NSURLHandle, _sel_canInitWithURL_, anURL.pointer); - } - - static NSURLHandle cachedHandleForURL_(NSURL anURL) { - final _ret = _objc_msgSend_266( - _class_NSURLHandle, _sel_cachedHandleForURL_, anURL.pointer); - return NSURLHandle._(_ret, retain: true, release: true); - } - - NSObject initWithURL_cached_(NSURL anURL, bool willCache) { - final _ret = _objc_msgSend_267( - this.pointer, _sel_initWithURL_cached_, anURL.pointer, willCache); - return NSObject._(_ret, retain: true, release: true); - } - - NSObject propertyForKey_(NSString propertyKey) { - final _ret = _objc_msgSend_31( - this.pointer, _sel_propertyForKey_, propertyKey.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - NSObject propertyForKeyIfAvailable_(NSString propertyKey) { - final _ret = _objc_msgSend_31( - this.pointer, _sel_propertyForKeyIfAvailable_, propertyKey.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - bool writeProperty_forKey_(NSObject propertyValue, NSString propertyKey) { - return _objc_msgSend_261(this.pointer, _sel_writeProperty_forKey_, - propertyValue.pointer, propertyKey.pointer); - } - - bool writeData_(NSData data) { - return _objc_msgSend_24(this.pointer, _sel_writeData_, data.pointer); - } - - NSData loadInForeground() { - final _ret = _objc_msgSend_43(this.pointer, _sel_loadInForeground); - return NSData._(_ret, retain: true, release: true); - } - - void beginLoadInBackground() { - _objc_msgSend_1(this.pointer, _sel_beginLoadInBackground); - } - - void endLoadInBackground() { - _objc_msgSend_1(this.pointer, _sel_endLoadInBackground); - } - - @override - NSURLHandle init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLHandle._(_ret, retain: true, release: true); - } - - static NSURLHandle new1() { - final _ret = _objc_msgSend_2(_class_NSURLHandle, _sel_new); - return NSURLHandle._(_ret, retain: false, release: true); - } - - static NSURLHandle allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSURLHandle, _sel_allocWithZone_, zone); - return NSURLHandle._(_ret, retain: false, release: true); - } - - static NSURLHandle alloc() { - final _ret = _objc_msgSend_2(_class_NSURLHandle, _sel_alloc); - return NSURLHandle._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLHandle, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLHandle, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLHandle, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLHandle, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLHandle, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLHandle, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLHandle, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLHandle, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSURLHandle, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSURLHandle = objc.getClass("NSURLHandle"); -late final _sel_registerURLHandleClass_ = - objc.registerName("registerURLHandleClass:"); -late final _sel_URLHandleClassForURL_ = - objc.registerName("URLHandleClassForURL:"); -final _objc_msgSend_262 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSURLHandleStatus { - static const int NSURLHandleNotLoaded = 0; - static const int NSURLHandleLoadSucceeded = 1; - static const int NSURLHandleLoadInProgress = 2; - static const int NSURLHandleLoadFailed = 3; -} - -late final _sel_status = objc.registerName("status"); -final _objc_msgSend_263 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_failureReason = objc.registerName("failureReason"); -late final _sel_addClient_ = objc.registerName("addClient:"); -late final _sel_removeClient_ = objc.registerName("removeClient:"); -late final _sel_loadInBackground = objc.registerName("loadInBackground"); -late final _sel_cancelLoadInBackground = - objc.registerName("cancelLoadInBackground"); -late final _sel_resourceData = objc.registerName("resourceData"); -late final _sel_availableResourceData = - objc.registerName("availableResourceData"); -late final _sel_expectedResourceDataSize = - objc.registerName("expectedResourceDataSize"); -late final _sel_flushCachedData = objc.registerName("flushCachedData"); -late final _sel_backgroundLoadDidFailWithReason_ = - objc.registerName("backgroundLoadDidFailWithReason:"); -late final _sel_didLoadBytes_loadComplete_ = - objc.registerName("didLoadBytes:loadComplete:"); -final _objc_msgSend_264 = 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_canInitWithURL_ = objc.registerName("canInitWithURL:"); -final _objc_msgSend_265 = 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_cachedHandleForURL_ = objc.registerName("cachedHandleForURL:"); -final _objc_msgSend_266 = 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_initWithURL_cached_ = objc.registerName("initWithURL:cached:"); -final _objc_msgSend_267 = 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_propertyForKeyIfAvailable_ = - objc.registerName("propertyForKeyIfAvailable:"); -late final _sel_writeProperty_forKey_ = - objc.registerName("writeProperty:forKey:"); -late final _sel_writeData_ = objc.registerName("writeData:"); -late final _sel_loadInForeground = objc.registerName("loadInForeground"); -late final _sel_beginLoadInBackground = - objc.registerName("beginLoadInBackground"); -late final _sel_endLoadInBackground = objc.registerName("endLoadInBackground"); -late final _sel_URLHandleUsingCache_ = - objc.registerName("URLHandleUsingCache:"); -final _objc_msgSend_268 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, bool)>(); - -abstract class NSDataWritingOptions { - static const int NSDataWritingAtomic = 1; - static const int NSDataWritingWithoutOverwriting = 2; - static const int NSDataWritingFileProtectionNone = 268435456; - static const int NSDataWritingFileProtectionComplete = 536870912; - static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; - static const int - NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = - 1073741824; - static const int NSDataWritingFileProtectionCompleteWhenUserInactive = - 1342177280; - static const int NSDataWritingFileProtectionMask = 4026531840; - static const int NSAtomicWrite = 1; -} - -late final _sel_writeToFile_options_error_ = - objc.registerName("writeToFile:options:error:"); -final _objc_msgSend_269 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_writeToURL_options_error_ = - objc.registerName("writeToURL:options:error:"); -final _objc_msgSend_270 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - -abstract class NSDataSearchOptions { - static const int NSDataSearchBackwards = 1; - static const int NSDataSearchAnchored = 2; -} - -late final _sel_rangeOfData_options_range_ = - objc.registerName("rangeOfData:options:range:"); -final _objc_msgSend_271 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -final _objc_msgSend_271Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -void _ObjCBlock_ffiVoid_ffiVoid_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); -final _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( - void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ffiVoid_NSRange_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_ffiVoid_NSRange_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunction( - void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0, arg1, arg2)))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.listener( - void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0, arg1, arg2)))); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(ffi.Pointer 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, arg1, arg2); -} - -late final _sel_enumerateByteRangesUsingBlock_ = - objc.registerName("enumerateByteRangesUsingBlock:"); -final _objc_msgSend_272 = 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_dataWithBytes_length_ = - objc.registerName("dataWithBytes:length:"); -final _objc_msgSend_273 = 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_dataWithBytesNoCopy_length_ = - objc.registerName("dataWithBytesNoCopy:length:"); -late final _sel_dataWithBytesNoCopy_length_freeWhenDone_ = - objc.registerName("dataWithBytesNoCopy:length:freeWhenDone:"); -final _objc_msgSend_274 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - bool)>(); - -abstract class NSDataReadingOptions { - static const int NSDataReadingMappedIfSafe = 1; - static const int NSDataReadingUncached = 2; - static const int NSDataReadingMappedAlways = 8; - static const int NSDataReadingMapped = 1; - static const int NSMappedRead = 1; - static const int NSUncachedRead = 2; -} - -late final _sel_dataWithContentsOfFile_options_error_ = - objc.registerName("dataWithContentsOfFile:options:error:"); -final _objc_msgSend_275 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_dataWithContentsOfURL_options_error_ = - objc.registerName("dataWithContentsOfURL:options:error:"); -final _objc_msgSend_276 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_dataWithContentsOfFile_ = - objc.registerName("dataWithContentsOfFile:"); -late final _sel_dataWithContentsOfURL_ = - objc.registerName("dataWithContentsOfURL:"); -final _objc_msgSend_277 = 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_initWithBytes_length_ = - objc.registerName("initWithBytes:length:"); -late final _sel_initWithBytesNoCopy_length_ = - objc.registerName("initWithBytesNoCopy:length:"); -late final _sel_initWithBytesNoCopy_length_freeWhenDone_ = - objc.registerName("initWithBytesNoCopy:length:freeWhenDone:"); -void _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, ffi.UnsignedLong arg1)>>() - .asFunction, int)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry = - , int)>{}; -int _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( - void Function(ffi.Pointer, int) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1) => - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong._( - 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_ffiVoid_ffiUnsignedLong castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong._(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_ffiVoid_ffiUnsignedLong.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, ffi.UnsignedLong arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_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_ffiVoid_ffiUnsignedLong.fromFunction( - void Function(ffi.Pointer, int) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => fn(arg0, arg1)))); - 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_ffiVoid_ffiUnsignedLong.listener( - void Function(ffi.Pointer, int) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => fn(arg0, arg1)))); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>? _dartFuncListenerTrampoline; - - void call(ffi.Pointer arg0, int arg1) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0, ffi.UnsignedLong arg1)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - int)>()(pointer, arg0, arg1); -} - -late final _sel_initWithBytesNoCopy_length_deallocator_ = - objc.registerName("initWithBytesNoCopy:length:deallocator:"); -final _objc_msgSend_278 = 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_initWithContentsOfFile_options_error_ = - objc.registerName("initWithContentsOfFile:options:error:"); -late final _sel_initWithContentsOfURL_options_error_ = - objc.registerName("initWithContentsOfURL:options:error:"); -late final _sel_initWithData_ = objc.registerName("initWithData:"); -final _objc_msgSend_279 = 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_dataWithData_ = objc.registerName("dataWithData:"); - -abstract class NSDataBase64DecodingOptions { - static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; -} - -late final _sel_initWithBase64EncodedString_options_ = - objc.registerName("initWithBase64EncodedString:options:"); -final _objc_msgSend_280 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - -abstract class NSDataBase64EncodingOptions { - static const int NSDataBase64Encoding64CharacterLineLength = 1; - static const int NSDataBase64Encoding76CharacterLineLength = 2; - static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; - static const int NSDataBase64EncodingEndLineWithLineFeed = 32; -} - -late final _sel_base64EncodedStringWithOptions_ = - objc.registerName("base64EncodedStringWithOptions:"); -final _objc_msgSend_281 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_initWithBase64EncodedData_options_ = - objc.registerName("initWithBase64EncodedData:options:"); -final _objc_msgSend_282 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_base64EncodedDataWithOptions_ = - objc.registerName("base64EncodedDataWithOptions:"); -final _objc_msgSend_283 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); - -abstract class NSDataCompressionAlgorithm { - static const int NSDataCompressionAlgorithmLZFSE = 0; - static const int NSDataCompressionAlgorithmLZ4 = 1; - static const int NSDataCompressionAlgorithmLZMA = 2; - static const int NSDataCompressionAlgorithmZlib = 3; -} - -late final _sel_decompressedDataUsingAlgorithm_error_ = - objc.registerName("decompressedDataUsingAlgorithm:error:"); -final _objc_msgSend_284 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_compressedDataUsingAlgorithm_error_ = - objc.registerName("compressedDataUsingAlgorithm:error:"); -late final _sel_getBytes_ = objc.registerName("getBytes:"); -late final _sel_dataWithContentsOfMappedFile_ = - objc.registerName("dataWithContentsOfMappedFile:"); -late final _sel_initWithContentsOfMappedFile_ = - objc.registerName("initWithContentsOfMappedFile:"); -late final _sel_initWithBase64Encoding_ = - objc.registerName("initWithBase64Encoding:"); -late final _sel_base64Encoding = objc.registerName("base64Encoding"); -late final _sel_encodeDataObject_ = objc.registerName("encodeDataObject:"); -final _objc_msgSend_285 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_decodeDataObject = objc.registerName("decodeDataObject"); -final _objc_msgSend_286 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_decodeValueOfObjCType_at_size_ = - objc.registerName("decodeValueOfObjCType:at:size:"); -final _objc_msgSend_287 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_versionForClassName_ = - objc.registerName("versionForClassName:"); -final _objc_msgSend_288 = 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_encodeObject_ = objc.registerName("encodeObject:"); -final _objc_msgSend_289 = 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_encodeRootObject_ = objc.registerName("encodeRootObject:"); -late final _sel_encodeBycopyObject_ = objc.registerName("encodeBycopyObject:"); -late final _sel_encodeByrefObject_ = objc.registerName("encodeByrefObject:"); -late final _sel_encodeConditionalObject_ = - objc.registerName("encodeConditionalObject:"); -late final _sel_encodeValuesOfObjCTypes_ = - objc.registerName("encodeValuesOfObjCTypes:"); -final _objc_msgSend_290 = 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_encodeArrayOfObjCType_count_at_ = - objc.registerName("encodeArrayOfObjCType:count:at:"); -final _objc_msgSend_291 = 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_encodeBytes_length_ = objc.registerName("encodeBytes:length:"); -late final _sel_decodeObject = objc.registerName("decodeObject"); -late final _sel_decodeTopLevelObjectAndReturnError_ = - objc.registerName("decodeTopLevelObjectAndReturnError:"); -final _objc_msgSend_292 = 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_decodeValuesOfObjCTypes_ = - objc.registerName("decodeValuesOfObjCTypes:"); -late final _sel_decodeArrayOfObjCType_count_at_ = - objc.registerName("decodeArrayOfObjCType:count:at:"); -late final _sel_decodeBytesWithReturnedLength_ = - objc.registerName("decodeBytesWithReturnedLength:"); -final _objc_msgSend_293 = 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_encodePropertyList_ = objc.registerName("encodePropertyList:"); -late final _sel_decodePropertyList = objc.registerName("decodePropertyList"); -late final _sel_setObjectZone_ = objc.registerName("setObjectZone:"); -final _objc_msgSend_294 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>(); -late final _sel_objectZone = objc.registerName("objectZone"); -final _objc_msgSend_295 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer<_NSZone> Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_systemVersion = objc.registerName("systemVersion"); -late final _sel_allowsKeyedCoding = objc.registerName("allowsKeyedCoding"); -late final _sel_encodeObject_forKey_ = - objc.registerName("encodeObject:forKey:"); -late final _sel_encodeConditionalObject_forKey_ = - objc.registerName("encodeConditionalObject:forKey:"); -late final _sel_encodeBool_forKey_ = objc.registerName("encodeBool:forKey:"); -final _objc_msgSend_296 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); -late final _sel_encodeInt_forKey_ = objc.registerName("encodeInt:forKey:"); -final _objc_msgSend_297 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_encodeInt32_forKey_ = objc.registerName("encodeInt32:forKey:"); -final _objc_msgSend_298 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_encodeInt64_forKey_ = objc.registerName("encodeInt64:forKey:"); -final _objc_msgSend_299 = 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_encodeFloat_forKey_ = objc.registerName("encodeFloat:forKey:"); -final _objc_msgSend_300 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Float, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - double, - ffi.Pointer)>(); -late final _sel_encodeDouble_forKey_ = - objc.registerName("encodeDouble:forKey:"); -final _objc_msgSend_301 = 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_encodeBytes_length_forKey_ = - objc.registerName("encodeBytes:length:forKey:"); -final _objc_msgSend_302 = 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_containsValueForKey_ = - objc.registerName("containsValueForKey:"); -late final _sel_decodeObjectForKey_ = objc.registerName("decodeObjectForKey:"); -late final _sel_decodeTopLevelObjectForKey_error_ = - objc.registerName("decodeTopLevelObjectForKey:error:"); -final _objc_msgSend_303 = 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_decodeBoolForKey_ = objc.registerName("decodeBoolForKey:"); -late final _sel_decodeIntForKey_ = objc.registerName("decodeIntForKey:"); -final _objc_msgSend_304 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_decodeInt32ForKey_ = objc.registerName("decodeInt32ForKey:"); -final _objc_msgSend_305 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_decodeInt64ForKey_ = objc.registerName("decodeInt64ForKey:"); -final _objc_msgSend_306 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int64 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_decodeFloatForKey_ = objc.registerName("decodeFloatForKey:"); -final _objc_msgSend_307 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Float Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - double Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_307Fpret = objc.msgSendFpretPointer - .cast< - ffi.NativeFunction< - ffi.Float Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - double Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_decodeDoubleForKey_ = objc.registerName("decodeDoubleForKey:"); -final _objc_msgSend_308 = 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_308Fpret = objc.msgSendFpretPointer - .cast< - ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - double Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_decodeBytesForKey_returnedLength_ = - objc.registerName("decodeBytesForKey:returnedLength:"); -final _objc_msgSend_309 = 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_encodeInteger_forKey_ = - objc.registerName("encodeInteger:forKey:"); -final _objc_msgSend_310 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_decodeIntegerForKey_ = - objc.registerName("decodeIntegerForKey:"); -late final _sel_requiresSecureCoding = - objc.registerName("requiresSecureCoding"); -late final _sel_decodeObjectOfClass_forKey_ = - objc.registerName("decodeObjectOfClass:forKey:"); -final _objc_msgSend_311 = 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_decodeTopLevelObjectOfClass_forKey_error_ = - objc.registerName("decodeTopLevelObjectOfClass:forKey:error:"); -final _objc_msgSend_312 = 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_decodeArrayOfObjectsOfClass_forKey_ = - objc.registerName("decodeArrayOfObjectsOfClass:forKey:"); -final _objc_msgSend_313 = 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_decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_ = - objc.registerName("decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:"); -final _objc_msgSend_314 = 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_decodeObjectOfClasses_forKey_ = - objc.registerName("decodeObjectOfClasses:forKey:"); -final _objc_msgSend_315 = 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_decodeTopLevelObjectOfClasses_forKey_error_ = - objc.registerName("decodeTopLevelObjectOfClasses:forKey: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_decodeArrayOfObjectsOfClasses_forKey_ = - objc.registerName("decodeArrayOfObjectsOfClasses:forKey:"); -final _objc_msgSend_317 = 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_decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_ = - objc.registerName( - "decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:"); -final _objc_msgSend_318 = 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_decodePropertyListForKey_ = - objc.registerName("decodePropertyListForKey:"); -late final _sel_allowedClasses = objc.registerName("allowedClasses"); -final _objc_msgSend_319 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_failWithError_ = objc.registerName("failWithError:"); -final _objc_msgSend_320 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSDecodingFailurePolicy { - static const int NSDecodingFailurePolicyRaiseException = 0; - static const int NSDecodingFailurePolicySetErrorAndReturn = 1; -} - -late final _sel_decodingFailurePolicy = - objc.registerName("decodingFailurePolicy"); -final _objc_msgSend_321 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_error = objc.registerName("error"); -final _objc_msgSend_322 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_encodeNXObject_ = objc.registerName("encodeNXObject:"); -late final _sel_decodeNXObject = objc.registerName("decodeNXObject"); -late final _sel_decodeValueOfObjCType_at_ = - objc.registerName("decodeValueOfObjCType:at:"); -late final _sel_encodePoint_ = objc.registerName("encodePoint:"); -final _objc_msgSend_323 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, CGPoint)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, CGPoint)>(); -late final _sel_decodePoint = objc.registerName("decodePoint"); -late final _sel_encodeSize_ = objc.registerName("encodeSize:"); -final _objc_msgSend_324 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, CGSize)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, CGSize)>(); -late final _sel_decodeSize = objc.registerName("decodeSize"); -late final _sel_encodeRect_ = objc.registerName("encodeRect:"); -final _objc_msgSend_325 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, CGRect)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, CGRect)>(); -late final _sel_decodeRect = objc.registerName("decodeRect"); -late final _sel_encodePoint_forKey_ = objc.registerName("encodePoint:forKey:"); -final _objc_msgSend_326 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - CGPoint, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - CGPoint, - ffi.Pointer)>(); -late final _sel_encodeSize_forKey_ = objc.registerName("encodeSize:forKey:"); -final _objc_msgSend_327 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - CGSize, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - CGSize, - ffi.Pointer)>(); -late final _sel_encodeRect_forKey_ = objc.registerName("encodeRect:forKey:"); -final _objc_msgSend_328 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - CGRect, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - CGRect, - ffi.Pointer)>(); -late final _sel_decodePointForKey_ = objc.registerName("decodePointForKey:"); -final _objc_msgSend_329 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - CGPoint Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - CGPoint Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_329Stret = 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_decodeSizeForKey_ = objc.registerName("decodeSizeForKey:"); -final _objc_msgSend_330 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - CGSize Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - CGSize Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_330Stret = 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_decodeRectForKey_ = objc.registerName("decodeRectForKey:"); -final _objc_msgSend_331 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - CGRect Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - CGRect Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_331Stret = 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_substringFromIndex_ = objc.registerName("substringFromIndex:"); -final _objc_msgSend_332 = 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_substringToIndex_ = objc.registerName("substringToIndex:"); -late final _sel_substringWithRange_ = objc.registerName("substringWithRange:"); -final _objc_msgSend_333 = 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_getCharacters_range_ = - objc.registerName("getCharacters:range:"); -final _objc_msgSend_334 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -final _objc_msgSend_335 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSStringCompareOptions { - static const int NSCaseInsensitiveSearch = 1; - static const int NSLiteralSearch = 2; - static const int NSBackwardsSearch = 4; - static const int NSAnchoredSearch = 8; - static const int NSNumericSearch = 64; - static const int NSDiacriticInsensitiveSearch = 128; - static const int NSWidthInsensitiveSearch = 256; - static const int NSForcedOrderingSearch = 512; - static const int NSRegularExpressionSearch = 1024; -} - -late final _sel_compare_options_ = objc.registerName("compare:options:"); -final _objc_msgSend_336 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_compare_options_range_ = - objc.registerName("compare:options:range:"); -final _objc_msgSend_337 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -late final _sel_compare_options_range_locale_ = - objc.registerName("compare:options:range:locale:"); -final _objc_msgSend_338 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange, - ffi.Pointer)>(); -late final _sel_caseInsensitiveCompare_ = - objc.registerName("caseInsensitiveCompare:"); -late final _sel_localizedCompare_ = objc.registerName("localizedCompare:"); -late final _sel_localizedCaseInsensitiveCompare_ = - objc.registerName("localizedCaseInsensitiveCompare:"); -late final _sel_localizedStandardCompare_ = - objc.registerName("localizedStandardCompare:"); -late final _sel_isEqualToString_ = objc.registerName("isEqualToString:"); -late final _sel_hasPrefix_ = objc.registerName("hasPrefix:"); -late final _sel_hasSuffix_ = objc.registerName("hasSuffix:"); -late final _sel_commonPrefixWithString_options_ = - objc.registerName("commonPrefixWithString:options:"); -final _objc_msgSend_339 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_containsString_ = objc.registerName("containsString:"); -late final _sel_localizedCaseInsensitiveContainsString_ = - objc.registerName("localizedCaseInsensitiveContainsString:"); -late final _sel_localizedStandardContainsString_ = - objc.registerName("localizedStandardContainsString:"); -late final _sel_localizedStandardRangeOfString_ = - objc.registerName("localizedStandardRangeOfString:"); -final _objc_msgSend_340 = 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_340Stret = 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_rangeOfString_ = objc.registerName("rangeOfString:"); -late final _sel_rangeOfString_options_ = - objc.registerName("rangeOfString:options:"); -final _objc_msgSend_341 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -final _objc_msgSend_341Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_rangeOfString_options_range_ = - objc.registerName("rangeOfString:options:range:"); -final _objc_msgSend_342 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -final _objc_msgSend_342Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -late final _sel_rangeOfString_options_range_locale_ = - objc.registerName("rangeOfString:options:range:locale:"); -final _objc_msgSend_343 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>() - .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange, - ffi.Pointer)>(); -final _objc_msgSend_343Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange, - ffi.Pointer)>(); -late final _sel_rangeOfCharacterFromSet_ = - objc.registerName("rangeOfCharacterFromSet:"); -final _objc_msgSend_344 = 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_344Stret = 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_rangeOfCharacterFromSet_options_ = - objc.registerName("rangeOfCharacterFromSet:options:"); -final _objc_msgSend_345 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -final _objc_msgSend_345Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_rangeOfCharacterFromSet_options_range_ = - objc.registerName("rangeOfCharacterFromSet:options:range:"); -final _objc_msgSend_346 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -final _objc_msgSend_346Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -late final _sel_rangeOfComposedCharacterSequenceAtIndex_ = - objc.registerName("rangeOfComposedCharacterSequenceAtIndex:"); -final _objc_msgSend_347 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, int)>(); -final _objc_msgSend_347Stret = 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_rangeOfComposedCharacterSequencesForRange_ = - objc.registerName("rangeOfComposedCharacterSequencesForRange:"); -final _objc_msgSend_348 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() - .asFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); -final _objc_msgSend_348Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, _NSRange)>(); -late final _sel_stringByAppendingString_ = - objc.registerName("stringByAppendingString:"); -late final _sel_stringByAppendingFormat_ = - objc.registerName("stringByAppendingFormat:"); -late final _sel_uppercaseString = objc.registerName("uppercaseString"); -late final _sel_lowercaseString = objc.registerName("lowercaseString"); -late final _sel_capitalizedString = objc.registerName("capitalizedString"); -late final _sel_localizedUppercaseString = - objc.registerName("localizedUppercaseString"); -late final _sel_localizedLowercaseString = - objc.registerName("localizedLowercaseString"); -late final _sel_localizedCapitalizedString = - objc.registerName("localizedCapitalizedString"); -late final _sel_uppercaseStringWithLocale_ = - objc.registerName("uppercaseStringWithLocale:"); -final _objc_msgSend_349 = 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_lowercaseStringWithLocale_ = - objc.registerName("lowercaseStringWithLocale:"); -late final _sel_capitalizedStringWithLocale_ = - objc.registerName("capitalizedStringWithLocale:"); -late final _sel_getLineStart_end_contentsEnd_forRange_ = - objc.registerName("getLineStart:end:contentsEnd:forRange:"); -final _objc_msgSend_350 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_lineRangeForRange_ = objc.registerName("lineRangeForRange:"); -late final _sel_getParagraphStart_end_contentsEnd_forRange_ = - objc.registerName("getParagraphStart:end:contentsEnd:forRange:"); -late final _sel_paragraphRangeForRange_ = - objc.registerName("paragraphRangeForRange:"); - -abstract class NSStringEnumerationOptions { - static const int NSStringEnumerationByLines = 0; - static const int NSStringEnumerationByParagraphs = 1; - static const int NSStringEnumerationByComposedCharacterSequences = 2; - static const int NSStringEnumerationByWords = 3; - static const int NSStringEnumerationBySentences = 4; - static const int NSStringEnumerationByCaretPositions = 5; - static const int NSStringEnumerationByDeletionClusters = 6; - static const int NSStringEnumerationReverse = 256; - static const int NSStringEnumerationSubstringNotRequired = 512; - static const int NSStringEnumerationLocalized = 1024; -} - -void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function(ffi.Pointer, _NSRange, _NSRange, - ffi.Pointer)>()(arg0, arg1, arg2, arg3); -final _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry = , _NSRange, _NSRange, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( - void Function(ffi.Pointer, _NSRange, _NSRange, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3) => - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2, arg3); - -class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool - extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunction( - void Function(NSString?, _NSRange, _NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - _NSRange arg2, ffi.Pointer arg3) => - fn(arg0.address == 0 ? null : NSString._(arg0, retain: true, release: true), arg1, arg2, arg3)))); - 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_NSString_NSRange_NSRange_bool.listener( - void Function(NSString?, _NSRange, _NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - _NSRange arg2, ffi.Pointer arg3) => - fn(arg0.address == 0 ? null : NSString._(arg0, retain: true, release: true), arg1, arg2, arg3)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSString? arg0, _NSRange arg1, _NSRange arg2, - ffi.Pointer arg3) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2, arg3); -} - -late final _sel_enumerateSubstringsInRange_options_usingBlock_ = - objc.registerName("enumerateSubstringsInRange:options:usingBlock:"); -final _objc_msgSend_351 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); -void _ObjCBlock_ffiVoid_NSString_bool_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); -final _ObjCBlock_ffiVoid_NSString_bool_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSString_bool_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_ffiVoid_NSString_bool extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSString_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_NSString_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSString_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - objc - .newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_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_NSString_bool.fromFunction( - void Function(NSString, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSString_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSString._(arg0, retain: true, release: true), arg1)))); - 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_NSString_bool.listener( - void Function(NSString, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSString_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSString._(arg0, retain: true, release: true), arg1)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSString arg0, ffi.Pointer 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, arg1); -} - -late final _sel_enumerateLinesUsingBlock_ = - objc.registerName("enumerateLinesUsingBlock:"); -final _objc_msgSend_352 = 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_UTF8String = objc.registerName("UTF8String"); -late final _sel_fastestEncoding = objc.registerName("fastestEncoding"); -late final _sel_smallestEncoding = objc.registerName("smallestEncoding"); -late final _sel_dataUsingEncoding_allowLossyConversion_ = - objc.registerName("dataUsingEncoding:allowLossyConversion:"); -final _objc_msgSend_353 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong, ffi.Bool)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, bool)>(); -late final _sel_dataUsingEncoding_ = objc.registerName("dataUsingEncoding:"); -final _objc_msgSend_354 = 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_canBeConvertedToEncoding_ = - objc.registerName("canBeConvertedToEncoding:"); -late final _sel_cStringUsingEncoding_ = - objc.registerName("cStringUsingEncoding:"); -late final _sel_getCString_maxLength_encoding_ = - objc.registerName("getCString:maxLength:encoding:"); -final _objc_msgSend_355 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int)>(); - -abstract class NSStringEncodingConversionOptions { - static const int NSStringEncodingConversionAllowLossy = 1; - static const int NSStringEncodingConversionExternalRepresentation = 2; -} - -late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_ = - objc.registerName( - "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); -final _objc_msgSend_356 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Int32, - _NSRange, - ffi.Pointer<_NSRange>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int, - int, - _NSRange, - ffi.Pointer<_NSRange>)>(); -late final _sel_maximumLengthOfBytesUsingEncoding_ = - objc.registerName("maximumLengthOfBytesUsingEncoding:"); -late final _sel_lengthOfBytesUsingEncoding_ = - objc.registerName("lengthOfBytesUsingEncoding:"); -late final _sel_availableStringEncodings = - objc.registerName("availableStringEncodings"); -final _objc_msgSend_357 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_localizedNameOfStringEncoding_ = - objc.registerName("localizedNameOfStringEncoding:"); -late final _sel_defaultCStringEncoding = - objc.registerName("defaultCStringEncoding"); -late final _sel_decomposedStringWithCanonicalMapping = - objc.registerName("decomposedStringWithCanonicalMapping"); -late final _sel_precomposedStringWithCanonicalMapping = - objc.registerName("precomposedStringWithCanonicalMapping"); -late final _sel_decomposedStringWithCompatibilityMapping = - objc.registerName("decomposedStringWithCompatibilityMapping"); -late final _sel_precomposedStringWithCompatibilityMapping = - objc.registerName("precomposedStringWithCompatibilityMapping"); -late final _sel_componentsSeparatedByString_ = - objc.registerName("componentsSeparatedByString:"); -final _objc_msgSend_358 = 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_componentsSeparatedByCharactersInSet_ = - objc.registerName("componentsSeparatedByCharactersInSet:"); -final _objc_msgSend_359 = 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_stringByTrimmingCharactersInSet_ = - objc.registerName("stringByTrimmingCharactersInSet:"); -final _objc_msgSend_360 = 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_stringByPaddingToLength_withString_startingAtIndex_ = - objc.registerName("stringByPaddingToLength:withString:startingAtIndex:"); -final _objc_msgSend_361 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int)>(); -late final _sel_stringByFoldingWithOptions_locale_ = - objc.registerName("stringByFoldingWithOptions:locale:"); -final _objc_msgSend_362 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_ = - objc.registerName( - "stringByReplacingOccurrencesOfString:withString:options:range:"); -final _objc_msgSend_363 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -late final _sel_stringByReplacingOccurrencesOfString_withString_ = - objc.registerName("stringByReplacingOccurrencesOfString:withString:"); -final _objc_msgSend_364 = 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_stringByReplacingCharactersInRange_withString_ = - objc.registerName("stringByReplacingCharactersInRange:withString:"); -final _objc_msgSend_365 = 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_stringByApplyingTransform_reverse_ = - objc.registerName("stringByApplyingTransform:reverse:"); -final _objc_msgSend_366 = 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_writeToURL_atomically_encoding_error_ = - objc.registerName("writeToURL:atomically:encoding:error:"); -final _objc_msgSend_367 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.UnsignedLong, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); -late final _sel_writeToFile_atomically_encoding_error_ = - objc.registerName("writeToFile:atomically:encoding:error:"); -final _objc_msgSend_368 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.UnsignedLong, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); -late final _sel_hash = objc.registerName("hash"); -late final _sel_initWithCharactersNoCopy_length_freeWhenDone_ = - objc.registerName("initWithCharactersNoCopy:length:freeWhenDone:"); -final _objc_msgSend_369 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - bool)>(); -void _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1)>>() - .asFunction, int)>()( - arg0, arg1); -final _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry = - , int)>{}; -int _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( - void Function(ffi.Pointer, int) fn) { - final id = - ++_ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1) => - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong - extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong._( - 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_ffiUnsignedShort_ffiUnsignedLong castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong._(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_ffiUnsignedShort_ffiUnsignedLong.fromFunctionPointer( - ffi - .Pointer< - ffi - .NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_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_ffiUnsignedShort_ffiUnsignedLong.fromFunction( - void Function(ffi.Pointer, int) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => - fn(arg0, arg1)))); - 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_ffiUnsignedShort_ffiUnsignedLong.listener( - void Function(ffi.Pointer, int) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>.listener( - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => - fn(arg0, arg1)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>? _dartFuncListenerTrampoline; - - void call(ffi.Pointer arg0, int arg1) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.UnsignedLong arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>()(pointer, arg0, arg1); -} - -late final _sel_initWithCharactersNoCopy_length_deallocator_ = - objc.registerName("initWithCharactersNoCopy:length:deallocator:"); -final _objc_msgSend_370 = 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_initWithCharacters_length_ = - objc.registerName("initWithCharacters:length:"); -final _objc_msgSend_371 = 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_initWithUTF8String_ = objc.registerName("initWithUTF8String:"); -final _objc_msgSend_372 = 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_initWithFormat_ = objc.registerName("initWithFormat:"); -late final _sel_initWithFormat_arguments_ = - objc.registerName("initWithFormat:arguments:"); -final _objc_msgSend_373 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); -late final _sel_initWithFormat_locale_ = - objc.registerName("initWithFormat:locale:"); -final _objc_msgSend_374 = 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_initWithFormat_locale_arguments_ = - objc.registerName("initWithFormat:locale:arguments:"); -final _objc_msgSend_375 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); -late final _sel_initWithValidatedFormat_validFormatSpecifiers_error_ = - objc.registerName("initWithValidatedFormat:validFormatSpecifiers:error:"); -final _objc_msgSend_376 = 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_initWithValidatedFormat_validFormatSpecifiers_locale_error_ = - objc.registerName( - "initWithValidatedFormat:validFormatSpecifiers:locale:error:"); -final _objc_msgSend_377 = 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_initWithValidatedFormat_validFormatSpecifiers_arguments_error_ = - objc.registerName( - "initWithValidatedFormat:validFormatSpecifiers:arguments:error:"); -final _objc_msgSend_378 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>(); -late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_ = - objc.registerName( - "initWithValidatedFormat:validFormatSpecifiers:locale:arguments:error:"); -final _objc_msgSend_379 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>(); -late final _sel_initWithData_encoding_ = - objc.registerName("initWithData:encoding:"); -final _objc_msgSend_380 = 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_initWithBytes_length_encoding_ = - objc.registerName("initWithBytes:length:encoding:"); -final _objc_msgSend_381 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int)>(); -late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_ = - objc.registerName("initWithBytesNoCopy:length:encoding:freeWhenDone:"); -final _objc_msgSend_382 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Bool)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - bool)>(); -late final _sel_initWithBytesNoCopy_length_encoding_deallocator_ = - objc.registerName("initWithBytesNoCopy:length:encoding:deallocator:"); -final _objc_msgSend_383 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer)>(); -late final _sel_string = objc.registerName("string"); -late final _sel_stringWithString_ = objc.registerName("stringWithString:"); -late final _sel_stringWithCharacters_length_ = - objc.registerName("stringWithCharacters:length:"); -late final _sel_stringWithUTF8String_ = - objc.registerName("stringWithUTF8String:"); -late final _sel_stringWithFormat_ = objc.registerName("stringWithFormat:"); -late final _sel_localizedStringWithFormat_ = - objc.registerName("localizedStringWithFormat:"); -late final _sel_stringWithValidatedFormat_validFormatSpecifiers_error_ = - objc.registerName("stringWithValidatedFormat:validFormatSpecifiers:error:"); -late final _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_ = - objc.registerName( - "localizedStringWithValidatedFormat:validFormatSpecifiers:error:"); -late final _sel_initWithCString_encoding_ = - objc.registerName("initWithCString:encoding:"); -final _objc_msgSend_384 = 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_stringWithCString_encoding_ = - objc.registerName("stringWithCString:encoding:"); -late final _sel_initWithContentsOfURL_encoding_error_ = - objc.registerName("initWithContentsOfURL:encoding:error:"); -final _objc_msgSend_385 = 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_initWithContentsOfFile_encoding_error_ = - objc.registerName("initWithContentsOfFile:encoding:error:"); -final _objc_msgSend_386 = 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_stringWithContentsOfURL_encoding_error_ = - objc.registerName("stringWithContentsOfURL:encoding:error:"); -late final _sel_stringWithContentsOfFile_encoding_error_ = - objc.registerName("stringWithContentsOfFile:encoding:error:"); -late final _sel_initWithContentsOfURL_usedEncoding_error_ = - objc.registerName("initWithContentsOfURL:usedEncoding:error:"); -final _objc_msgSend_387 = 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_initWithContentsOfFile_usedEncoding_error_ = - objc.registerName("initWithContentsOfFile:usedEncoding:error:"); -final _objc_msgSend_388 = 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_stringWithContentsOfURL_usedEncoding_error_ = - objc.registerName("stringWithContentsOfURL:usedEncoding:error:"); -late final _sel_stringWithContentsOfFile_usedEncoding_error_ = - objc.registerName("stringWithContentsOfFile:usedEncoding:error:"); -late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_ = - objc.registerName( - "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); -final _objc_msgSend_389 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); -late final _sel_propertyList = objc.registerName("propertyList"); -late final _sel_propertyListFromStringsFileFormat = - objc.registerName("propertyListFromStringsFileFormat"); -final _objc_msgSend_390 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_cString = objc.registerName("cString"); -late final _sel_lossyCString = objc.registerName("lossyCString"); -late final _sel_cStringLength = objc.registerName("cStringLength"); -late final _sel_getCString_ = objc.registerName("getCString:"); -late final _sel_getCString_maxLength_ = - objc.registerName("getCString:maxLength:"); -final _objc_msgSend_391 = 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_getCString_maxLength_range_remainingRange_ = - objc.registerName("getCString:maxLength:range:remainingRange:"); -final _objc_msgSend_392 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - _NSRange, - ffi.Pointer<_NSRange>)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange, - ffi.Pointer<_NSRange>)>(); -late final _sel_stringWithContentsOfFile_ = - objc.registerName("stringWithContentsOfFile:"); -late final _sel_stringWithContentsOfURL_ = - objc.registerName("stringWithContentsOfURL:"); -late final _sel_initWithCStringNoCopy_length_freeWhenDone_ = - objc.registerName("initWithCStringNoCopy:length:freeWhenDone:"); -final _objc_msgSend_393 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - bool)>(); -late final _sel_initWithCString_length_ = - objc.registerName("initWithCString:length:"); -late final _sel_initWithCString_ = objc.registerName("initWithCString:"); -late final _sel_stringWithCString_length_ = - objc.registerName("stringWithCString:length:"); -late final _sel_stringWithCString_ = objc.registerName("stringWithCString:"); -late final _sel_getCharacters_ = objc.registerName("getCharacters:"); -final _objc_msgSend_394 = 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_variantFittingPresentationWidth_ = - objc.registerName("variantFittingPresentationWidth:"); -final _objc_msgSend_395 = 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_pathWithComponents_ = objc.registerName("pathWithComponents:"); -final _objc_msgSend_396 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_isAbsolutePath = objc.registerName("isAbsolutePath"); -late final _sel_stringByDeletingLastPathComponent = - objc.registerName("stringByDeletingLastPathComponent"); -late final _sel_stringByAppendingPathComponent_ = - objc.registerName("stringByAppendingPathComponent:"); -late final _sel_stringByDeletingPathExtension = - objc.registerName("stringByDeletingPathExtension"); -late final _sel_stringByAppendingPathExtension_ = - objc.registerName("stringByAppendingPathExtension:"); -late final _sel_stringByAbbreviatingWithTildeInPath = - objc.registerName("stringByAbbreviatingWithTildeInPath"); -late final _sel_stringByExpandingTildeInPath = - objc.registerName("stringByExpandingTildeInPath"); -late final _sel_stringByStandardizingPath = - objc.registerName("stringByStandardizingPath"); -late final _sel_stringByResolvingSymlinksInPath = - objc.registerName("stringByResolvingSymlinksInPath"); -late final _sel_stringsByAppendingPaths_ = - objc.registerName("stringsByAppendingPaths:"); -late final _sel_completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_ = - objc.registerName( - "completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:"); -final _objc_msgSend_397 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Bool, - ffi.Pointer>, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - bool, - ffi.Pointer>, - ffi.Pointer)>(); -late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_ = - objc.registerName("stringByAddingPercentEncodingWithAllowedCharacters:"); -final _objc_msgSend_398 = 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_stringByRemovingPercentEncoding = - objc.registerName("stringByRemovingPercentEncoding"); -late final _sel_stringByAddingPercentEscapesUsingEncoding_ = - objc.registerName("stringByAddingPercentEscapesUsingEncoding:"); -final _objc_msgSend_399 = 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_stringByReplacingPercentEscapesUsingEncoding_ = - objc.registerName("stringByReplacingPercentEscapesUsingEncoding:"); - -abstract class NSLinguisticTaggerOptions { - static const int NSLinguisticTaggerOmitWords = 1; - static const int NSLinguisticTaggerOmitPunctuation = 2; - static const int NSLinguisticTaggerOmitWhitespace = 4; - static const int NSLinguisticTaggerOmitOther = 8; - static const int NSLinguisticTaggerJoinNames = 16; -} - -class NSOrthography extends NSObject { - NSOrthography._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSOrthography] that points to the same underlying object as [other]. - static NSOrthography castFrom(T other) { - return NSOrthography._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSOrthography] that wraps the given raw object pointer. - static NSOrthography castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOrthography._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSOrthography]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSOrthography); - } - - NSString get dominantScript { - final _ret = _objc_msgSend_21(this.pointer, _sel_dominantScript); - return NSString._(_ret, retain: true, release: true); - } - - NSDictionary get languageMap { - final _ret = _objc_msgSend_181(this.pointer, _sel_languageMap); - return NSDictionary._(_ret, retain: true, release: true); - } - - NSOrthography initWithDominantScript_languageMap_( - NSString script, NSDictionary map) { - final _ret = _objc_msgSend_400(this.pointer, - _sel_initWithDominantScript_languageMap_, script.pointer, map.pointer); - return NSOrthography._(_ret, retain: true, release: true); - } - - NSOrthography? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSOrthography._(_ret, retain: true, release: true); - } - - NSArray? languagesForScript_(NSString script) { - final _ret = _objc_msgSend_132( - this.pointer, _sel_languagesForScript_, script.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSString? dominantLanguageForScript_(NSString script) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_dominantLanguageForScript_, script.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString get dominantLanguage { - final _ret = _objc_msgSend_21(this.pointer, _sel_dominantLanguage); - return NSString._(_ret, retain: true, release: true); - } - - NSArray get allScripts { - final _ret = _objc_msgSend_85(this.pointer, _sel_allScripts); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get allLanguages { - final _ret = _objc_msgSend_85(this.pointer, _sel_allLanguages); - return NSArray._(_ret, retain: true, release: true); - } - - static NSOrthography defaultOrthographyForLanguage_(NSString language) { - final _ret = _objc_msgSend_31(_class_NSOrthography, - _sel_defaultOrthographyForLanguage_, language.pointer); - return NSOrthography._(_ret, retain: true, release: true); - } - - static NSOrthography orthographyWithDominantScript_languageMap_( - NSString script, NSDictionary map) { - final _ret = _objc_msgSend_400( - _class_NSOrthography, - _sel_orthographyWithDominantScript_languageMap_, - script.pointer, - map.pointer); - return NSOrthography._(_ret, retain: true, release: true); - } - - @override - NSOrthography init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSOrthography._(_ret, retain: true, release: true); - } - - static NSOrthography new1() { - final _ret = _objc_msgSend_2(_class_NSOrthography, _sel_new); - return NSOrthography._(_ret, retain: false, release: true); - } - - static NSOrthography allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSOrthography, _sel_allocWithZone_, zone); - return NSOrthography._(_ret, retain: false, release: true); - } - - static NSOrthography alloc() { - final _ret = _objc_msgSend_2(_class_NSOrthography, _sel_alloc); - return NSOrthography._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSOrthography, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSOrthography, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSOrthography, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSOrthography, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSOrthography, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSOrthography, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSOrthography, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSOrthography, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSOrthography, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSOrthography = objc.getClass("NSOrthography"); -late final _sel_dominantScript = objc.registerName("dominantScript"); -late final _sel_languageMap = objc.registerName("languageMap"); -late final _sel_initWithDominantScript_languageMap_ = - objc.registerName("initWithDominantScript:languageMap:"); -final _objc_msgSend_400 = 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:"); -late final _sel_linguisticTagsInRange_scheme_options_orthography_tokenRanges_ = - objc.registerName( - "linguisticTagsInRange:scheme:options:orthography:tokenRanges:"); -final _objc_msgSend_401 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer>)>(); -late final _sel_enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_ = - objc.registerName( - "enumerateLinguisticTagsInRange:scheme:options:orthography:usingBlock:"); -final _objc_msgSend_402 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_anyObject = objc.registerName("anyObject"); -late final _sel_intersectsSet_ = objc.registerName("intersectsSet:"); -final _objc_msgSend_403 = 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_isEqualToSet_ = objc.registerName("isEqualToSet:"); -late final _sel_isSubsetOfSet_ = objc.registerName("isSubsetOfSet:"); -late final _sel_setByAddingObject_ = objc.registerName("setByAddingObject:"); -final _objc_msgSend_404 = 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_setByAddingObjectsFromSet_ = - objc.registerName("setByAddingObjectsFromSet:"); -final _objc_msgSend_405 = 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_setByAddingObjectsFromArray_ = - objc.registerName("setByAddingObjectsFromArray:"); -final _objc_msgSend_406 = 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_objcObjCObject_bool_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); -final _ObjCBlock_ffiVoid_objcObjCObject_bool_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_objcObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_bool_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_objcObjCObject_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_objcObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_objcObjCObject_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_objcObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_objcObjCObject_bool extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_objcObjCObject_bool._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_objcObjCObject_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_objcObjCObject_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_objcObjCObject_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_objcObjCObject_bool.fromFunction( - void Function(NSObject, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSObject._(arg0, retain: true, release: true), arg1)))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_objcObjCObject_bool.listener( - void Function(NSObject, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSObject._(arg0, retain: true, release: true), arg1)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject arg0, ffi.Pointer 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, arg1); -} - -final _objc_msgSend_407 = 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_408 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -bool _ObjCBlock_bool_objcObjCObject_bool_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); -final _ObjCBlock_bool_objcObjCObject_bool_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_bool_objcObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_objcObjCObject_bool_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_objcObjCObject_bool_closureRegistryIndex; - _ObjCBlock_bool_objcObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_objcObjCObject_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_objcObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_bool_objcObjCObject_bool extends objc.ObjCBlockBase { - ObjCBlock_bool_objcObjCObject_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_bool_objcObjCObject_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_bool_objcObjCObject_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_objcObjCObject_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_bool_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_objcObjCObject_bool.fromFunction( - bool Function(NSObject, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_bool_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_objcObjCObject_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSObject._(arg0, retain: true, release: true), arg1)))); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, ffi.Pointer 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); -} - -late final _sel_objectsPassingTest_ = objc.registerName("objectsPassingTest:"); -final _objc_msgSend_409 = 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_objectsWithOptions_passingTest_ = - objc.registerName("objectsWithOptions:passingTest:"); -final _objc_msgSend_410 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_set = objc.registerName("set"); -late final _sel_setWithObject_ = objc.registerName("setWithObject:"); -late final _sel_setWithObjects_count_ = - objc.registerName("setWithObjects:count:"); -late final _sel_setWithObjects_ = objc.registerName("setWithObjects:"); -late final _sel_setWithSet_ = objc.registerName("setWithSet:"); -final _objc_msgSend_411 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setWithArray_ = objc.registerName("setWithArray:"); -late final _sel_initWithSet_ = objc.registerName("initWithSet:"); -late final _sel_initWithSet_copyItems_ = - objc.registerName("initWithSet:copyItems:"); -final _objc_msgSend_412 = 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_filteredSetUsingPredicate_ = - objc.registerName("filteredSetUsingPredicate:"); -final _objc_msgSend_413 = 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_invocationWithMethodSignature_ = - objc.registerName("invocationWithMethodSignature:"); -final _objc_msgSend_414 = 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_methodSignature = objc.registerName("methodSignature"); -final _objc_msgSend_415 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_retainArguments = objc.registerName("retainArguments"); -late final _sel_argumentsRetained = objc.registerName("argumentsRetained"); -late final _sel_target = objc.registerName("target"); -late final _sel_setTarget_ = objc.registerName("setTarget:"); -final _objc_msgSend_416 = 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_selector = objc.registerName("selector"); -final _objc_msgSend_417 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setSelector_ = objc.registerName("setSelector:"); -final _objc_msgSend_418 = 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_getReturnValue_ = objc.registerName("getReturnValue:"); -late final _sel_setReturnValue_ = objc.registerName("setReturnValue:"); -late final _sel_getArgument_atIndex_ = - objc.registerName("getArgument:atIndex:"); -final _objc_msgSend_419 = 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_setArgument_atIndex_ = - objc.registerName("setArgument:atIndex:"); -late final _sel_invoke = objc.registerName("invoke"); -late final _sel_invokeWithTarget_ = objc.registerName("invokeWithTarget:"); -late final _sel_invokeUsingIMP_ = objc.registerName("invokeUsingIMP:"); -final _objc_msgSend_420 = 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_forwardInvocation_ = objc.registerName("forwardInvocation:"); -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_methodSignatureForSelector_ = - objc.registerName("methodSignatureForSelector:"); -final _objc_msgSend_422 = 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_instanceMethodSignatureForSelector_ = - objc.registerName("instanceMethodSignatureForSelector:"); -late final _sel_allowsWeakReference = objc.registerName("allowsWeakReference"); -late final _sel_retainWeakReference = objc.registerName("retainWeakReference"); -late final _sel_isSubclassOfClass_ = objc.registerName("isSubclassOfClass:"); -late final _sel_resolveClassMethod_ = objc.registerName("resolveClassMethod:"); -late final _sel_resolveInstanceMethod_ = - objc.registerName("resolveInstanceMethod:"); -late final _sel_superclass = objc.registerName("superclass"); -late final _sel_class = objc.registerName("class"); -late final _sel_debugDescription = objc.registerName("debugDescription"); -late final _sel_version = objc.registerName("version"); -late final _sel_setVersion_ = objc.registerName("setVersion:"); -final _objc_msgSend_423 = 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_classForCoder = objc.registerName("classForCoder"); -late final _sel_replacementObjectForCoder_ = - objc.registerName("replacementObjectForCoder:"); -late final _sel_awakeAfterUsingCoder_ = - objc.registerName("awakeAfterUsingCoder:"); -late final _sel_poseAsClass_ = objc.registerName("poseAsClass:"); -late final _sel_autoContentAccessingProxy = - objc.registerName("autoContentAccessingProxy"); -late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_ = - objc.registerName( - "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); -final _objc_msgSend_424 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_attemptRecoveryFromError_optionIndex_ = - objc.registerName("attemptRecoveryFromError:optionIndex:"); -final _objc_msgSend_425 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_performSelector_withObject_afterDelay_inModes_ = - objc.registerName("performSelector:withObject:afterDelay:inModes:"); -final _objc_msgSend_426 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - double, - ffi.Pointer)>(); -late final _sel_performSelector_withObject_afterDelay_ = - objc.registerName("performSelector:withObject:afterDelay:"); -final _objc_msgSend_427 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - double)>(); -late final _sel_URL_resourceDataDidBecomeAvailable_ = - objc.registerName("URL:resourceDataDidBecomeAvailable:"); -final _objc_msgSend_428 = 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_URLResourceDidFinishLoading_ = - objc.registerName("URLResourceDidFinishLoading:"); -final _objc_msgSend_429 = 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_URLResourceDidCancelLoading_ = - objc.registerName("URLResourceDidCancelLoading:"); -late final _sel_URL_resourceDidFailLoadingWithReason_ = - objc.registerName("URL:resourceDidFailLoadingWithReason:"); -final _objc_msgSend_430 = 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)>(); - -class NSFileManager extends NSObject { - NSFileManager._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSFileManager] that points to the same underlying object as [other]. - static NSFileManager castFrom(T other) { - return NSFileManager._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSFileManager] that wraps the given raw object pointer. - static NSFileManager castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileManager._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSFileManager]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSFileManager); - } - - static NSFileManager getDefaultManager() { - final _ret = _objc_msgSend_431(_class_NSFileManager, _sel_defaultManager); - return NSFileManager._(_ret, retain: true, release: true); - } - - NSArray? mountedVolumeURLsIncludingResourceValuesForKeys_options_( - NSArray? propertyKeys, int options) { - final _ret = _objc_msgSend_432( - this.pointer, - _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_, - propertyKeys?.pointer ?? ffi.nullptr, - options); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - void unmountVolumeAtURL_options_completionHandler_( - NSURL url, int mask, ObjCBlock_ffiVoid_NSError completionHandler) { - _objc_msgSend_433( - this.pointer, - _sel_unmountVolumeAtURL_options_completionHandler_, - url.pointer, - mask, - completionHandler.pointer); - } - - NSArray? contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_( - NSURL url, - NSArray? keys, - int mask, - ffi.Pointer> error) { - final _ret = _objc_msgSend_434( - this.pointer, - _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_, - url.pointer, - keys?.pointer ?? ffi.nullptr, - mask, - error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSArray URLsForDirectory_inDomains_(int directory, int domainMask) { - final _ret = _objc_msgSend_435( - this.pointer, _sel_URLsForDirectory_inDomains_, directory, domainMask); - return NSArray._(_ret, retain: true, release: true); - } - - NSURL? URLForDirectory_inDomain_appropriateForURL_create_error_( - int directory, - int domain, - NSURL? url, - bool shouldCreate, - ffi.Pointer> error) { - final _ret = _objc_msgSend_436( - this.pointer, - _sel_URLForDirectory_inDomain_appropriateForURL_create_error_, - directory, - domain, - url?.pointer ?? ffi.nullptr, - shouldCreate, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - bool getRelationship_ofDirectoryAtURL_toItemAtURL_error_( - ffi.Pointer outRelationship, - NSURL directoryURL, - NSURL otherURL, - ffi.Pointer> error) { - return _objc_msgSend_437( - this.pointer, - _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_, - outRelationship, - directoryURL.pointer, - otherURL.pointer, - error); - } - - bool getRelationship_ofDirectory_inDomain_toItemAtURL_error_( - ffi.Pointer outRelationship, - int directory, - int domainMask, - NSURL url, - ffi.Pointer> error) { - return _objc_msgSend_438( - this.pointer, - _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_, - outRelationship, - directory, - domainMask, - url.pointer, - error); - } - - bool createDirectoryAtURL_withIntermediateDirectories_attributes_error_( - NSURL url, - bool createIntermediates, - NSDictionary? attributes, - ffi.Pointer> error) { - return _objc_msgSend_439( - this.pointer, - _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_, - url.pointer, - createIntermediates, - attributes?.pointer ?? ffi.nullptr, - error); - } - - bool createSymbolicLinkAtURL_withDestinationURL_error_(NSURL url, - NSURL destURL, ffi.Pointer> error) { - return _objc_msgSend_440( - this.pointer, - _sel_createSymbolicLinkAtURL_withDestinationURL_error_, - url.pointer, - destURL.pointer, - error); - } - - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); - } - - bool setAttributes_ofItemAtPath_error_(NSDictionary attributes, NSString path, - ffi.Pointer> error) { - return _objc_msgSend_441( - this.pointer, - _sel_setAttributes_ofItemAtPath_error_, - attributes.pointer, - path.pointer, - error); - } - - bool createDirectoryAtPath_withIntermediateDirectories_attributes_error_( - NSString path, - bool createIntermediates, - NSDictionary? attributes, - ffi.Pointer> error) { - return _objc_msgSend_442( - this.pointer, - _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_, - path.pointer, - createIntermediates, - attributes?.pointer ?? ffi.nullptr, - error); - } - - NSArray? contentsOfDirectoryAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_443(this.pointer, - _sel_contentsOfDirectoryAtPath_error_, path.pointer, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSArray? subpathsOfDirectoryAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_443(this.pointer, - _sel_subpathsOfDirectoryAtPath_error_, path.pointer, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSDictionary? attributesOfItemAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_444( - this.pointer, _sel_attributesOfItemAtPath_error_, path.pointer, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSDictionary? attributesOfFileSystemForPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_444(this.pointer, - _sel_attributesOfFileSystemForPath_error_, path.pointer, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - bool createSymbolicLinkAtPath_withDestinationPath_error_(NSString path, - NSString destPath, ffi.Pointer> error) { - return _objc_msgSend_445( - this.pointer, - _sel_createSymbolicLinkAtPath_withDestinationPath_error_, - path.pointer, - destPath.pointer, - error); - } - - NSString? destinationOfSymbolicLinkAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_446(this.pointer, - _sel_destinationOfSymbolicLinkAtPath_error_, path.pointer, error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - bool copyItemAtPath_toPath_error_(NSString srcPath, NSString dstPath, - ffi.Pointer> error) { - return _objc_msgSend_445(this.pointer, _sel_copyItemAtPath_toPath_error_, - srcPath.pointer, dstPath.pointer, error); - } - - bool moveItemAtPath_toPath_error_(NSString srcPath, NSString dstPath, - ffi.Pointer> error) { - return _objc_msgSend_445(this.pointer, _sel_moveItemAtPath_toPath_error_, - srcPath.pointer, dstPath.pointer, error); - } - - bool linkItemAtPath_toPath_error_(NSString srcPath, NSString dstPath, - ffi.Pointer> error) { - return _objc_msgSend_445(this.pointer, _sel_linkItemAtPath_toPath_error_, - srcPath.pointer, dstPath.pointer, error); - } - - bool removeItemAtPath_error_( - NSString path, ffi.Pointer> error) { - return _objc_msgSend_447( - this.pointer, _sel_removeItemAtPath_error_, path.pointer, error); - } - - bool copyItemAtURL_toURL_error_(NSURL srcURL, NSURL dstURL, - ffi.Pointer> error) { - return _objc_msgSend_440(this.pointer, _sel_copyItemAtURL_toURL_error_, - srcURL.pointer, dstURL.pointer, error); - } - - bool moveItemAtURL_toURL_error_(NSURL srcURL, NSURL dstURL, - ffi.Pointer> error) { - return _objc_msgSend_440(this.pointer, _sel_moveItemAtURL_toURL_error_, - srcURL.pointer, dstURL.pointer, error); - } - - bool linkItemAtURL_toURL_error_(NSURL srcURL, NSURL dstURL, - ffi.Pointer> error) { - return _objc_msgSend_440(this.pointer, _sel_linkItemAtURL_toURL_error_, - srcURL.pointer, dstURL.pointer, error); - } - - bool removeItemAtURL_error_( - NSURL URL, ffi.Pointer> error) { - return _objc_msgSend_89( - this.pointer, _sel_removeItemAtURL_error_, URL.pointer, error); - } - - bool trashItemAtURL_resultingItemURL_error_( - NSURL url, - ffi.Pointer> outResultingURL, - ffi.Pointer> error) { - return _objc_msgSend_448( - this.pointer, - _sel_trashItemAtURL_resultingItemURL_error_, - url.pointer, - outResultingURL, - error); - } - - NSDictionary? fileAttributesAtPath_traverseLink_(NSString path, bool yorn) { - final _ret = _objc_msgSend_449(this.pointer, - _sel_fileAttributesAtPath_traverseLink_, path.pointer, yorn); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - bool changeFileAttributes_atPath_(NSDictionary attributes, NSString path) { - return _objc_msgSend_450(this.pointer, _sel_changeFileAttributes_atPath_, - attributes.pointer, path.pointer); - } - - NSArray? directoryContentsAtPath_(NSString path) { - final _ret = _objc_msgSend_132( - this.pointer, _sel_directoryContentsAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSDictionary? fileSystemAttributesAtPath_(NSString path) { - final _ret = _objc_msgSend_156( - this.pointer, _sel_fileSystemAttributesAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSString? pathContentOfSymbolicLinkAtPath_(NSString path) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_pathContentOfSymbolicLinkAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - bool createSymbolicLinkAtPath_pathContent_( - NSString path, NSString otherpath) { - return _objc_msgSend_451( - this.pointer, - _sel_createSymbolicLinkAtPath_pathContent_, - path.pointer, - otherpath.pointer); - } - - bool createDirectoryAtPath_attributes_( - NSString path, NSDictionary attributes) { - return _objc_msgSend_452( - this.pointer, - _sel_createDirectoryAtPath_attributes_, - path.pointer, - attributes.pointer); - } - - bool linkPath_toPath_handler_( - NSString src, NSString dest, NSObject? handler) { - return _objc_msgSend_453(this.pointer, _sel_linkPath_toPath_handler_, - src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); - } - - bool copyPath_toPath_handler_( - NSString src, NSString dest, NSObject? handler) { - return _objc_msgSend_453(this.pointer, _sel_copyPath_toPath_handler_, - src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); - } - - bool movePath_toPath_handler_( - NSString src, NSString dest, NSObject? handler) { - return _objc_msgSend_453(this.pointer, _sel_movePath_toPath_handler_, - src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); - } - - bool removeFileAtPath_handler_(NSString path, NSObject? handler) { - return _objc_msgSend_454(this.pointer, _sel_removeFileAtPath_handler_, - path.pointer, handler?.pointer ?? ffi.nullptr); - } - - NSString get currentDirectoryPath { - final _ret = _objc_msgSend_21(this.pointer, _sel_currentDirectoryPath); - return NSString._(_ret, retain: true, release: true); - } - - bool changeCurrentDirectoryPath_(NSString path) { - return _objc_msgSend_64( - this.pointer, _sel_changeCurrentDirectoryPath_, path.pointer); - } - - bool fileExistsAtPath_(NSString path) { - return _objc_msgSend_64(this.pointer, _sel_fileExistsAtPath_, path.pointer); - } - - bool fileExistsAtPath_isDirectory_( - NSString path, ffi.Pointer isDirectory) { - return _objc_msgSend_455(this.pointer, _sel_fileExistsAtPath_isDirectory_, - path.pointer, isDirectory); - } - - bool isReadableFileAtPath_(NSString path) { - return _objc_msgSend_64( - this.pointer, _sel_isReadableFileAtPath_, path.pointer); - } - - bool isWritableFileAtPath_(NSString path) { - return _objc_msgSend_64( - this.pointer, _sel_isWritableFileAtPath_, path.pointer); - } - - bool isExecutableFileAtPath_(NSString path) { - return _objc_msgSend_64( - this.pointer, _sel_isExecutableFileAtPath_, path.pointer); - } - - bool isDeletableFileAtPath_(NSString path) { - return _objc_msgSend_64( - this.pointer, _sel_isDeletableFileAtPath_, path.pointer); - } - - bool contentsEqualAtPath_andPath_(NSString path1, NSString path2) { - return _objc_msgSend_451(this.pointer, _sel_contentsEqualAtPath_andPath_, - path1.pointer, path2.pointer); - } - - NSString displayNameAtPath_(NSString path) { - final _ret = - _objc_msgSend_69(this.pointer, _sel_displayNameAtPath_, path.pointer); - return NSString._(_ret, retain: true, release: true); - } - - NSArray? componentsToDisplayForPath_(NSString path) { - final _ret = _objc_msgSend_132( - this.pointer, _sel_componentsToDisplayForPath_, path.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSObject? enumeratorAtPath_(NSString path) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_enumeratorAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_( - NSURL url, - NSArray? keys, - int mask, - ObjCBlock_bool_NSURL_NSError? handler) { - final _ret = _objc_msgSend_456( - this.pointer, - _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_, - url.pointer, - keys?.pointer ?? ffi.nullptr, - mask, - handler?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSArray? subpathsAtPath_(NSString path) { - final _ret = - _objc_msgSend_132(this.pointer, _sel_subpathsAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSData? contentsAtPath_(NSString path) { - final _ret = - _objc_msgSend_457(this.pointer, _sel_contentsAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - bool createFileAtPath_contents_attributes_( - NSString path, NSData? data, NSDictionary? attr) { - return _objc_msgSend_458( - this.pointer, - _sel_createFileAtPath_contents_attributes_, - path.pointer, - data?.pointer ?? ffi.nullptr, - attr?.pointer ?? ffi.nullptr); - } - - ffi.Pointer fileSystemRepresentationWithPath_(NSString path) { - return _objc_msgSend_459( - this.pointer, _sel_fileSystemRepresentationWithPath_, path.pointer); - } - - NSString stringWithFileSystemRepresentation_length_( - ffi.Pointer str, int len) { - final _ret = _objc_msgSend_460(this.pointer, - _sel_stringWithFileSystemRepresentation_length_, str, len); - return NSString._(_ret, retain: true, release: true); - } - - bool - replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_( - NSURL originalItemURL, - NSURL newItemURL, - NSString? backupItemName, - int options, - ffi.Pointer> resultingURL, - ffi.Pointer> error) { - return _objc_msgSend_461( - this.pointer, - _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_, - originalItemURL.pointer, - newItemURL.pointer, - backupItemName?.pointer ?? ffi.nullptr, - options, - resultingURL, - error); - } - - bool setUbiquitous_itemAtURL_destinationURL_error_(bool flag, NSURL url, - NSURL destinationURL, ffi.Pointer> error) { - return _objc_msgSend_462( - this.pointer, - _sel_setUbiquitous_itemAtURL_destinationURL_error_, - flag, - url.pointer, - destinationURL.pointer, - error); - } - - bool isUbiquitousItemAtURL_(NSURL url) { - return _objc_msgSend_265( - this.pointer, _sel_isUbiquitousItemAtURL_, url.pointer); - } - - bool startDownloadingUbiquitousItemAtURL_error_( - NSURL url, ffi.Pointer> error) { - return _objc_msgSend_89(this.pointer, - _sel_startDownloadingUbiquitousItemAtURL_error_, url.pointer, error); - } - - bool evictUbiquitousItemAtURL_error_( - NSURL url, ffi.Pointer> error) { - return _objc_msgSend_89( - this.pointer, _sel_evictUbiquitousItemAtURL_error_, url.pointer, error); - } - - NSURL? URLForUbiquityContainerIdentifier_(NSString? containerIdentifier) { - final _ret = _objc_msgSend_463( - this.pointer, - _sel_URLForUbiquityContainerIdentifier_, - containerIdentifier?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? URLForPublishingUbiquitousItemAtURL_expirationDate_error_( - NSURL url, - ffi.Pointer> outDate, - ffi.Pointer> error) { - final _ret = _objc_msgSend_464( - this.pointer, - _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_, - url.pointer, - outDate, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSObject? get ubiquityIdentityToken { - final _ret = _objc_msgSend_17(this.pointer, _sel_ubiquityIdentityToken); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - void getFileProviderServicesForItemAtURL_completionHandler_( - NSURL url, ObjCBlock_ffiVoid_NSDictionary_NSError completionHandler) { - _objc_msgSend_465( - this.pointer, - _sel_getFileProviderServicesForItemAtURL_completionHandler_, - url.pointer, - completionHandler.pointer); - } - - NSURL? containerURLForSecurityApplicationGroupIdentifier_( - NSString groupIdentifier) { - final _ret = _objc_msgSend_257( - this.pointer, - _sel_containerURLForSecurityApplicationGroupIdentifier_, - groupIdentifier.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL get homeDirectoryForCurrentUser { - final _ret = - _objc_msgSend_466(this.pointer, _sel_homeDirectoryForCurrentUser); - return NSURL._(_ret, retain: true, release: true); - } - - NSURL get temporaryDirectory { - final _ret = _objc_msgSend_466(this.pointer, _sel_temporaryDirectory); - return NSURL._(_ret, retain: true, release: true); - } - - NSURL? homeDirectoryForUser_(NSString userName) { - final _ret = _objc_msgSend_257( - this.pointer, _sel_homeDirectoryForUser_, userName.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - @override - NSFileManager init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSFileManager._(_ret, retain: true, release: true); - } - - static NSFileManager new1() { - final _ret = _objc_msgSend_2(_class_NSFileManager, _sel_new); - return NSFileManager._(_ret, retain: false, release: true); - } - - static NSFileManager allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSFileManager, _sel_allocWithZone_, zone); - return NSFileManager._(_ret, retain: false, release: true); - } - - static NSFileManager alloc() { - final _ret = _objc_msgSend_2(_class_NSFileManager, _sel_alloc); - return NSFileManager._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSFileManager, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSFileManager, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSFileManager, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSFileManager, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSFileManager, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSFileManager, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSFileManager, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSFileManager, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSFileManager, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSFileManager = objc.getClass("NSFileManager"); -late final _sel_defaultManager = objc.registerName("defaultManager"); -final _objc_msgSend_431 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSVolumeEnumerationOptions { - static const int NSVolumeEnumerationSkipHiddenVolumes = 2; - static const int NSVolumeEnumerationProduceFileReferenceURLs = 4; -} - -late final _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_ = objc - .registerName("mountedVolumeURLsIncludingResourceValuesForKeys:options:"); -final _objc_msgSend_432 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - -abstract class NSFileManagerUnmountOptions { - static const int NSFileManagerUnmountAllPartitionsAndEjectDisk = 1; - static const int NSFileManagerUnmountWithoutUI = 2; -} - -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); -final _ObjCBlock_ffiVoid_NSError_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSError_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSError_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSError_closureRegistry[block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSError._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSError._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSError.fromFunction(void Function(NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSError_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSError._(arg0, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSError.listener(void Function(NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSError_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSError._(arg0, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSError? arg0) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr); -} - -late final _sel_unmountVolumeAtURL_options_completionHandler_ = - objc.registerName("unmountVolumeAtURL:options:completionHandler:"); -final _objc_msgSend_433 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - -abstract class NSDirectoryEnumerationOptions { - static const int NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1; - static const int NSDirectoryEnumerationSkipsPackageDescendants = 2; - static const int NSDirectoryEnumerationSkipsHiddenFiles = 4; - static const int NSDirectoryEnumerationIncludesDirectoriesPostOrder = 8; - static const int NSDirectoryEnumerationProducesRelativePathURLs = 16; -} - -late final _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_ = - objc.registerName( - "contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:"); -final _objc_msgSend_434 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - -abstract class NSSearchPathDirectory { - static const int NSApplicationDirectory = 1; - static const int NSDemoApplicationDirectory = 2; - static const int NSDeveloperApplicationDirectory = 3; - static const int NSAdminApplicationDirectory = 4; - static const int NSLibraryDirectory = 5; - static const int NSDeveloperDirectory = 6; - static const int NSUserDirectory = 7; - static const int NSDocumentationDirectory = 8; - static const int NSDocumentDirectory = 9; - static const int NSCoreServiceDirectory = 10; - static const int NSAutosavedInformationDirectory = 11; - static const int NSDesktopDirectory = 12; - static const int NSCachesDirectory = 13; - static const int NSApplicationSupportDirectory = 14; - static const int NSDownloadsDirectory = 15; - static const int NSInputMethodsDirectory = 16; - static const int NSMoviesDirectory = 17; - static const int NSMusicDirectory = 18; - static const int NSPicturesDirectory = 19; - static const int NSPrinterDescriptionDirectory = 20; - static const int NSSharedPublicDirectory = 21; - static const int NSPreferencePanesDirectory = 22; - static const int NSApplicationScriptsDirectory = 23; - static const int NSItemReplacementDirectory = 99; - static const int NSAllApplicationsDirectory = 100; - static const int NSAllLibrariesDirectory = 101; - static const int NSTrashDirectory = 102; -} - -abstract class NSSearchPathDomainMask { - static const int NSUserDomainMask = 1; - static const int NSLocalDomainMask = 2; - static const int NSNetworkDomainMask = 4; - static const int NSSystemDomainMask = 8; - static const int NSAllDomainsMask = 65535; -} - -late final _sel_URLsForDirectory_inDomains_ = - objc.registerName("URLsForDirectory:inDomains:"); -final _objc_msgSend_435 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32, ffi.Int32)>>() - .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_436 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Bool, - ffi.Pointer>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - bool, - ffi.Pointer>)>(); - -abstract class NSURLRelationship { - static const int NSURLRelationshipContains = 0; - static const int NSURLRelationshipSame = 1; - static const int NSURLRelationshipOther = 2; -} - -late final _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_ = - objc.registerName("getRelationship:ofDirectoryAtURL:toItemAtURL:error:"); -final _objc_msgSend_437 = 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_438 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - 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_439 = 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_440 = 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:"); -final _objc_msgSend_441 = 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_442 = 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_443 = 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_444 = 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_445 = 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_446 = 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_447 = 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:"); -late final _sel_trashItemAtURL_resultingItemURL_error_ = - objc.registerName("trashItemAtURL:resultingItemURL:error:"); -final _objc_msgSend_448 = 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_449 = 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_450 = 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:"); -late final _sel_fileSystemAttributesAtPath_ = - objc.registerName("fileSystemAttributesAtPath:"); -late final _sel_pathContentOfSymbolicLinkAtPath_ = - objc.registerName("pathContentOfSymbolicLinkAtPath:"); -late final _sel_createSymbolicLinkAtPath_pathContent_ = - objc.registerName("createSymbolicLinkAtPath:pathContent:"); -final _objc_msgSend_451 = 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_452 = 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_453 = 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_454 = 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_455 = 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); -final _ObjCBlock_bool_NSURL_NSError_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_bool_NSURL_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_NSURL_NSError_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_bool_NSURL_NSError_closureRegistryIndex; - _ObjCBlock_bool_NSURL_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_NSURL_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_NSURL_NSError_closureRegistry[block.ref.target.address]!( - 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.newBlock( - _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(NSURL, NSError) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_NSURL_NSError_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_NSURL_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSURL._(arg0, retain: true, release: true), NSError._(arg1, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSURL arg0, 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_456 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_457 = 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_458 = 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_459 = 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_460 = 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)>(); - -abstract class NSFileManagerItemReplacementOptions { - static const int NSFileManagerItemReplacementUsingNewMetadataOnly = 1; - static const int NSFileManagerItemReplacementWithoutDeletingBackupItem = 2; -} - -late final _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_ = - objc.registerName( - "replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:"); -final _objc_msgSend_461 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_462 = 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:"); -final _objc_msgSend_463 = 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_464 = 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); -final _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[ - block.ref.target.address]!(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.newBlock( - _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(NSDictionary?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSDictionary._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSError._(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(NSDictionary?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn( - arg0.address == 0 - ? null - : NSDictionary._(arg0, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSDictionary? arg0, 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_465 = 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"); -final _objc_msgSend_466 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_temporaryDirectory = objc.registerName("temporaryDirectory"); -late final _sel_homeDirectoryForUser_ = - objc.registerName("homeDirectoryForUser:"); -late final _sel_fileManager_shouldProceedAfterError_ = - objc.registerName("fileManager:shouldProceedAfterError:"); -final _objc_msgSend_467 = 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_fileManager_willProcessPath_ = - objc.registerName("fileManager:willProcessPath:"); -final _objc_msgSend_468 = 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_validateValue_forKey_error_ = - objc.registerName("validateValue:forKey:error:"); - -class NSMutableArray extends NSArray { - NSMutableArray._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMutableArray] that points to the same underlying object as [other]. - static NSMutableArray castFrom(T other) { - return NSMutableArray._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSMutableArray] that wraps the given raw object pointer. - static NSMutableArray castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableArray._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableArray]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableArray); - } - - void addObject_(NSObject anObject) { - _objc_msgSend_15(this.pointer, _sel_addObject_, anObject.pointer); - } - - void insertObject_atIndex_(NSObject anObject, int index) { - _objc_msgSend_469( - this.pointer, _sel_insertObject_atIndex_, anObject.pointer, index); - } - - void removeLastObject() { - _objc_msgSend_1(this.pointer, _sel_removeLastObject); - } - - void removeObjectAtIndex_(int index) { - _objc_msgSend_470(this.pointer, _sel_removeObjectAtIndex_, index); - } - - void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { - _objc_msgSend_471(this.pointer, _sel_replaceObjectAtIndex_withObject_, - index, anObject.pointer); - } - - @override - NSMutableArray init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableArray._(_ret, retain: true, release: true); - } - - NSMutableArray initWithCapacity_(int numItems) { - final _ret = - _objc_msgSend_65(this.pointer, _sel_initWithCapacity_, numItems); - return NSMutableArray._(_ret, retain: true, release: true); - } - - @override - NSMutableArray? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, retain: true, release: true); - } - - void addObjectsFromArray_(NSArray otherArray) { - _objc_msgSend_472( - this.pointer, _sel_addObjectsFromArray_, otherArray.pointer); - } - - void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { - _objc_msgSend_473(this.pointer, - _sel_exchangeObjectAtIndex_withObjectAtIndex_, idx1, idx2); - } - - void removeAllObjects() { - _objc_msgSend_1(this.pointer, _sel_removeAllObjects); - } - - void removeObject_inRange_(NSObject anObject, _NSRange range) { - _objc_msgSend_474( - this.pointer, _sel_removeObject_inRange_, anObject.pointer, range); - } - - void removeObject_(NSObject anObject) { - _objc_msgSend_15(this.pointer, _sel_removeObject_, anObject.pointer); - } - - void removeObjectIdenticalTo_inRange_(NSObject anObject, _NSRange range) { - _objc_msgSend_474(this.pointer, _sel_removeObjectIdenticalTo_inRange_, - anObject.pointer, range); - } - - void removeObjectIdenticalTo_(NSObject anObject) { - _objc_msgSend_15( - this.pointer, _sel_removeObjectIdenticalTo_, anObject.pointer); - } - - void removeObjectsFromIndices_numIndices_( - ffi.Pointer indices, int cnt) { - _objc_msgSend_475( - this.pointer, _sel_removeObjectsFromIndices_numIndices_, indices, cnt); - } - - void removeObjectsInArray_(NSArray otherArray) { - _objc_msgSend_472( - this.pointer, _sel_removeObjectsInArray_, otherArray.pointer); - } - - void removeObjectsInRange_(_NSRange range) { - _objc_msgSend_476(this.pointer, _sel_removeObjectsInRange_, range); - } - - void replaceObjectsInRange_withObjectsFromArray_range_( - _NSRange range, NSArray otherArray, _NSRange otherRange) { - _objc_msgSend_477( - this.pointer, - _sel_replaceObjectsInRange_withObjectsFromArray_range_, - range, - otherArray.pointer, - otherRange); - } - - void replaceObjectsInRange_withObjectsFromArray_( - _NSRange range, NSArray otherArray) { - _objc_msgSend_478( - this.pointer, - _sel_replaceObjectsInRange_withObjectsFromArray_, - range, - otherArray.pointer); - } - - void setArray_(NSArray otherArray) { - _objc_msgSend_472(this.pointer, _sel_setArray_, otherArray.pointer); - } - - void sortUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context) { - _objc_msgSend_479( - this.pointer, _sel_sortUsingFunction_context_, compare, context); - } - - void sortUsingSelector_(ffi.Pointer comparator) { - _objc_msgSend_7(this.pointer, _sel_sortUsingSelector_, comparator); - } - - void insertObjects_atIndexes_(NSArray objects, NSIndexSet indexes) { - _objc_msgSend_480(this.pointer, _sel_insertObjects_atIndexes_, - objects.pointer, indexes.pointer); - } - - void removeObjectsAtIndexes_(NSIndexSet indexes) { - _objc_msgSend_481( - this.pointer, _sel_removeObjectsAtIndexes_, indexes.pointer); - } - - void replaceObjectsAtIndexes_withObjects_( - NSIndexSet indexes, NSArray objects) { - _objc_msgSend_482(this.pointer, _sel_replaceObjectsAtIndexes_withObjects_, - indexes.pointer, objects.pointer); - } - - void setObject_atIndexedSubscript_(NSObject obj, int idx) { - _objc_msgSend_469( - this.pointer, _sel_setObject_atIndexedSubscript_, obj.pointer, idx); - } - - void sortUsingComparator_( - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - _objc_msgSend_483(this.pointer, _sel_sortUsingComparator_, cmptr.pointer); - } - - void sortWithOptions_usingComparator_(int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - _objc_msgSend_484(this.pointer, _sel_sortWithOptions_usingComparator_, opts, - cmptr.pointer); - } - - static NSMutableArray arrayWithCapacity_(int numItems) { - final _ret = _objc_msgSend_65( - _class_NSMutableArray, _sel_arrayWithCapacity_, numItems); - return NSMutableArray._(_ret, retain: true, release: true); - } - - static NSMutableArray? arrayWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_485( - _class_NSMutableArray, _sel_arrayWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, retain: true, release: true); - } - - static NSMutableArray? arrayWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_486( - _class_NSMutableArray, _sel_arrayWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, retain: true, release: true); - } - - NSMutableArray? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_485( - this.pointer, _sel_initWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, retain: true, release: true); - } - - NSMutableArray? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_486( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, retain: true, release: true); - } - - void applyDifference_(NSObject difference) { - _objc_msgSend_15(this.pointer, _sel_applyDifference_, difference.pointer); - } - - void sortUsingDescriptors_(NSArray sortDescriptors) { - _objc_msgSend_472( - this.pointer, _sel_sortUsingDescriptors_, sortDescriptors.pointer); - } - - void filterUsingPredicate_(NSPredicate predicate) { - _objc_msgSend_487( - this.pointer, _sel_filterUsingPredicate_, predicate.pointer); - } - - @override - NSMutableArray initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - this.pointer, _sel_initWithObjects_count_, objects, cnt); - return NSMutableArray._(_ret, retain: true, release: true); - } - - static NSMutableArray array() { - final _ret = _objc_msgSend_2(_class_NSMutableArray, _sel_array); - return NSMutableArray._(_ret, retain: true, release: true); - } - - static NSMutableArray arrayWithObject_(NSObject anObject) { - final _ret = _objc_msgSend_124( - _class_NSMutableArray, _sel_arrayWithObject_, anObject.pointer); - return NSMutableArray._(_ret, retain: true, release: true); - } - - static NSMutableArray arrayWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - _class_NSMutableArray, _sel_arrayWithObjects_count_, objects, cnt); - return NSMutableArray._(_ret, retain: true, release: true); - } - - static NSMutableArray arrayWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - _class_NSMutableArray, _sel_arrayWithObjects_, firstObj.pointer); - return NSMutableArray._(_ret, retain: true, release: true); - } - - static NSMutableArray arrayWithArray_(NSArray array) { - final _ret = _objc_msgSend_125( - _class_NSMutableArray, _sel_arrayWithArray_, array.pointer); - return NSMutableArray._(_ret, retain: true, release: true); - } - - @override - NSMutableArray initWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjects_, firstObj.pointer); - return NSMutableArray._(_ret, retain: true, release: true); - } - - @override - NSMutableArray initWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(this.pointer, _sel_initWithArray_, array.pointer); - return NSMutableArray._(_ret, retain: true, release: true); - } - - @override - NSMutableArray initWithArray_copyItems_(NSArray array, bool flag) { - final _ret = _objc_msgSend_126( - this.pointer, _sel_initWithArray_copyItems_, array.pointer, flag); - return NSMutableArray._(_ret, retain: false, release: true); - } - - static NSArray? arrayWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_127(_class_NSMutableArray, - _sel_arrayWithContentsOfURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - static NSMutableArray new1() { - final _ret = _objc_msgSend_2(_class_NSMutableArray, _sel_new); - return NSMutableArray._(_ret, retain: false, release: true); - } - - static NSMutableArray allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMutableArray, _sel_allocWithZone_, zone); - return NSMutableArray._(_ret, retain: false, release: true); - } - - static NSMutableArray alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableArray, _sel_alloc); - return NSMutableArray._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableArray, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableArray, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableArray, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMutableArray, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableArray, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableArray, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableArray, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableArray, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSMutableArray, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSMutableArray = objc.getClass("NSMutableArray"); -late final _sel_addObject_ = objc.registerName("addObject:"); -late final _sel_insertObject_atIndex_ = - objc.registerName("insertObject:atIndex:"); -final _objc_msgSend_469 = 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_removeLastObject = objc.registerName("removeLastObject"); -late final _sel_removeObjectAtIndex_ = - objc.registerName("removeObjectAtIndex:"); -final _objc_msgSend_470 = 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_replaceObjectAtIndex_withObject_ = - objc.registerName("replaceObjectAtIndex:withObject:"); -final _objc_msgSend_471 = 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_initWithCapacity_ = objc.registerName("initWithCapacity:"); -late final _sel_addObjectsFromArray_ = - objc.registerName("addObjectsFromArray:"); -final _objc_msgSend_472 = 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_exchangeObjectAtIndex_withObjectAtIndex_ = - objc.registerName("exchangeObjectAtIndex:withObjectAtIndex:"); -final _objc_msgSend_473 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int, int)>(); -late final _sel_removeAllObjects = objc.registerName("removeAllObjects"); -late final _sel_removeObject_inRange_ = - objc.registerName("removeObject:inRange:"); -final _objc_msgSend_474 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_removeObject_ = objc.registerName("removeObject:"); -late final _sel_removeObjectIdenticalTo_inRange_ = - objc.registerName("removeObjectIdenticalTo:inRange:"); -late final _sel_removeObjectIdenticalTo_ = - objc.registerName("removeObjectIdenticalTo:"); -late final _sel_removeObjectsFromIndices_numIndices_ = - objc.registerName("removeObjectsFromIndices:numIndices:"); -final _objc_msgSend_475 = 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_removeObjectsInArray_ = - objc.registerName("removeObjectsInArray:"); -late final _sel_removeObjectsInRange_ = - objc.registerName("removeObjectsInRange:"); -final _objc_msgSend_476 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); -late final _sel_replaceObjectsInRange_withObjectsFromArray_range_ = - objc.registerName("replaceObjectsInRange:withObjectsFromArray:range:"); -final _objc_msgSend_477 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - _NSRange)>(); -late final _sel_replaceObjectsInRange_withObjectsFromArray_ = - objc.registerName("replaceObjectsInRange:withObjectsFromArray:"); -final _objc_msgSend_478 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_setArray_ = objc.registerName("setArray:"); -late final _sel_sortUsingFunction_context_ = - objc.registerName("sortUsingFunction:context:"); -final _objc_msgSend_479 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); -late final _sel_sortUsingSelector_ = objc.registerName("sortUsingSelector:"); -late final _sel_insertObjects_atIndexes_ = - objc.registerName("insertObjects:atIndexes:"); -final _objc_msgSend_480 = 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_removeObjectsAtIndexes_ = - objc.registerName("removeObjectsAtIndexes:"); -final _objc_msgSend_481 = 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_replaceObjectsAtIndexes_withObjects_ = - objc.registerName("replaceObjectsAtIndexes:withObjects:"); -final _objc_msgSend_482 = 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_setObject_atIndexedSubscript_ = - objc.registerName("setObject:atIndexedSubscript:"); -late final _sel_sortUsingComparator_ = - objc.registerName("sortUsingComparator:"); -final _objc_msgSend_483 = 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_sortWithOptions_usingComparator_ = - objc.registerName("sortWithOptions:usingComparator:"); -final _objc_msgSend_484 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_arrayWithCapacity_ = objc.registerName("arrayWithCapacity:"); -final _objc_msgSend_485 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_486 = 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_applyDifference_ = objc.registerName("applyDifference:"); -late final _sel_sortUsingDescriptors_ = - objc.registerName("sortUsingDescriptors:"); -late final _sel_filterUsingPredicate_ = - objc.registerName("filterUsingPredicate:"); -final _objc_msgSend_487 = 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_mutableArrayValueForKey_ = - objc.registerName("mutableArrayValueForKey:"); -final _objc_msgSend_488 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -class NSMutableOrderedSet extends NSOrderedSet { - NSMutableOrderedSet._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMutableOrderedSet] that points to the same underlying object as [other]. - static NSMutableOrderedSet castFrom(T other) { - return NSMutableOrderedSet._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSMutableOrderedSet] that wraps the given raw object pointer. - static NSMutableOrderedSet castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableOrderedSet._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableOrderedSet]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableOrderedSet); - } - - void insertObject_atIndex_(NSObject object, int idx) { - _objc_msgSend_469( - this.pointer, _sel_insertObject_atIndex_, object.pointer, idx); - } - - void removeObjectAtIndex_(int idx) { - _objc_msgSend_470(this.pointer, _sel_removeObjectAtIndex_, idx); - } - - void replaceObjectAtIndex_withObject_(int idx, NSObject object) { - _objc_msgSend_471(this.pointer, _sel_replaceObjectAtIndex_withObject_, idx, - object.pointer); - } - - @override - NSMutableOrderedSet? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - @override - NSMutableOrderedSet init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - NSMutableOrderedSet initWithCapacity_(int numItems) { - final _ret = - _objc_msgSend_65(this.pointer, _sel_initWithCapacity_, numItems); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - void addObject_(NSObject object) { - _objc_msgSend_15(this.pointer, _sel_addObject_, object.pointer); - } - - void addObjects_count_( - ffi.Pointer> objects, int count) { - _objc_msgSend_500(this.pointer, _sel_addObjects_count_, objects, count); - } - - void addObjectsFromArray_(NSArray array) { - _objc_msgSend_472(this.pointer, _sel_addObjectsFromArray_, array.pointer); - } - - void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { - _objc_msgSend_473(this.pointer, - _sel_exchangeObjectAtIndex_withObjectAtIndex_, idx1, idx2); - } - - void moveObjectsAtIndexes_toIndex_(NSIndexSet indexes, int idx) { - _objc_msgSend_501( - this.pointer, _sel_moveObjectsAtIndexes_toIndex_, indexes.pointer, idx); - } - - void insertObjects_atIndexes_(NSArray objects, NSIndexSet indexes) { - _objc_msgSend_480(this.pointer, _sel_insertObjects_atIndexes_, - objects.pointer, indexes.pointer); - } - - void setObject_atIndex_(NSObject obj, int idx) { - _objc_msgSend_469(this.pointer, _sel_setObject_atIndex_, obj.pointer, idx); - } - - void setObject_atIndexedSubscript_(NSObject obj, int idx) { - _objc_msgSend_469( - this.pointer, _sel_setObject_atIndexedSubscript_, obj.pointer, idx); - } - - void replaceObjectsInRange_withObjects_count_(_NSRange range, - ffi.Pointer> objects, int count) { - _objc_msgSend_502(this.pointer, - _sel_replaceObjectsInRange_withObjects_count_, range, objects, count); - } - - void replaceObjectsAtIndexes_withObjects_( - NSIndexSet indexes, NSArray objects) { - _objc_msgSend_482(this.pointer, _sel_replaceObjectsAtIndexes_withObjects_, - indexes.pointer, objects.pointer); - } - - void removeObjectsInRange_(_NSRange range) { - _objc_msgSend_476(this.pointer, _sel_removeObjectsInRange_, range); - } - - void removeObjectsAtIndexes_(NSIndexSet indexes) { - _objc_msgSend_481( - this.pointer, _sel_removeObjectsAtIndexes_, indexes.pointer); - } - - void removeAllObjects() { - _objc_msgSend_1(this.pointer, _sel_removeAllObjects); - } - - void removeObject_(NSObject object) { - _objc_msgSend_15(this.pointer, _sel_removeObject_, object.pointer); - } - - void removeObjectsInArray_(NSArray array) { - _objc_msgSend_472(this.pointer, _sel_removeObjectsInArray_, array.pointer); - } - - void intersectOrderedSet_(NSOrderedSet other) { - _objc_msgSend_503(this.pointer, _sel_intersectOrderedSet_, other.pointer); - } - - void minusOrderedSet_(NSOrderedSet other) { - _objc_msgSend_503(this.pointer, _sel_minusOrderedSet_, other.pointer); - } - - void unionOrderedSet_(NSOrderedSet other) { - _objc_msgSend_503(this.pointer, _sel_unionOrderedSet_, other.pointer); - } - - void intersectSet_(NSSet other) { - _objc_msgSend_504(this.pointer, _sel_intersectSet_, other.pointer); - } - - void minusSet_(NSSet other) { - _objc_msgSend_504(this.pointer, _sel_minusSet_, other.pointer); - } - - void unionSet_(NSSet other) { - _objc_msgSend_504(this.pointer, _sel_unionSet_, other.pointer); - } - - void sortUsingComparator_( - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - _objc_msgSend_483(this.pointer, _sel_sortUsingComparator_, cmptr.pointer); - } - - void sortWithOptions_usingComparator_(int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - _objc_msgSend_484(this.pointer, _sel_sortWithOptions_usingComparator_, opts, - cmptr.pointer); - } - - void sortRange_options_usingComparator_(_NSRange range, int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - _objc_msgSend_505(this.pointer, _sel_sortRange_options_usingComparator_, - range, opts, cmptr.pointer); - } - - static NSMutableOrderedSet orderedSetWithCapacity_(int numItems) { - final _ret = _objc_msgSend_65( - _class_NSMutableOrderedSet, _sel_orderedSetWithCapacity_, numItems); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - void applyDifference_(NSObject difference) { - _objc_msgSend_15(this.pointer, _sel_applyDifference_, difference.pointer); - } - - void sortUsingDescriptors_(NSArray sortDescriptors) { - _objc_msgSend_472( - this.pointer, _sel_sortUsingDescriptors_, sortDescriptors.pointer); - } - - void filterUsingPredicate_(NSPredicate p) { - _objc_msgSend_487(this.pointer, _sel_filterUsingPredicate_, p.pointer); - } - - @override - NSMutableOrderedSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - this.pointer, _sel_initWithObjects_count_, objects, cnt); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSet() { - final _ret = _objc_msgSend_2(_class_NSMutableOrderedSet, _sel_orderedSet); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithObject_(NSObject object) { - final _ret = _objc_msgSend_124( - _class_NSMutableOrderedSet, _sel_orderedSetWithObject_, object.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66(_class_NSMutableOrderedSet, - _sel_orderedSetWithObjects_count_, objects, cnt); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124(_class_NSMutableOrderedSet, - _sel_orderedSetWithObjects_, firstObj.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithOrderedSet_(NSOrderedSet set) { - final _ret = _objc_msgSend_492(_class_NSMutableOrderedSet, - _sel_orderedSetWithOrderedSet_, set.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithOrderedSet_range_copyItems_( - NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _objc_msgSend_493( - _class_NSMutableOrderedSet, - _sel_orderedSetWithOrderedSet_range_copyItems_, - set.pointer, - range, - flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - static NSMutableOrderedSet orderedSetWithArray_(NSArray array) { - final _ret = _objc_msgSend_125( - _class_NSMutableOrderedSet, _sel_orderedSetWithArray_, array.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithArray_range_copyItems_( - NSArray array, _NSRange range, bool flag) { - final _ret = _objc_msgSend_494(_class_NSMutableOrderedSet, - _sel_orderedSetWithArray_range_copyItems_, array.pointer, range, flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - static NSMutableOrderedSet orderedSetWithSet_(NSSet set) { - final _ret = _objc_msgSend_411( - _class_NSMutableOrderedSet, _sel_orderedSetWithSet_, set.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithSet_copyItems_( - NSSet set, bool flag) { - final _ret = _objc_msgSend_412(_class_NSMutableOrderedSet, - _sel_orderedSetWithSet_copyItems_, set.pointer, flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithObject_(NSObject object) { - final _ret = - _objc_msgSend_124(this.pointer, _sel_initWithObject_, object.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjects_, firstObj.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithOrderedSet_(NSOrderedSet set) { - final _ret = - _objc_msgSend_492(this.pointer, _sel_initWithOrderedSet_, set.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithOrderedSet_copyItems_( - NSOrderedSet set, bool flag) { - final _ret = _objc_msgSend_495( - this.pointer, _sel_initWithOrderedSet_copyItems_, set.pointer, flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithOrderedSet_range_copyItems_( - NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _objc_msgSend_493(this.pointer, - _sel_initWithOrderedSet_range_copyItems_, set.pointer, range, flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(this.pointer, _sel_initWithArray_, array.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithArray_copyItems_(NSArray set, bool flag) { - final _ret = _objc_msgSend_126( - this.pointer, _sel_initWithArray_copyItems_, set.pointer, flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithArray_range_copyItems_( - NSArray set, _NSRange range, bool flag) { - final _ret = _objc_msgSend_494(this.pointer, - _sel_initWithArray_range_copyItems_, set.pointer, range, flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithSet_(NSSet set) { - final _ret = - _objc_msgSend_411(this.pointer, _sel_initWithSet_, set.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _objc_msgSend_412( - this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - static NSMutableOrderedSet new1() { - final _ret = _objc_msgSend_2(_class_NSMutableOrderedSet, _sel_new); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - static NSMutableOrderedSet allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMutableOrderedSet, _sel_allocWithZone_, zone); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - static NSMutableOrderedSet alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableOrderedSet, _sel_alloc); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableOrderedSet, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableOrderedSet, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableOrderedSet, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMutableOrderedSet, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableOrderedSet, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableOrderedSet, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableOrderedSet, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableOrderedSet, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSMutableOrderedSet, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSMutableOrderedSet = objc.getClass("NSMutableOrderedSet"); - -class NSOrderedSet extends NSObject { - NSOrderedSet._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSOrderedSet] that points to the same underlying object as [other]. - static NSOrderedSet castFrom(T other) { - return NSOrderedSet._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSOrderedSet] that wraps the given raw object pointer. - static NSOrderedSet castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOrderedSet._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSOrderedSet]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSOrderedSet); - } - - int get count { - return _objc_msgSend_10(this.pointer, _sel_count); - } - - NSObject objectAtIndex_(int idx) { - final _ret = _objc_msgSend_65(this.pointer, _sel_objectAtIndex_, idx); - return NSObject._(_ret, retain: true, release: true); - } - - int indexOfObject_(NSObject object) { - return _objc_msgSend_74(this.pointer, _sel_indexOfObject_, object.pointer); - } - - @override - NSOrderedSet init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSOrderedSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - this.pointer, _sel_initWithObjects_count_, objects, cnt); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSOrderedSet? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSOrderedSet._(_ret, retain: true, release: true); - } - - void getObjects_range_( - ffi.Pointer> objects, _NSRange range) { - _objc_msgSend_73(this.pointer, _sel_getObjects_range_, objects, range); - } - - NSArray objectsAtIndexes_(NSIndexSet indexes) { - final _ret = _objc_msgSend_111( - this.pointer, _sel_objectsAtIndexes_, indexes.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSObject? get firstObject { - final _ret = _objc_msgSend_17(this.pointer, _sel_firstObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? get lastObject { - final _ret = _objc_msgSend_17(this.pointer, _sel_lastObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - bool isEqualToOrderedSet_(NSOrderedSet other) { - return _objc_msgSend_489( - this.pointer, _sel_isEqualToOrderedSet_, other.pointer); - } - - bool containsObject_(NSObject object) { - return _objc_msgSend_0(this.pointer, _sel_containsObject_, object.pointer); - } - - bool intersectsOrderedSet_(NSOrderedSet other) { - return _objc_msgSend_489( - this.pointer, _sel_intersectsOrderedSet_, other.pointer); - } - - bool intersectsSet_(NSSet set) { - return _objc_msgSend_403(this.pointer, _sel_intersectsSet_, set.pointer); - } - - bool isSubsetOfOrderedSet_(NSOrderedSet other) { - return _objc_msgSend_489( - this.pointer, _sel_isSubsetOfOrderedSet_, other.pointer); - } - - bool isSubsetOfSet_(NSSet set) { - return _objc_msgSend_403(this.pointer, _sel_isSubsetOfSet_, set.pointer); - } - - NSObject objectAtIndexedSubscript_(int idx) { - final _ret = - _objc_msgSend_65(this.pointer, _sel_objectAtIndexedSubscript_, idx); - return NSObject._(_ret, retain: true, release: true); - } - - NSEnumerator objectEnumerator() { - final _ret = _objc_msgSend_77(this.pointer, _sel_objectEnumerator); - return NSEnumerator._(_ret, retain: true, release: true); - } - - NSEnumerator reverseObjectEnumerator() { - final _ret = _objc_msgSend_77(this.pointer, _sel_reverseObjectEnumerator); - return NSEnumerator._(_ret, retain: true, release: true); - } - - NSOrderedSet get reversedOrderedSet { - final _ret = _objc_msgSend_490(this.pointer, _sel_reversedOrderedSet); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSArray get array { - final _ret = _objc_msgSend_85(this.pointer, _sel_array); - return NSArray._(_ret, retain: true, release: true); - } - - NSSet get set1 { - final _ret = _objc_msgSend_491(this.pointer, _sel_set); - return NSSet._(_ret, retain: true, release: true); - } - - void enumerateObjectsUsingBlock_( - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { - _objc_msgSend_112( - this.pointer, _sel_enumerateObjectsUsingBlock_, block.pointer); - } - - void enumerateObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { - _objc_msgSend_113(this.pointer, - _sel_enumerateObjectsWithOptions_usingBlock_, opts, block.pointer); - } - - void enumerateObjectsAtIndexes_options_usingBlock_(NSIndexSet s, int opts, - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { - _objc_msgSend_114( - this.pointer, - _sel_enumerateObjectsAtIndexes_options_usingBlock_, - s.pointer, - opts, - block.pointer); - } - - int indexOfObjectPassingTest_( - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_115( - this.pointer, _sel_indexOfObjectPassingTest_, predicate.pointer); - } - - int indexOfObjectWithOptions_passingTest_( - int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_116(this.pointer, - _sel_indexOfObjectWithOptions_passingTest_, opts, predicate.pointer); - } - - int indexOfObjectAtIndexes_options_passingTest_(NSIndexSet s, int opts, - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_117( - this.pointer, - _sel_indexOfObjectAtIndexes_options_passingTest_, - s.pointer, - opts, - predicate.pointer); - } - - NSIndexSet indexesOfObjectsPassingTest_( - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_118( - this.pointer, _sel_indexesOfObjectsPassingTest_, predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsWithOptions_passingTest_( - int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_119(this.pointer, - _sel_indexesOfObjectsWithOptions_passingTest_, opts, predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_(NSIndexSet s, - int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_120( - this.pointer, - _sel_indexesOfObjectsAtIndexes_options_passingTest_, - s.pointer, - opts, - predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); - } - - int indexOfObject_inSortedRange_options_usingComparator_( - NSObject object, - _NSRange range, - int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmp) { - return _objc_msgSend_123( - this.pointer, - _sel_indexOfObject_inSortedRange_options_usingComparator_, - object.pointer, - range, - opts, - cmp.pointer); - } - - NSArray sortedArrayUsingComparator_( - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - final _ret = _objc_msgSend_121( - this.pointer, _sel_sortedArrayUsingComparator_, cmptr.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray sortedArrayWithOptions_usingComparator_(int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - final _ret = _objc_msgSend_122(this.pointer, - _sel_sortedArrayWithOptions_usingComparator_, opts, cmptr.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _objc_msgSend_70(this.pointer, _sel_descriptionWithLocale_, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_indent_(NSObject? locale, int level) { - final _ret = _objc_msgSend_71( - this.pointer, - _sel_descriptionWithLocale_indent_, - locale?.pointer ?? ffi.nullptr, - level); - return NSString._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSet() { - final _ret = _objc_msgSend_2(_class_NSOrderedSet, _sel_orderedSet); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithObject_(NSObject object) { - final _ret = _objc_msgSend_124( - _class_NSOrderedSet, _sel_orderedSetWithObject_, object.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - _class_NSOrderedSet, _sel_orderedSetWithObjects_count_, objects, cnt); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - _class_NSOrderedSet, _sel_orderedSetWithObjects_, firstObj.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithOrderedSet_(NSOrderedSet set) { - final _ret = _objc_msgSend_492( - _class_NSOrderedSet, _sel_orderedSetWithOrderedSet_, set.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithOrderedSet_range_copyItems_( - NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _objc_msgSend_493( - _class_NSOrderedSet, - _sel_orderedSetWithOrderedSet_range_copyItems_, - set.pointer, - range, - flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - static NSOrderedSet orderedSetWithArray_(NSArray array) { - final _ret = _objc_msgSend_125( - _class_NSOrderedSet, _sel_orderedSetWithArray_, array.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithArray_range_copyItems_( - NSArray array, _NSRange range, bool flag) { - final _ret = _objc_msgSend_494(_class_NSOrderedSet, - _sel_orderedSetWithArray_range_copyItems_, array.pointer, range, flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - static NSOrderedSet orderedSetWithSet_(NSSet set) { - final _ret = _objc_msgSend_411( - _class_NSOrderedSet, _sel_orderedSetWithSet_, set.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _objc_msgSend_412(_class_NSOrderedSet, - _sel_orderedSetWithSet_copyItems_, set.pointer, flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - NSOrderedSet initWithObject_(NSObject object) { - final _ret = - _objc_msgSend_124(this.pointer, _sel_initWithObject_, object.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSOrderedSet initWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjects_, firstObj.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSOrderedSet initWithOrderedSet_(NSOrderedSet set) { - final _ret = - _objc_msgSend_492(this.pointer, _sel_initWithOrderedSet_, set.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSOrderedSet initWithOrderedSet_copyItems_(NSOrderedSet set, bool flag) { - final _ret = _objc_msgSend_495( - this.pointer, _sel_initWithOrderedSet_copyItems_, set.pointer, flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - NSOrderedSet initWithOrderedSet_range_copyItems_( - NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _objc_msgSend_493(this.pointer, - _sel_initWithOrderedSet_range_copyItems_, set.pointer, range, flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - NSOrderedSet initWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(this.pointer, _sel_initWithArray_, array.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSOrderedSet initWithArray_copyItems_(NSArray set, bool flag) { - final _ret = _objc_msgSend_126( - this.pointer, _sel_initWithArray_copyItems_, set.pointer, flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - NSOrderedSet initWithArray_range_copyItems_( - NSArray set, _NSRange range, bool flag) { - final _ret = _objc_msgSend_494(this.pointer, - _sel_initWithArray_range_copyItems_, set.pointer, range, flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - NSOrderedSet initWithSet_(NSSet set) { - final _ret = - _objc_msgSend_411(this.pointer, _sel_initWithSet_, set.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSOrderedSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _objc_msgSend_412( - this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - NSObject differenceFromOrderedSet_withOptions_usingEquivalenceTest_( - NSOrderedSet other, - int options, - ObjCBlock_bool_objcObjCObject_objcObjCObject block) { - final _ret = _objc_msgSend_496( - this.pointer, - _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_, - other.pointer, - options, - block.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - NSObject differenceFromOrderedSet_withOptions_( - NSOrderedSet other, int options) { - final _ret = _objc_msgSend_497(this.pointer, - _sel_differenceFromOrderedSet_withOptions_, other.pointer, options); - return NSObject._(_ret, retain: true, release: true); - } - - NSObject differenceFromOrderedSet_(NSOrderedSet other) { - final _ret = _objc_msgSend_492( - this.pointer, _sel_differenceFromOrderedSet_, other.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - NSOrderedSet? orderedSetByApplyingDifference_(NSObject difference) { - final _ret = _objc_msgSend_498( - this.pointer, _sel_orderedSetByApplyingDifference_, difference.pointer); - return _ret.address == 0 - ? null - : NSOrderedSet._(_ret, retain: true, release: true); - } - - NSObject valueForKey_(NSString key) { - final _ret = _objc_msgSend_31(this.pointer, _sel_valueForKey_, key.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - @override - void setValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - @override - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _objc_msgSend_139( - this.pointer, - _sel_addObserver_forKeyPath_options_context_, - observer.pointer, - keyPath.pointer, - options, - context); - } - - @override - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _objc_msgSend_140(this.pointer, _sel_removeObserver_forKeyPath_context_, - observer.pointer, keyPath.pointer, context); - } - - @override - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _objc_msgSend_141(this.pointer, _sel_removeObserver_forKeyPath_, - observer.pointer, keyPath.pointer); - } - - NSArray sortedArrayUsingDescriptors_(NSArray sortDescriptors) { - final _ret = _objc_msgSend_68(this.pointer, - _sel_sortedArrayUsingDescriptors_, sortDescriptors.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSOrderedSet filteredOrderedSetUsingPredicate_(NSPredicate p) { - final _ret = _objc_msgSend_499( - this.pointer, _sel_filteredOrderedSetUsingPredicate_, p.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet new1() { - final _ret = _objc_msgSend_2(_class_NSOrderedSet, _sel_new); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - static NSOrderedSet allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSOrderedSet, _sel_allocWithZone_, zone); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - static NSOrderedSet alloc() { - final _ret = _objc_msgSend_2(_class_NSOrderedSet, _sel_alloc); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSOrderedSet, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSOrderedSet, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSOrderedSet, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSOrderedSet, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSOrderedSet, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSOrderedSet, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSOrderedSet, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSOrderedSet, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSOrderedSet, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSOrderedSet = objc.getClass("NSOrderedSet"); -late final _sel_isEqualToOrderedSet_ = - objc.registerName("isEqualToOrderedSet:"); -final _objc_msgSend_489 = 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_intersectsOrderedSet_ = - objc.registerName("intersectsOrderedSet:"); -late final _sel_isSubsetOfOrderedSet_ = - objc.registerName("isSubsetOfOrderedSet:"); -late final _sel_reversedOrderedSet = objc.registerName("reversedOrderedSet"); -final _objc_msgSend_490 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_491 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_orderedSet = objc.registerName("orderedSet"); -late final _sel_orderedSetWithObject_ = - objc.registerName("orderedSetWithObject:"); -late final _sel_orderedSetWithObjects_count_ = - objc.registerName("orderedSetWithObjects:count:"); -late final _sel_orderedSetWithObjects_ = - objc.registerName("orderedSetWithObjects:"); -late final _sel_orderedSetWithOrderedSet_ = - objc.registerName("orderedSetWithOrderedSet:"); -final _objc_msgSend_492 = 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_orderedSetWithOrderedSet_range_copyItems_ = - objc.registerName("orderedSetWithOrderedSet:range:copyItems:"); -final _objc_msgSend_493 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Bool)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - bool)>(); -late final _sel_orderedSetWithArray_ = - objc.registerName("orderedSetWithArray:"); -late final _sel_orderedSetWithArray_range_copyItems_ = - objc.registerName("orderedSetWithArray:range:copyItems:"); -final _objc_msgSend_494 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Bool)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - bool)>(); -late final _sel_orderedSetWithSet_ = objc.registerName("orderedSetWithSet:"); -late final _sel_orderedSetWithSet_copyItems_ = - objc.registerName("orderedSetWithSet:copyItems:"); -late final _sel_initWithObject_ = objc.registerName("initWithObject:"); -late final _sel_initWithOrderedSet_ = objc.registerName("initWithOrderedSet:"); -late final _sel_initWithOrderedSet_copyItems_ = - objc.registerName("initWithOrderedSet:copyItems:"); -final _objc_msgSend_495 = 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_initWithOrderedSet_range_copyItems_ = - objc.registerName("initWithOrderedSet:range:copyItems:"); -late final _sel_initWithArray_range_copyItems_ = - objc.registerName("initWithArray:range:copyItems:"); -late final _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_ = - objc.registerName( - "differenceFromOrderedSet:withOptions:usingEquivalenceTest:"); -final _objc_msgSend_496 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_differenceFromOrderedSet_withOptions_ = - objc.registerName("differenceFromOrderedSet:withOptions:"); -final _objc_msgSend_497 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_differenceFromOrderedSet_ = - objc.registerName("differenceFromOrderedSet:"); -late final _sel_orderedSetByApplyingDifference_ = - objc.registerName("orderedSetByApplyingDifference:"); -final _objc_msgSend_498 = 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_filteredOrderedSetUsingPredicate_ = - objc.registerName("filteredOrderedSetUsingPredicate:"); -final _objc_msgSend_499 = 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_addObjects_count_ = objc.registerName("addObjects:count:"); -final _objc_msgSend_500 = 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_moveObjectsAtIndexes_toIndex_ = - objc.registerName("moveObjectsAtIndexes:toIndex:"); -final _objc_msgSend_501 = 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_setObject_atIndex_ = objc.registerName("setObject:atIndex:"); -late final _sel_replaceObjectsInRange_withObjects_count_ = - objc.registerName("replaceObjectsInRange:withObjects:count:"); -final _objc_msgSend_502 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer>, - ffi.UnsignedLong)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer>, - int)>(); -late final _sel_intersectOrderedSet_ = - objc.registerName("intersectOrderedSet:"); -final _objc_msgSend_503 = 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_minusOrderedSet_ = objc.registerName("minusOrderedSet:"); -late final _sel_unionOrderedSet_ = objc.registerName("unionOrderedSet:"); -late final _sel_intersectSet_ = objc.registerName("intersectSet:"); -final _objc_msgSend_504 = 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_minusSet_ = objc.registerName("minusSet:"); -late final _sel_unionSet_ = objc.registerName("unionSet:"); -late final _sel_sortRange_options_usingComparator_ = - objc.registerName("sortRange:options:usingComparator:"); -final _objc_msgSend_505 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); -late final _sel_orderedSetWithCapacity_ = - objc.registerName("orderedSetWithCapacity:"); -late final _sel_mutableOrderedSetValueForKey_ = - objc.registerName("mutableOrderedSetValueForKey:"); -final _objc_msgSend_506 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -class NSMutableSet extends NSSet { - NSMutableSet._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMutableSet] that points to the same underlying object as [other]. - static NSMutableSet castFrom(T other) { - return NSMutableSet._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSMutableSet] that wraps the given raw object pointer. - static NSMutableSet castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableSet._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableSet]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableSet); - } - - void addObject_(NSObject object) { - _objc_msgSend_15(this.pointer, _sel_addObject_, object.pointer); - } - - void removeObject_(NSObject object) { - _objc_msgSend_15(this.pointer, _sel_removeObject_, object.pointer); - } - - @override - NSMutableSet? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSMutableSet._(_ret, retain: true, release: true); - } - - @override - NSMutableSet init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableSet._(_ret, retain: true, release: true); - } - - NSMutableSet initWithCapacity_(int numItems) { - final _ret = - _objc_msgSend_65(this.pointer, _sel_initWithCapacity_, numItems); - return NSMutableSet._(_ret, retain: true, release: true); - } - - void addObjectsFromArray_(NSArray array) { - _objc_msgSend_472(this.pointer, _sel_addObjectsFromArray_, array.pointer); - } - - void intersectSet_(NSSet otherSet) { - _objc_msgSend_504(this.pointer, _sel_intersectSet_, otherSet.pointer); - } - - void minusSet_(NSSet otherSet) { - _objc_msgSend_504(this.pointer, _sel_minusSet_, otherSet.pointer); - } - - void removeAllObjects() { - _objc_msgSend_1(this.pointer, _sel_removeAllObjects); - } - - void unionSet_(NSSet otherSet) { - _objc_msgSend_504(this.pointer, _sel_unionSet_, otherSet.pointer); - } - - void setSet_(NSSet otherSet) { - _objc_msgSend_504(this.pointer, _sel_setSet_, otherSet.pointer); - } - - static NSMutableSet setWithCapacity_(int numItems) { - final _ret = - _objc_msgSend_65(_class_NSMutableSet, _sel_setWithCapacity_, numItems); - return NSMutableSet._(_ret, retain: true, release: true); - } - - void filterUsingPredicate_(NSPredicate predicate) { - _objc_msgSend_487( - this.pointer, _sel_filterUsingPredicate_, predicate.pointer); - } - - @override - NSMutableSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - this.pointer, _sel_initWithObjects_count_, objects, cnt); - return NSMutableSet._(_ret, retain: true, release: true); - } - - static NSMutableSet set1() { - final _ret = _objc_msgSend_2(_class_NSMutableSet, _sel_set); - return NSMutableSet._(_ret, retain: true, release: true); - } - - static NSMutableSet setWithObject_(NSObject object) { - final _ret = _objc_msgSend_124( - _class_NSMutableSet, _sel_setWithObject_, object.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - static NSMutableSet setWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - _class_NSMutableSet, _sel_setWithObjects_count_, objects, cnt); - return NSMutableSet._(_ret, retain: true, release: true); - } - - static NSMutableSet setWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - _class_NSMutableSet, _sel_setWithObjects_, firstObj.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - static NSMutableSet setWithSet_(NSSet set) { - final _ret = - _objc_msgSend_411(_class_NSMutableSet, _sel_setWithSet_, set.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - static NSMutableSet setWithArray_(NSArray array) { - final _ret = _objc_msgSend_125( - _class_NSMutableSet, _sel_setWithArray_, array.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - @override - NSMutableSet initWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjects_, firstObj.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - @override - NSMutableSet initWithSet_(NSSet set) { - final _ret = - _objc_msgSend_411(this.pointer, _sel_initWithSet_, set.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - @override - NSMutableSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _objc_msgSend_412( - this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); - return NSMutableSet._(_ret, retain: false, release: true); - } - - @override - NSMutableSet initWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(this.pointer, _sel_initWithArray_, array.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - static NSMutableSet new1() { - final _ret = _objc_msgSend_2(_class_NSMutableSet, _sel_new); - return NSMutableSet._(_ret, retain: false, release: true); - } - - static NSMutableSet allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMutableSet, _sel_allocWithZone_, zone); - return NSMutableSet._(_ret, retain: false, release: true); - } - - static NSMutableSet alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableSet, _sel_alloc); - return NSMutableSet._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableSet, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableSet, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableSet, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMutableSet, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableSet, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableSet, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableSet, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableSet, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSMutableSet, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSMutableSet = objc.getClass("NSMutableSet"); -late final _sel_setSet_ = objc.registerName("setSet:"); -late final _sel_setWithCapacity_ = objc.registerName("setWithCapacity:"); -late final _sel_mutableSetValueForKey_ = - objc.registerName("mutableSetValueForKey:"); -final _objc_msgSend_507 = 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_valueForKeyPath_ = objc.registerName("valueForKeyPath:"); -late final _sel_setValue_forKeyPath_ = - objc.registerName("setValue:forKeyPath:"); -late final _sel_validateValue_forKeyPath_error_ = - objc.registerName("validateValue:forKeyPath:error:"); -late final _sel_mutableArrayValueForKeyPath_ = - objc.registerName("mutableArrayValueForKeyPath:"); -late final _sel_mutableOrderedSetValueForKeyPath_ = - objc.registerName("mutableOrderedSetValueForKeyPath:"); -late final _sel_mutableSetValueForKeyPath_ = - objc.registerName("mutableSetValueForKeyPath:"); -late final _sel_valueForUndefinedKey_ = - objc.registerName("valueForUndefinedKey:"); -late final _sel_setValue_forUndefinedKey_ = - objc.registerName("setValue:forUndefinedKey:"); -late final _sel_setNilValueForKey_ = objc.registerName("setNilValueForKey:"); -late final _sel_dictionaryWithValuesForKeys_ = - objc.registerName("dictionaryWithValuesForKeys:"); -final _objc_msgSend_508 = 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_setValuesForKeysWithDictionary_ = - objc.registerName("setValuesForKeysWithDictionary:"); -final _objc_msgSend_509 = 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_storedValueForKey_ = objc.registerName("storedValueForKey:"); -late final _sel_takeStoredValue_forKey_ = - objc.registerName("takeStoredValue:forKey:"); -late final _sel_takeValue_forKey_ = objc.registerName("takeValue:forKey:"); -late final _sel_takeValue_forKeyPath_ = - objc.registerName("takeValue:forKeyPath:"); -late final _sel_handleQueryWithUnboundKey_ = - objc.registerName("handleQueryWithUnboundKey:"); -late final _sel_handleTakeValue_forUnboundKey_ = - objc.registerName("handleTakeValue:forUnboundKey:"); -late final _sel_unableToSetNilForKey_ = - objc.registerName("unableToSetNilForKey:"); -late final _sel_valuesForKeys_ = objc.registerName("valuesForKeys:"); -late final _sel_takeValuesFromDictionary_ = - objc.registerName("takeValuesFromDictionary:"); -late final _sel_observeValueForKeyPath_ofObject_change_context_ = - objc.registerName("observeValueForKeyPath:ofObject:change:context:"); -final _objc_msgSend_510 = 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)>(); -late final _sel_willChangeValueForKey_ = - objc.registerName("willChangeValueForKey:"); -late final _sel_didChangeValueForKey_ = - objc.registerName("didChangeValueForKey:"); - -abstract class NSKeyValueChange { - static const int NSKeyValueChangeSetting = 1; - static const int NSKeyValueChangeInsertion = 2; - static const int NSKeyValueChangeRemoval = 3; - static const int NSKeyValueChangeReplacement = 4; -} - -late final _sel_willChange_valuesAtIndexes_forKey_ = - objc.registerName("willChange:valuesAtIndexes:forKey:"); -final _objc_msgSend_511 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_didChange_valuesAtIndexes_forKey_ = - objc.registerName("didChange:valuesAtIndexes:forKey:"); - -abstract class NSKeyValueSetMutationKind { - static const int NSKeyValueUnionSetMutation = 1; - static const int NSKeyValueMinusSetMutation = 2; - static const int NSKeyValueIntersectSetMutation = 3; - static const int NSKeyValueSetSetMutation = 4; -} - -late final _sel_willChangeValueForKey_withSetMutation_usingObjects_ = - objc.registerName("willChangeValueForKey:withSetMutation:usingObjects:"); -final _objc_msgSend_512 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_didChangeValueForKey_withSetMutation_usingObjects_ = - objc.registerName("didChangeValueForKey:withSetMutation:usingObjects:"); -late final _sel_observationInfo = objc.registerName("observationInfo"); -late final _sel_setObservationInfo_ = objc.registerName("setObservationInfo:"); -final _objc_msgSend_513 = 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_classForKeyedArchiver = - objc.registerName("classForKeyedArchiver"); - -class NSKeyedArchiver extends NSCoder { - NSKeyedArchiver._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSKeyedArchiver] that points to the same underlying object as [other]. - static NSKeyedArchiver castFrom(T other) { - return NSKeyedArchiver._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSKeyedArchiver] that wraps the given raw object pointer. - static NSKeyedArchiver castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSKeyedArchiver._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSKeyedArchiver]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSKeyedArchiver); - } - - NSKeyedArchiver initRequiringSecureCoding_(bool requiresSecureCoding) { - final _ret = _objc_msgSend_514( - this.pointer, _sel_initRequiringSecureCoding_, requiresSecureCoding); - return NSKeyedArchiver._(_ret, retain: true, release: true); - } - - static NSData? archivedDataWithRootObject_requiringSecureCoding_error_( - NSObject object, - bool requiresSecureCoding, - ffi.Pointer> error) { - final _ret = _objc_msgSend_515( - _class_NSKeyedArchiver, - _sel_archivedDataWithRootObject_requiringSecureCoding_error_, - object.pointer, - requiresSecureCoding, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - @override - NSKeyedArchiver init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSKeyedArchiver._(_ret, retain: true, release: true); - } - - NSKeyedArchiver initForWritingWithMutableData_(NSMutableData data) { - final _ret = _objc_msgSend_521( - this.pointer, _sel_initForWritingWithMutableData_, data.pointer); - return NSKeyedArchiver._(_ret, retain: true, release: true); - } - - static NSData archivedDataWithRootObject_(NSObject rootObject) { - final _ret = _objc_msgSend_522(_class_NSKeyedArchiver, - _sel_archivedDataWithRootObject_, rootObject.pointer); - return NSData._(_ret, retain: true, release: true); - } - - static bool archiveRootObject_toFile_(NSObject rootObject, NSString path) { - return _objc_msgSend_261(_class_NSKeyedArchiver, - _sel_archiveRootObject_toFile_, rootObject.pointer, path.pointer); - } - - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); - } - - int get outputFormat { - return _objc_msgSend_523(this.pointer, _sel_outputFormat); - } - - set outputFormat(int value) { - return _objc_msgSend_524(this.pointer, _sel_setOutputFormat_, value); - } - - NSData get encodedData { - final _ret = _objc_msgSend_43(this.pointer, _sel_encodedData); - return NSData._(_ret, retain: true, release: true); - } - - void finishEncoding() { - _objc_msgSend_1(this.pointer, _sel_finishEncoding); - } - - static void setClassName_forClass_(NSString? codedName, NSObject cls) { - _objc_msgSend_525(_class_NSKeyedArchiver, _sel_setClassName_forClass_, - codedName?.pointer ?? ffi.nullptr, cls.pointer); - } - - static NSString? classNameForClass_(NSObject cls) { - final _ret = _objc_msgSend_526( - _class_NSKeyedArchiver, _sel_classNameForClass_, cls.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - @override - void encodeObject_forKey_(NSObject? object, NSString key) { - _objc_msgSend_135(this.pointer, _sel_encodeObject_forKey_, - object?.pointer ?? ffi.nullptr, key.pointer); - } - - @override - void encodeConditionalObject_forKey_(NSObject? object, NSString key) { - _objc_msgSend_135(this.pointer, _sel_encodeConditionalObject_forKey_, - object?.pointer ?? ffi.nullptr, key.pointer); - } - - @override - void encodeBool_forKey_(bool value, NSString key) { - _objc_msgSend_296( - this.pointer, _sel_encodeBool_forKey_, value, key.pointer); - } - - @override - void encodeInt_forKey_(int value, NSString key) { - _objc_msgSend_297(this.pointer, _sel_encodeInt_forKey_, value, key.pointer); - } - - @override - void encodeInt32_forKey_(int value, NSString key) { - _objc_msgSend_298( - this.pointer, _sel_encodeInt32_forKey_, value, key.pointer); - } - - @override - void encodeInt64_forKey_(int value, NSString key) { - _objc_msgSend_299( - this.pointer, _sel_encodeInt64_forKey_, value, key.pointer); - } - - @override - void encodeFloat_forKey_(double value, NSString key) { - _objc_msgSend_300( - this.pointer, _sel_encodeFloat_forKey_, value, key.pointer); - } - - @override - void encodeDouble_forKey_(double value, NSString key) { - _objc_msgSend_301( - this.pointer, _sel_encodeDouble_forKey_, value, key.pointer); - } - - @override - void encodeBytes_length_forKey_( - ffi.Pointer bytes, int length, NSString key) { - _objc_msgSend_302(this.pointer, _sel_encodeBytes_length_forKey_, bytes, - length, key.pointer); - } - - @override - bool get requiresSecureCoding { - return _objc_msgSend_12(this.pointer, _sel_requiresSecureCoding); - } - - set requiresSecureCoding(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setRequiresSecureCoding_, value); - } - - static NSKeyedArchiver new1() { - final _ret = _objc_msgSend_2(_class_NSKeyedArchiver, _sel_new); - return NSKeyedArchiver._(_ret, retain: false, release: true); - } - - static NSKeyedArchiver allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSKeyedArchiver, _sel_allocWithZone_, zone); - return NSKeyedArchiver._(_ret, retain: false, release: true); - } - - static NSKeyedArchiver alloc() { - final _ret = _objc_msgSend_2(_class_NSKeyedArchiver, _sel_alloc); - return NSKeyedArchiver._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSKeyedArchiver, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSKeyedArchiver, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSKeyedArchiver, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSKeyedArchiver, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSKeyedArchiver, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSKeyedArchiver, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSKeyedArchiver, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSKeyedArchiver, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSKeyedArchiver, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSKeyedArchiver = objc.getClass("NSKeyedArchiver"); -late final _sel_initRequiringSecureCoding_ = - objc.registerName("initRequiringSecureCoding:"); -final _objc_msgSend_514 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, bool)>(); -late final _sel_archivedDataWithRootObject_requiringSecureCoding_error_ = objc - .registerName("archivedDataWithRootObject:requiringSecureCoding:error:"); -final _objc_msgSend_515 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer>)>(); - -class NSMutableData extends NSData { - NSMutableData._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMutableData] that points to the same underlying object as [other]. - static NSMutableData castFrom(T other) { - return NSMutableData._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSMutableData] that wraps the given raw object pointer. - static NSMutableData castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableData._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableData]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableData); - } - - ffi.Pointer get mutableBytes { - return _objc_msgSend_20(this.pointer, _sel_mutableBytes); - } - - @override - int get length { - return _objc_msgSend_10(this.pointer, _sel_length); - } - - set length(int value) { - return _objc_msgSend_516(this.pointer, _sel_setLength_, value); - } - - void appendBytes_length_(ffi.Pointer bytes, int length) { - _objc_msgSend_22(this.pointer, _sel_appendBytes_length_, bytes, length); - } - - void appendData_(NSData other) { - _objc_msgSend_285(this.pointer, _sel_appendData_, other.pointer); - } - - void increaseLengthBy_(int extraLength) { - _objc_msgSend_470(this.pointer, _sel_increaseLengthBy_, extraLength); - } - - void replaceBytesInRange_withBytes_( - _NSRange range, ffi.Pointer bytes) { - _objc_msgSend_517( - this.pointer, _sel_replaceBytesInRange_withBytes_, range, bytes); - } - - void resetBytesInRange_(_NSRange range) { - _objc_msgSend_476(this.pointer, _sel_resetBytesInRange_, range); - } - - void setData_(NSData data) { - _objc_msgSend_285(this.pointer, _sel_setData_, data.pointer); - } - - void replaceBytesInRange_withBytes_length_(_NSRange range, - ffi.Pointer replacementBytes, int replacementLength) { - _objc_msgSend_518(this.pointer, _sel_replaceBytesInRange_withBytes_length_, - range, replacementBytes, replacementLength); - } - - static NSMutableData? dataWithCapacity_(int aNumItems) { - final _ret = _objc_msgSend_519( - _class_NSMutableData, _sel_dataWithCapacity_, aNumItems); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData? dataWithLength_(int length) { - final _ret = - _objc_msgSend_519(_class_NSMutableData, _sel_dataWithLength_, length); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - NSMutableData? initWithCapacity_(int capacity) { - final _ret = - _objc_msgSend_519(this.pointer, _sel_initWithCapacity_, capacity); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - NSMutableData? initWithLength_(int length) { - final _ret = _objc_msgSend_519(this.pointer, _sel_initWithLength_, length); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - bool decompressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _objc_msgSend_520( - this.pointer, _sel_decompressUsingAlgorithm_error_, algorithm, error); - } - - bool compressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _objc_msgSend_520( - this.pointer, _sel_compressUsingAlgorithm_error_, algorithm, error); - } - - static NSMutableData data() { - final _ret = _objc_msgSend_2(_class_NSMutableData, _sel_data); - return NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData dataWithBytes_length_( - ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - _class_NSMutableData, _sel_dataWithBytes_length_, bytes, length); - return NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData dataWithBytesNoCopy_length_( - ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - _class_NSMutableData, _sel_dataWithBytesNoCopy_length_, bytes, length); - return NSMutableData._(_ret, retain: false, release: true); - } - - static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _objc_msgSend_274(_class_NSMutableData, - _sel_dataWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); - return NSMutableData._(_ret, retain: false, release: true); - } - - static NSMutableData? dataWithContentsOfFile_options_error_(NSString path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_275( - _class_NSMutableData, - _sel_dataWithContentsOfFile_options_error_, - path.pointer, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData? dataWithContentsOfURL_options_error_(NSURL url, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_276( - _class_NSMutableData, - _sel_dataWithContentsOfURL_options_error_, - url.pointer, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData? dataWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSMutableData, _sel_dataWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData? dataWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - _class_NSMutableData, _sel_dataWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData initWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - this.pointer, _sel_initWithBytes_length_, bytes, length); - return NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData initWithBytesNoCopy_length_( - ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - this.pointer, _sel_initWithBytesNoCopy_length_, bytes, length); - return NSMutableData._(_ret, retain: false, release: true); - } - - @override - NSMutableData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _objc_msgSend_274(this.pointer, - _sel_initWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); - return NSMutableData._(_ret, retain: false, release: true); - } - - @override - NSMutableData initWithBytesNoCopy_length_deallocator_( - ffi.Pointer bytes, - int length, - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _objc_msgSend_278( - this.pointer, - _sel_initWithBytesNoCopy_length_deallocator_, - bytes, - length, - deallocator?.pointer ?? ffi.nullptr); - return NSMutableData._(_ret, retain: false, release: true); - } - - @override - NSMutableData? initWithContentsOfFile_options_error_(NSString path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_275( - this.pointer, - _sel_initWithContentsOfFile_options_error_, - path.pointer, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData? initWithContentsOfURL_options_error_(NSURL url, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_276( - this.pointer, - _sel_initWithContentsOfURL_options_error_, - url.pointer, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData initWithData_(NSData data) { - final _ret = - _objc_msgSend_279(this.pointer, _sel_initWithData_, data.pointer); - return NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData dataWithData_(NSData data) { - final _ret = _objc_msgSend_279( - _class_NSMutableData, _sel_dataWithData_, data.pointer); - return NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData? initWithBase64EncodedString_options_( - NSString base64String, int options) { - final _ret = _objc_msgSend_280( - this.pointer, - _sel_initWithBase64EncodedString_options_, - base64String.pointer, - options); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData? initWithBase64EncodedData_options_( - NSData base64Data, int options) { - final _ret = _objc_msgSend_282(this.pointer, - _sel_initWithBase64EncodedData_options_, base64Data.pointer, options); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData? decompressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _objc_msgSend_284(this.pointer, - _sel_decompressedDataUsingAlgorithm_error_, algorithm, error); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData? compressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _objc_msgSend_284(this.pointer, - _sel_compressedDataUsingAlgorithm_error_, algorithm, error); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - static NSObject? dataWithContentsOfMappedFile_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSMutableData, _sel_dataWithContentsOfMappedFile_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - @override - NSMutableData init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData new1() { - final _ret = _objc_msgSend_2(_class_NSMutableData, _sel_new); - return NSMutableData._(_ret, retain: false, release: true); - } - - static NSMutableData allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMutableData, _sel_allocWithZone_, zone); - return NSMutableData._(_ret, retain: false, release: true); - } - - static NSMutableData alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableData, _sel_alloc); - return NSMutableData._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableData, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableData, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableData, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMutableData, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableData, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableData, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableData, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableData, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSMutableData, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSMutableData = objc.getClass("NSMutableData"); -late final _sel_mutableBytes = objc.registerName("mutableBytes"); -late final _sel_setLength_ = objc.registerName("setLength:"); -final _objc_msgSend_516 = 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_appendBytes_length_ = objc.registerName("appendBytes:length:"); -late final _sel_appendData_ = objc.registerName("appendData:"); -late final _sel_increaseLengthBy_ = objc.registerName("increaseLengthBy:"); -late final _sel_replaceBytesInRange_withBytes_ = - objc.registerName("replaceBytesInRange:withBytes:"); -final _objc_msgSend_517 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); -late final _sel_resetBytesInRange_ = objc.registerName("resetBytesInRange:"); -late final _sel_setData_ = objc.registerName("setData:"); -late final _sel_replaceBytesInRange_withBytes_length_ = - objc.registerName("replaceBytesInRange:withBytes:length:"); -final _objc_msgSend_518 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - int)>(); -late final _sel_dataWithCapacity_ = objc.registerName("dataWithCapacity:"); -final _objc_msgSend_519 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_dataWithLength_ = objc.registerName("dataWithLength:"); -late final _sel_initWithLength_ = objc.registerName("initWithLength:"); -late final _sel_decompressUsingAlgorithm_error_ = - objc.registerName("decompressUsingAlgorithm:error:"); -final _objc_msgSend_520 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_compressUsingAlgorithm_error_ = - objc.registerName("compressUsingAlgorithm:error:"); -late final _sel_initForWritingWithMutableData_ = - objc.registerName("initForWritingWithMutableData:"); -final _objc_msgSend_521 = 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_archivedDataWithRootObject_ = - objc.registerName("archivedDataWithRootObject:"); -final _objc_msgSend_522 = 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_archiveRootObject_toFile_ = - objc.registerName("archiveRootObject:toFile:"); - -abstract class NSPropertyListFormat { - static const int NSPropertyListOpenStepFormat = 1; - static const int NSPropertyListXMLFormat_v1_0 = 100; - static const int NSPropertyListBinaryFormat_v1_0 = 200; -} - -late final _sel_outputFormat = objc.registerName("outputFormat"); -final _objc_msgSend_523 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setOutputFormat_ = objc.registerName("setOutputFormat:"); -final _objc_msgSend_524 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_encodedData = objc.registerName("encodedData"); -late final _sel_finishEncoding = objc.registerName("finishEncoding"); -late final _sel_setClassName_forClass_ = - objc.registerName("setClassName:forClass:"); -final _objc_msgSend_525 = 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_classNameForClass_ = objc.registerName("classNameForClass:"); -final _objc_msgSend_526 = 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_setRequiresSecureCoding_ = - objc.registerName("setRequiresSecureCoding:"); -final _objc_msgSend_527 = 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_replacementObjectForKeyedArchiver_ = - objc.registerName("replacementObjectForKeyedArchiver:"); -final _objc_msgSend_528 = 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_performSelectorOnMainThread_withObject_waitUntilDone_modes_ = - objc.registerName( - "performSelectorOnMainThread:withObject:waitUntilDone:modes:"); -final _objc_msgSend_529 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); -late final _sel_performSelectorOnMainThread_withObject_waitUntilDone_ = - objc.registerName("performSelectorOnMainThread:withObject:waitUntilDone:"); -final _objc_msgSend_530 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); - -class NSThread extends NSObject { - NSThread._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSThread] that points to the same underlying object as [other]. - static NSThread castFrom(T other) { - return NSThread._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSThread] that wraps the given raw object pointer. - static NSThread castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSThread._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSThread]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSThread); - } - - static NSThread getCurrentThread() { - final _ret = _objc_msgSend_531(_class_NSThread, _sel_currentThread); - return NSThread._(_ret, retain: true, release: true); - } - - static void detachNewThreadWithBlock_(ObjCBlock_ffiVoid block) { - _objc_msgSend_532( - _class_NSThread, _sel_detachNewThreadWithBlock_, block.pointer); - } - - static void detachNewThreadSelector_toTarget_withObject_( - ffi.Pointer selector, - NSObject target, - NSObject? argument) { - _objc_msgSend_533( - _class_NSThread, - _sel_detachNewThreadSelector_toTarget_withObject_, - selector, - target.pointer, - argument?.pointer ?? ffi.nullptr); - } - - static bool isMultiThreaded() { - return _objc_msgSend_12(_class_NSThread, _sel_isMultiThreaded); - } - - NSMutableDictionary get threadDictionary { - final _ret = _objc_msgSend_539(this.pointer, _sel_threadDictionary); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static void sleepUntilDate_(NSDate date) { - _objc_msgSend_540(_class_NSThread, _sel_sleepUntilDate_, date.pointer); - } - - static void sleepForTimeInterval_(double ti) { - _objc_msgSend_541(_class_NSThread, _sel_sleepForTimeInterval_, ti); - } - - static void exit() { - _objc_msgSend_1(_class_NSThread, _sel_exit); - } - - double get threadPriority { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_threadPriority) - : _objc_msgSend_165(this.pointer, _sel_threadPriority); - } - - set threadPriority(double value) { - return _objc_msgSend_542(this.pointer, _sel_setThreadPriority_, value); - } - - int get qualityOfService { - return _objc_msgSend_543(this.pointer, _sel_qualityOfService); - } - - set qualityOfService(int value) { - return _objc_msgSend_544(this.pointer, _sel_setQualityOfService_, value); - } - - static NSArray getCallStackReturnAddresses() { - final _ret = - _objc_msgSend_85(_class_NSThread, _sel_callStackReturnAddresses); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray getCallStackSymbols() { - final _ret = _objc_msgSend_85(_class_NSThread, _sel_callStackSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSString? get name { - final _ret = _objc_msgSend_44(this.pointer, _sel_name); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set name(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); - } - - int get stackSize { - return _objc_msgSend_10(this.pointer, _sel_stackSize); - } - - set stackSize(int value) { - return _objc_msgSend_516(this.pointer, _sel_setStackSize_, value); - } - - bool get isMainThread { - return _objc_msgSend_12(this.pointer, _sel_isMainThread); - } - - static NSThread getMainThread() { - final _ret = _objc_msgSend_531(_class_NSThread, _sel_mainThread); - return NSThread._(_ret, retain: true, release: true); - } - - @override - NSThread init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSThread._(_ret, retain: true, release: true); - } - - NSThread initWithTarget_selector_object_(NSObject target, - ffi.Pointer selector, NSObject? argument) { - final _ret = _objc_msgSend_546( - this.pointer, - _sel_initWithTarget_selector_object_, - target.pointer, - selector, - argument?.pointer ?? ffi.nullptr); - return NSThread._(_ret, retain: true, release: true); - } - - NSThread initWithBlock_(ObjCBlock_ffiVoid block) { - final _ret = - _objc_msgSend_547(this.pointer, _sel_initWithBlock_, block.pointer); - return NSThread._(_ret, retain: true, release: true); - } - - bool get executing { - return _objc_msgSend_12(this.pointer, _sel_isExecuting); - } - - bool get finished { - return _objc_msgSend_12(this.pointer, _sel_isFinished); - } - - bool get cancelled { - return _objc_msgSend_12(this.pointer, _sel_isCancelled); - } - - void cancel() { - _objc_msgSend_1(this.pointer, _sel_cancel); - } - - void start() { - _objc_msgSend_1(this.pointer, _sel_start); - } - - void main() { - _objc_msgSend_1(this.pointer, _sel_main); - } - - static NSThread new1() { - final _ret = _objc_msgSend_2(_class_NSThread, _sel_new); - return NSThread._(_ret, retain: false, release: true); - } - - static NSThread allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSThread, _sel_allocWithZone_, zone); - return NSThread._(_ret, retain: false, release: true); - } - - static NSThread alloc() { - final _ret = _objc_msgSend_2(_class_NSThread, _sel_alloc); - return NSThread._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSThread, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSThread, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSThread, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSThread, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSThread, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSThread, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSThread, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSThread, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSThread, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSThread = objc.getClass("NSThread"); -late final _sel_currentThread = objc.registerName("currentThread"); -final _objc_msgSend_531 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -void _ObjCBlock_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, -) => - block.ref.target - .cast>() - .asFunction()(); -final _ObjCBlock_ffiVoid_closureRegistry = {}; -int _ObjCBlock_ffiVoid_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_registerClosure(void Function() fn) { - final id = ++_ObjCBlock_ffiVoid_closureRegistryIndex; - _ObjCBlock_ffiVoid_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_closureTrampoline( - ffi.Pointer block, -) => - _ObjCBlock_ffiVoid_closureRegistry[block.ref.target.address]!(); - -class ObjCBlock_ffiVoid extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid._(pointer, retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid.fromFunctionPointer( - ffi.Pointer> ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer)>( - _ObjCBlock_ffiVoid_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid.fromFunction(void Function() fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer)>( - _ObjCBlock_ffiVoid_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_registerClosure(() => fn()))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid.listener(void Function() fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_registerClosure(() => fn()))); - static ffi.NativeCallable)>? - _dartFuncListenerTrampoline; - - void call() => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block)>>() - .asFunction)>()( - pointer, - ); -} - -late final _sel_detachNewThreadWithBlock_ = - objc.registerName("detachNewThreadWithBlock:"); -final _objc_msgSend_532 = 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_detachNewThreadSelector_toTarget_withObject_ = - objc.registerName("detachNewThreadSelector:toTarget:withObject:"); -final _objc_msgSend_533 = 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_isMultiThreaded = objc.registerName("isMultiThreaded"); - -class NSMutableDictionary extends NSDictionary { - NSMutableDictionary._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMutableDictionary] that points to the same underlying object as [other]. - static NSMutableDictionary castFrom(T other) { - return NSMutableDictionary._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSMutableDictionary] that wraps the given raw object pointer. - static NSMutableDictionary castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableDictionary._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableDictionary]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableDictionary); - } - - void removeObjectForKey_(NSObject aKey) { - _objc_msgSend_15(this.pointer, _sel_removeObjectForKey_, aKey.pointer); - } - - void setObject_forKey_(NSObject anObject, NSObject aKey) { - _objc_msgSend_534( - this.pointer, _sel_setObject_forKey_, anObject.pointer, aKey.pointer); - } - - @override - NSMutableDictionary init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - NSMutableDictionary initWithCapacity_(int numItems) { - final _ret = - _objc_msgSend_65(this.pointer, _sel_initWithCapacity_, numItems); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - @override - NSMutableDictionary? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, retain: true, release: true); - } - - void addEntriesFromDictionary_(NSDictionary otherDictionary) { - _objc_msgSend_509( - this.pointer, _sel_addEntriesFromDictionary_, otherDictionary.pointer); - } - - void removeAllObjects() { - _objc_msgSend_1(this.pointer, _sel_removeAllObjects); - } - - void removeObjectsForKeys_(NSArray keyArray) { - _objc_msgSend_472( - this.pointer, _sel_removeObjectsForKeys_, keyArray.pointer); - } - - void setDictionary_(NSDictionary otherDictionary) { - _objc_msgSend_509( - this.pointer, _sel_setDictionary_, otherDictionary.pointer); - } - - void setObject_forKeyedSubscript_(NSObject? obj, NSObject key) { - _objc_msgSend_535(this.pointer, _sel_setObject_forKeyedSubscript_, - obj?.pointer ?? ffi.nullptr, key.pointer); - } - - static NSMutableDictionary dictionaryWithCapacity_(int numItems) { - final _ret = _objc_msgSend_65( - _class_NSMutableDictionary, _sel_dictionaryWithCapacity_, numItems); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary? dictionaryWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_536(_class_NSMutableDictionary, - _sel_dictionaryWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary? dictionaryWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_537(_class_NSMutableDictionary, - _sel_dictionaryWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, retain: true, release: true); - } - - NSMutableDictionary? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_536( - this.pointer, _sel_initWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, retain: true, release: true); - } - - NSMutableDictionary? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_537( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithSharedKeySet_(NSObject keyset) { - final _ret = _objc_msgSend_538(_class_NSMutableDictionary, - _sel_dictionaryWithSharedKeySet_, keyset.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - void setValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - @override - NSMutableDictionary initWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _objc_msgSend_147( - this.pointer, _sel_initWithObjects_forKeys_count_, objects, keys, cnt); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary dictionary() { - final _ret = _objc_msgSend_2(_class_NSMutableDictionary, _sel_dictionary); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObject_forKey_( - NSObject object, NSObject key) { - final _ret = _objc_msgSend_158(_class_NSMutableDictionary, - _sel_dictionaryWithObject_forKey_, object.pointer, key.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _objc_msgSend_147(_class_NSMutableDictionary, - _sel_dictionaryWithObjects_forKeys_count_, objects, keys, cnt); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjectsAndKeys_( - NSObject firstObject) { - final _ret = _objc_msgSend_124(_class_NSMutableDictionary, - _sel_dictionaryWithObjectsAndKeys_, firstObject.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithDictionary_(NSDictionary dict) { - final _ret = _objc_msgSend_159(_class_NSMutableDictionary, - _sel_dictionaryWithDictionary_, dict.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjects_forKeys_( - NSArray objects, NSArray keys) { - final _ret = _objc_msgSend_160(_class_NSMutableDictionary, - _sel_dictionaryWithObjects_forKeys_, objects.pointer, keys.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - @override - NSMutableDictionary initWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjectsAndKeys_, firstObject.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - @override - NSMutableDictionary initWithDictionary_(NSDictionary otherDictionary) { - final _ret = _objc_msgSend_159( - this.pointer, _sel_initWithDictionary_, otherDictionary.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - @override - NSMutableDictionary initWithDictionary_copyItems_( - NSDictionary otherDictionary, bool flag) { - final _ret = _objc_msgSend_161(this.pointer, - _sel_initWithDictionary_copyItems_, otherDictionary.pointer, flag); - return NSMutableDictionary._(_ret, retain: false, release: true); - } - - @override - NSMutableDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { - final _ret = _objc_msgSend_160(this.pointer, _sel_initWithObjects_forKeys_, - objects.pointer, keys.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSDictionary? dictionaryWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_162(_class_NSMutableDictionary, - _sel_dictionaryWithContentsOfURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - static NSObject sharedKeySetForKeys_(NSArray keys) { - final _ret = _objc_msgSend_125( - _class_NSMutableDictionary, _sel_sharedKeySetForKeys_, keys.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSMutableDictionary new1() { - final _ret = _objc_msgSend_2(_class_NSMutableDictionary, _sel_new); - return NSMutableDictionary._(_ret, retain: false, release: true); - } - - static NSMutableDictionary allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMutableDictionary, _sel_allocWithZone_, zone); - return NSMutableDictionary._(_ret, retain: false, release: true); - } - - static NSMutableDictionary alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableDictionary, _sel_alloc); - return NSMutableDictionary._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableDictionary, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableDictionary, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableDictionary, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMutableDictionary, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableDictionary, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableDictionary, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableDictionary, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableDictionary, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSMutableDictionary, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSMutableDictionary = objc.getClass("NSMutableDictionary"); -late final _sel_removeObjectForKey_ = objc.registerName("removeObjectForKey:"); -late final _sel_setObject_forKey_ = objc.registerName("setObject:forKey:"); -final _objc_msgSend_534 = 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_addEntriesFromDictionary_ = - objc.registerName("addEntriesFromDictionary:"); -late final _sel_removeObjectsForKeys_ = - objc.registerName("removeObjectsForKeys:"); -late final _sel_setDictionary_ = objc.registerName("setDictionary:"); -late final _sel_setObject_forKeyedSubscript_ = - objc.registerName("setObject:forKeyedSubscript:"); -final _objc_msgSend_535 = 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_dictionaryWithCapacity_ = - objc.registerName("dictionaryWithCapacity:"); -final _objc_msgSend_536 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_537 = 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_dictionaryWithSharedKeySet_ = - objc.registerName("dictionaryWithSharedKeySet:"); -final _objc_msgSend_538 = 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_threadDictionary = objc.registerName("threadDictionary"); -final _objc_msgSend_539 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_sleepUntilDate_ = objc.registerName("sleepUntilDate:"); -final _objc_msgSend_540 = 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_sleepForTimeInterval_ = - objc.registerName("sleepForTimeInterval:"); -final _objc_msgSend_541 = 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_exit = objc.registerName("exit"); -late final _sel_threadPriority = objc.registerName("threadPriority"); -late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); -final _objc_msgSend_542 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, double)>(); - -abstract class NSQualityOfService { - static const int NSQualityOfServiceUserInteractive = 33; - static const int NSQualityOfServiceUserInitiated = 25; - static const int NSQualityOfServiceUtility = 17; - static const int NSQualityOfServiceBackground = 9; - static const int NSQualityOfServiceDefault = -1; -} - -late final _sel_qualityOfService = objc.registerName("qualityOfService"); -final _objc_msgSend_543 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setQualityOfService_ = - objc.registerName("setQualityOfService:"); -final _objc_msgSend_544 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_callStackReturnAddresses = - objc.registerName("callStackReturnAddresses"); -late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); -late final _sel_setName_ = objc.registerName("setName:"); -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_stackSize = objc.registerName("stackSize"); -late final _sel_setStackSize_ = objc.registerName("setStackSize:"); -late final _sel_isMainThread = objc.registerName("isMainThread"); -late final _sel_mainThread = objc.registerName("mainThread"); -late final _sel_initWithTarget_selector_object_ = - objc.registerName("initWithTarget:selector:object:"); -final _objc_msgSend_546 = 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_initWithBlock_ = objc.registerName("initWithBlock:"); -final _objc_msgSend_547 = 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_isExecuting = objc.registerName("isExecuting"); -late final _sel_isFinished = objc.registerName("isFinished"); -late final _sel_isCancelled = objc.registerName("isCancelled"); -late final _sel_cancel = objc.registerName("cancel"); -late final _sel_start = objc.registerName("start"); -late final _sel_main = objc.registerName("main"); -late final _sel_performSelector_onThread_withObject_waitUntilDone_modes_ = objc - .registerName("performSelector:onThread:withObject:waitUntilDone:modes:"); -final _objc_msgSend_548 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); -late final _sel_performSelector_onThread_withObject_waitUntilDone_ = - objc.registerName("performSelector:onThread:withObject:waitUntilDone:"); -final _objc_msgSend_549 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_performSelectorInBackground_withObject_ = - objc.registerName("performSelectorInBackground:withObject:"); -late final _sel_classForArchiver = objc.registerName("classForArchiver"); - -class NSArchiver extends NSCoder { - NSArchiver._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSArchiver] that points to the same underlying object as [other]. - static NSArchiver castFrom(T other) { - return NSArchiver._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSArchiver] that wraps the given raw object pointer. - static NSArchiver castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSArchiver._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSArchiver]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSArchiver); - } - - NSArchiver initForWritingWithMutableData_(NSMutableData mdata) { - final _ret = _objc_msgSend_521( - this.pointer, _sel_initForWritingWithMutableData_, mdata.pointer); - return NSArchiver._(_ret, retain: true, release: true); - } - - NSMutableData get archiverData { - final _ret = _objc_msgSend_550(this.pointer, _sel_archiverData); - return NSMutableData._(_ret, retain: true, release: true); - } - - @override - void encodeRootObject_(NSObject rootObject) { - _objc_msgSend_15(this.pointer, _sel_encodeRootObject_, rootObject.pointer); - } - - @override - void encodeConditionalObject_(NSObject? object) { - _objc_msgSend_289(this.pointer, _sel_encodeConditionalObject_, - object?.pointer ?? ffi.nullptr); - } - - static NSData archivedDataWithRootObject_(NSObject rootObject) { - final _ret = _objc_msgSend_522(_class_NSArchiver, - _sel_archivedDataWithRootObject_, rootObject.pointer); - return NSData._(_ret, retain: true, release: true); - } - - static bool archiveRootObject_toFile_(NSObject rootObject, NSString path) { - return _objc_msgSend_261(_class_NSArchiver, _sel_archiveRootObject_toFile_, - rootObject.pointer, path.pointer); - } - - void encodeClassName_intoClassName_( - NSString trueName, NSString inArchiveName) { - _objc_msgSend_551(this.pointer, _sel_encodeClassName_intoClassName_, - trueName.pointer, inArchiveName.pointer); - } - - NSString? classNameEncodedForTrueClassName_(NSString trueName) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_classNameEncodedForTrueClassName_, trueName.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - void replaceObject_withObject_(NSObject object, NSObject newObject) { - _objc_msgSend_534(this.pointer, _sel_replaceObject_withObject_, - object.pointer, newObject.pointer); - } - - @override - NSArchiver init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSArchiver._(_ret, retain: true, release: true); - } - - static NSArchiver new1() { - final _ret = _objc_msgSend_2(_class_NSArchiver, _sel_new); - return NSArchiver._(_ret, retain: false, release: true); - } - - static NSArchiver allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSArchiver, _sel_allocWithZone_, zone); - return NSArchiver._(_ret, retain: false, release: true); - } - - static NSArchiver alloc() { - final _ret = _objc_msgSend_2(_class_NSArchiver, _sel_alloc); - return NSArchiver._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSArchiver, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSArchiver, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSArchiver, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSArchiver, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSArchiver, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSArchiver, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSArchiver, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSArchiver, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSArchiver, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSArchiver = objc.getClass("NSArchiver"); -late final _sel_archiverData = objc.registerName("archiverData"); -final _objc_msgSend_550 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_encodeClassName_intoClassName_ = - objc.registerName("encodeClassName:intoClassName:"); -final _objc_msgSend_551 = 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_classNameEncodedForTrueClassName_ = - objc.registerName("classNameEncodedForTrueClassName:"); -late final _sel_replaceObject_withObject_ = - objc.registerName("replaceObject:withObject:"); -late final _sel_replacementObjectForArchiver_ = - objc.registerName("replacementObjectForArchiver:"); -final _objc_msgSend_552 = 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_classForPortCoder = objc.registerName("classForPortCoder"); - -class NSPortCoder extends NSCoder { - NSPortCoder._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSPortCoder] that points to the same underlying object as [other]. - static NSPortCoder castFrom(T other) { - return NSPortCoder._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSPortCoder] that wraps the given raw object pointer. - static NSPortCoder castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPortCoder._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSPortCoder]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSPortCoder); - } - - bool isBycopy() { - return _objc_msgSend_12(this.pointer, _sel_isBycopy); - } - - bool isByref() { - return _objc_msgSend_12(this.pointer, _sel_isByref); - } - - void encodePortObject_(NSPort aport) { - _objc_msgSend_593(this.pointer, _sel_encodePortObject_, aport.pointer); - } - - NSPort? decodePortObject() { - final _ret = _objc_msgSend_594(this.pointer, _sel_decodePortObject); - return _ret.address == 0 - ? null - : NSPort._(_ret, retain: true, release: true); - } - - NSConnection? connection() { - final _ret = _objc_msgSend_595(this.pointer, _sel_connection); - return _ret.address == 0 - ? null - : NSConnection._(_ret, retain: true, release: true); - } - - static NSObject portCoderWithReceivePort_sendPort_components_( - NSPort? rcvPort, NSPort? sndPort, NSArray? comps) { - final _ret = _objc_msgSend_596( - _class_NSPortCoder, - _sel_portCoderWithReceivePort_sendPort_components_, - rcvPort?.pointer ?? ffi.nullptr, - sndPort?.pointer ?? ffi.nullptr, - comps?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); - } - - NSObject initWithReceivePort_sendPort_components_( - NSPort? rcvPort, NSPort? sndPort, NSArray? comps) { - final _ret = _objc_msgSend_596( - this.pointer, - _sel_initWithReceivePort_sendPort_components_, - rcvPort?.pointer ?? ffi.nullptr, - sndPort?.pointer ?? ffi.nullptr, - comps?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); - } - - void dispatch() { - _objc_msgSend_1(this.pointer, _sel_dispatch); - } - - @override - NSPortCoder init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSPortCoder._(_ret, retain: true, release: true); - } - - static NSPortCoder new1() { - final _ret = _objc_msgSend_2(_class_NSPortCoder, _sel_new); - return NSPortCoder._(_ret, retain: false, release: true); - } - - static NSPortCoder allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSPortCoder, _sel_allocWithZone_, zone); - return NSPortCoder._(_ret, retain: false, release: true); - } - - static NSPortCoder alloc() { - final _ret = _objc_msgSend_2(_class_NSPortCoder, _sel_alloc); - return NSPortCoder._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSPortCoder, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSPortCoder, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSPortCoder, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSPortCoder, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSPortCoder, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSPortCoder, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSPortCoder, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSPortCoder, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSPortCoder, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSPortCoder = objc.getClass("NSPortCoder"); -late final _sel_isBycopy = objc.registerName("isBycopy"); -late final _sel_isByref = objc.registerName("isByref"); - -class NSPort extends NSObject { - NSPort._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSPort] that points to the same underlying object as [other]. - static NSPort castFrom(T other) { - return NSPort._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSPort] that wraps the given raw object pointer. - static NSPort castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPort._(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); - } - - static NSPort port() { - final _ret = _objc_msgSend_553(_class_NSPort, _sel_port); - return NSPort._(_ret, retain: true, release: true); - } - - void invalidate() { - _objc_msgSend_1(this.pointer, _sel_invalidate); - } - - bool get valid { - return _objc_msgSend_12(this.pointer, _sel_isValid); - } - - void setDelegate_(NSObject? anObject) { - _objc_msgSend_289( - this.pointer, _sel_setDelegate_, anObject?.pointer ?? ffi.nullptr); - } - - NSObject? delegate() { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - void scheduleInRunLoop_forMode_(NSRunLoop runLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_scheduleInRunLoop_forMode_, - runLoop.pointer, mode.pointer); - } - - void removeFromRunLoop_forMode_(NSRunLoop runLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_removeFromRunLoop_forMode_, - runLoop.pointer, mode.pointer); - } - - int get reservedSpaceLength { - return _objc_msgSend_10(this.pointer, _sel_reservedSpaceLength); - } - - bool sendBeforeDate_components_from_reserved_( - NSDate limitDate, - NSMutableArray? components, - NSPort? receivePort, - int headerSpaceReserved) { - return _objc_msgSend_570( - this.pointer, - _sel_sendBeforeDate_components_from_reserved_, - limitDate.pointer, - components?.pointer ?? ffi.nullptr, - receivePort?.pointer ?? ffi.nullptr, - headerSpaceReserved); - } - - bool sendBeforeDate_msgid_components_from_reserved_( - NSDate limitDate, - int msgID, - NSMutableArray? components, - NSPort? receivePort, - int headerSpaceReserved) { - return _objc_msgSend_571( - this.pointer, - _sel_sendBeforeDate_msgid_components_from_reserved_, - limitDate.pointer, - msgID, - components?.pointer ?? ffi.nullptr, - receivePort?.pointer ?? ffi.nullptr, - headerSpaceReserved); - } - - void addConnection_toRunLoop_forMode_( - NSConnection conn, NSRunLoop runLoop, NSString mode) { - _objc_msgSend_592(this.pointer, _sel_addConnection_toRunLoop_forMode_, - conn.pointer, runLoop.pointer, mode.pointer); - } - - void removeConnection_fromRunLoop_forMode_( - NSConnection conn, NSRunLoop runLoop, NSString mode) { - _objc_msgSend_592(this.pointer, _sel_removeConnection_fromRunLoop_forMode_, - conn.pointer, runLoop.pointer, mode.pointer); - } - - @override - NSPort init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSPort._(_ret, retain: true, release: true); - } - - static NSPort new1() { - final _ret = _objc_msgSend_2(_class_NSPort, _sel_new); - return NSPort._(_ret, retain: false, release: true); - } - - static NSPort allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSPort, _sel_allocWithZone_, zone); - return NSPort._(_ret, retain: false, release: true); - } - - static NSPort alloc() { - final _ret = _objc_msgSend_2(_class_NSPort, _sel_alloc); - return NSPort._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSPort, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSPort, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSPort, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSPort, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSPort, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64( - _class_NSPort, _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSPort, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSPort, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSPort, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSPort = objc.getClass("NSPort"); -final _objc_msgSend_553 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_invalidate = objc.registerName("invalidate"); -late final _sel_isValid = objc.registerName("isValid"); - -class NSRunLoop extends NSObject { - NSRunLoop._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSRunLoop] that points to the same underlying object as [other]. - static NSRunLoop castFrom(T other) { - return NSRunLoop._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSRunLoop] that wraps the given raw object pointer. - static NSRunLoop castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSRunLoop._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSRunLoop]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSRunLoop); - } - - static NSRunLoop getCurrentRunLoop() { - final _ret = _objc_msgSend_554(_class_NSRunLoop, _sel_currentRunLoop); - return NSRunLoop._(_ret, retain: true, release: true); - } - - static NSRunLoop getMainRunLoop() { - final _ret = _objc_msgSend_554(_class_NSRunLoop, _sel_mainRunLoop); - return NSRunLoop._(_ret, retain: true, release: true); - } - - NSString? get currentMode { - final _ret = _objc_msgSend_44(this.pointer, _sel_currentMode); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - ffi.Pointer<__CFRunLoop> getCFRunLoop() { - return _objc_msgSend_555(this.pointer, _sel_getCFRunLoop); - } - - void addTimer_forMode_(NSTimer timer, NSString mode) { - _objc_msgSend_562( - this.pointer, _sel_addTimer_forMode_, timer.pointer, mode.pointer); - } - - void addPort_forMode_(NSPort aPort, NSString mode) { - _objc_msgSend_563( - this.pointer, _sel_addPort_forMode_, aPort.pointer, mode.pointer); - } - - void removePort_forMode_(NSPort aPort, NSString mode) { - _objc_msgSend_563( - this.pointer, _sel_removePort_forMode_, aPort.pointer, mode.pointer); - } - - NSDate? limitDateForMode_(NSString mode) { - final _ret = - _objc_msgSend_564(this.pointer, _sel_limitDateForMode_, mode.pointer); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - void acceptInputForMode_beforeDate_(NSString mode, NSDate limitDate) { - _objc_msgSend_565(this.pointer, _sel_acceptInputForMode_beforeDate_, - mode.pointer, limitDate.pointer); - } - - void run() { - _objc_msgSend_1(this.pointer, _sel_run); - } - - void runUntilDate_(NSDate limitDate) { - _objc_msgSend_540(this.pointer, _sel_runUntilDate_, limitDate.pointer); - } - - bool runMode_beforeDate_(NSString mode, NSDate limitDate) { - return _objc_msgSend_566(this.pointer, _sel_runMode_beforeDate_, - mode.pointer, limitDate.pointer); - } - - void configureAsServer() { - _objc_msgSend_1(this.pointer, _sel_configureAsServer); - } - - void performInModes_block_(NSArray modes, ObjCBlock_ffiVoid block) { - _objc_msgSend_567( - this.pointer, _sel_performInModes_block_, modes.pointer, block.pointer); - } - - void performBlock_(ObjCBlock_ffiVoid block) { - _objc_msgSend_532(this.pointer, _sel_performBlock_, block.pointer); - } - - void performSelector_target_argument_order_modes_( - ffi.Pointer aSelector, - NSObject target, - NSObject? arg, - int order, - NSArray modes) { - _objc_msgSend_568( - this.pointer, - _sel_performSelector_target_argument_order_modes_, - aSelector, - target.pointer, - arg?.pointer ?? ffi.nullptr, - order, - modes.pointer); - } - - void cancelPerformSelector_target_argument_( - ffi.Pointer aSelector, - NSObject target, - NSObject? arg) { - _objc_msgSend_533(this.pointer, _sel_cancelPerformSelector_target_argument_, - aSelector, target.pointer, arg?.pointer ?? ffi.nullptr); - } - - void cancelPerformSelectorsWithTarget_(NSObject target) { - _objc_msgSend_15( - this.pointer, _sel_cancelPerformSelectorsWithTarget_, target.pointer); - } - - @override - NSRunLoop init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSRunLoop._(_ret, retain: true, release: true); - } - - static NSRunLoop new1() { - final _ret = _objc_msgSend_2(_class_NSRunLoop, _sel_new); - return NSRunLoop._(_ret, retain: false, release: true); - } - - static NSRunLoop allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSRunLoop, _sel_allocWithZone_, zone); - return NSRunLoop._(_ret, retain: false, release: true); - } - - static NSRunLoop alloc() { - final _ret = _objc_msgSend_2(_class_NSRunLoop, _sel_alloc); - return NSRunLoop._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSRunLoop, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSRunLoop, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSRunLoop, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSRunLoop, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSRunLoop, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSRunLoop, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSRunLoop, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSRunLoop, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSRunLoop, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSRunLoop = objc.getClass("NSRunLoop"); -late final _sel_currentRunLoop = objc.registerName("currentRunLoop"); -final _objc_msgSend_554 = 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_555 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer<__CFRunLoop> Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer<__CFRunLoop> Function( - ffi.Pointer, ffi.Pointer)>(); - -class NSTimer extends NSObject { - NSTimer._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSTimer] that points to the same underlying object as [other]. - static NSTimer castFrom(T other) { - return NSTimer._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSTimer] that wraps the given raw object pointer. - static NSTimer castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSTimer._(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); - } - - static NSTimer timerWithTimeInterval_invocation_repeats_( - double ti, NSInvocation invocation, bool yesOrNo) { - final _ret = _objc_msgSend_556( - _class_NSTimer, - _sel_timerWithTimeInterval_invocation_repeats_, - ti, - invocation.pointer, - yesOrNo); - return NSTimer._(_ret, retain: true, release: true); - } - - static NSTimer scheduledTimerWithTimeInterval_invocation_repeats_( - double ti, NSInvocation invocation, bool yesOrNo) { - final _ret = _objc_msgSend_556( - _class_NSTimer, - _sel_scheduledTimerWithTimeInterval_invocation_repeats_, - ti, - invocation.pointer, - yesOrNo); - return NSTimer._(_ret, retain: true, release: true); - } - - static NSTimer timerWithTimeInterval_target_selector_userInfo_repeats_( - double ti, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? userInfo, - bool yesOrNo) { - final _ret = _objc_msgSend_557( - _class_NSTimer, - _sel_timerWithTimeInterval_target_selector_userInfo_repeats_, - ti, - aTarget.pointer, - aSelector, - userInfo?.pointer ?? ffi.nullptr, - yesOrNo); - return NSTimer._(_ret, retain: true, release: true); - } - - static NSTimer - scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_( - double ti, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? userInfo, - bool yesOrNo) { - final _ret = _objc_msgSend_557( - _class_NSTimer, - _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_, - ti, - aTarget.pointer, - aSelector, - userInfo?.pointer ?? ffi.nullptr, - yesOrNo); - return NSTimer._(_ret, retain: true, release: true); - } - - static NSTimer timerWithTimeInterval_repeats_block_( - double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { - final _ret = _objc_msgSend_558( - _class_NSTimer, - _sel_timerWithTimeInterval_repeats_block_, - interval, - repeats, - block.pointer); - return NSTimer._(_ret, retain: true, release: true); - } - - static NSTimer scheduledTimerWithTimeInterval_repeats_block_( - double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { - final _ret = _objc_msgSend_558( - _class_NSTimer, - _sel_scheduledTimerWithTimeInterval_repeats_block_, - interval, - repeats, - block.pointer); - return NSTimer._(_ret, retain: true, release: true); - } - - NSTimer initWithFireDate_interval_repeats_block_(NSDate date, double interval, - bool repeats, ObjCBlock_ffiVoid_NSTimer block) { - final _ret = _objc_msgSend_559( - this.pointer, - _sel_initWithFireDate_interval_repeats_block_, - date.pointer, - interval, - repeats, - block.pointer); - return NSTimer._(_ret, retain: true, release: true); - } - - NSTimer initWithFireDate_interval_target_selector_userInfo_repeats_( - NSDate date, - double ti, - NSObject t, - ffi.Pointer s, - NSObject? ui, - bool rep) { - final _ret = _objc_msgSend_560( - this.pointer, - _sel_initWithFireDate_interval_target_selector_userInfo_repeats_, - date.pointer, - ti, - t.pointer, - s, - ui?.pointer ?? ffi.nullptr, - rep); - return NSTimer._(_ret, retain: true, release: true); - } - - void fire() { - _objc_msgSend_1(this.pointer, _sel_fire); - } - - NSDate get fireDate { - final _ret = _objc_msgSend_172(this.pointer, _sel_fireDate); - return NSDate._(_ret, retain: true, release: true); - } - - set fireDate(NSDate value) { - return _objc_msgSend_561(this.pointer, _sel_setFireDate_, value.pointer); - } - - double get timeInterval { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_timeInterval) - : _objc_msgSend_165(this.pointer, _sel_timeInterval); - } - - double get tolerance { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_tolerance) - : _objc_msgSend_165(this.pointer, _sel_tolerance); - } - - set tolerance(double value) { - return _objc_msgSend_542(this.pointer, _sel_setTolerance_, value); - } - - void invalidate() { - _objc_msgSend_1(this.pointer, _sel_invalidate); - } - - bool get valid { - return _objc_msgSend_12(this.pointer, _sel_isValid); - } - - NSObject? get userInfo { - final _ret = _objc_msgSend_17(this.pointer, _sel_userInfo); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - @override - NSTimer init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSTimer._(_ret, retain: true, release: true); - } - - static NSTimer new1() { - final _ret = _objc_msgSend_2(_class_NSTimer, _sel_new); - return NSTimer._(_ret, retain: false, release: true); - } - - static NSTimer allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSTimer, _sel_allocWithZone_, zone); - return NSTimer._(_ret, retain: false, release: true); - } - - static NSTimer alloc() { - final _ret = _objc_msgSend_2(_class_NSTimer, _sel_alloc); - return NSTimer._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSTimer, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSTimer, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSTimer, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSTimer, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSTimer, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSTimer, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSTimer, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSTimer, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSTimer, _sel_classForKeyedUnarchiver); - return NSObject._(_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_556 = 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_557 = 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); -final _ObjCBlock_ffiVoid_NSTimer_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSTimer_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSTimer_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSTimer_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSTimer_closureRegistry[block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_NSTimer extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSTimer._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSTimer castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSTimer._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSTimer.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSTimer.fromFunction(void Function(NSTimer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSTimer_registerClosure( - (ffi.Pointer arg0) => - fn(NSTimer._(arg0, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSTimer.listener(void Function(NSTimer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSTimer_registerClosure( - (ffi.Pointer arg0) => - fn(NSTimer._(arg0, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSTimer arg0) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(pointer, arg0.pointer); -} - -late final _sel_timerWithTimeInterval_repeats_block_ = - objc.registerName("timerWithTimeInterval:repeats:block:"); -final _objc_msgSend_558 = 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_559 = objc.msgSendPointer +late final _sel_failurePolicy = objc.registerName("failurePolicy"); +final _objc_msgSend_44 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Bool, - ffi.Pointer)>>() + ffi.Int32 Function(ffi.Pointer, + 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_560 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setFailurePolicy_ = objc.registerName("setFailurePolicy:"); +final _objc_msgSend_45 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() .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:"); -final _objc_msgSend_561 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_languageCode = objc.registerName("languageCode"); +late final _sel_setLanguageCode_ = objc.registerName("setLanguageCode:"); +final _objc_msgSend_46 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -26011,131 +2145,84 @@ final _objc_msgSend_561 = objc.msgSendPointer .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:"); -late final _sel_addTimer_forMode_ = objc.registerName("addTimer:forMode:"); -final _objc_msgSend_562 = objc.msgSendPointer +late final _sel_appliesSourcePositionAttributes = + objc.registerName("appliesSourcePositionAttributes"); +late final _sel_setAppliesSourcePositionAttributes_ = + objc.registerName("setAppliesSourcePositionAttributes:"); +late final _sel_new = objc.registerName("new"); + +final class _NSZone extends ffi.Opaque {} + +late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); +final _objc_msgSend_47 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<_NSZone>)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_addPort_forMode_ = objc.registerName("addPort:forMode:"); -final _objc_msgSend_563 = objc.msgSendPointer + 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_48 = 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_removePort_forMode_ = objc.registerName("removePort:forMode:"); -late final _sel_limitDateForMode_ = objc.registerName("limitDateForMode:"); -final _objc_msgSend_564 = objc.msgSendPointer +late final _sel_cancelPreviousPerformRequestsWithTarget_ = + objc.registerName("cancelPreviousPerformRequestsWithTarget:"); +final _objc_msgSend_49 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_acceptInputForMode_beforeDate_ = - objc.registerName("acceptInputForMode:beforeDate:"); -final _objc_msgSend_565 = objc.msgSendPointer +late final _sel_accessInstanceVariablesDirectly = + objc.registerName("accessInstanceVariablesDirectly"); +late final _sel_useStoredAccessor = objc.registerName("useStoredAccessor"); +late final _sel_keyPathsForValuesAffectingValueForKey_ = + objc.registerName("keyPathsForValuesAffectingValueForKey:"); +final _objc_msgSend_50 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer 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:"); -late final _sel_runMode_beforeDate_ = objc.registerName("runMode:beforeDate:"); -final _objc_msgSend_566 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_automaticallyNotifiesObserversForKey_ = + objc.registerName("automaticallyNotifiesObserversForKey:"); +final _objc_msgSend_51 = 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_567 = 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:"); -late final _sel_performSelector_target_argument_order_modes_ = - objc.registerName("performSelector:target:argument:order:modes:"); -final _objc_msgSend_568 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_cancelPerformSelector_target_argument_ = - objc.registerName("cancelPerformSelector:target:argument:"); -late final _sel_cancelPerformSelectorsWithTarget_ = - objc.registerName("cancelPerformSelectorsWithTarget:"); -late final _sel_scheduleInRunLoop_forMode_ = - objc.registerName("scheduleInRunLoop:forMode:"); -final _objc_msgSend_569 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setKeys_triggerChangeNotificationsForDependentKey_ = + objc.registerName("setKeys:triggerChangeNotificationsForDependentKey:"); +final _objc_msgSend_52 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -26149,414 +2236,238 @@ final _objc_msgSend_569 = objc.msgSendPointer 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_570 = 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_571 = objc.msgSendPointer +late final _sel_classFallbacksForKeyedArchiver = + objc.registerName("classFallbacksForKeyedArchiver"); +late final _sel_classForKeyedUnarchiver = + objc.registerName("classForKeyedUnarchiver"); +final _objc_msgSend_0 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Pointer)>>() .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - int)>(); - -class NSConnection extends NSObject { - NSConnection._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSConnection] that points to the same underlying object as [other]. - static NSConnection castFrom(T other) { - return NSConnection._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSConnection] that wraps the given raw object pointer. - static NSConnection castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSConnection._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSConnection]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSConnection); - } - - NSDictionary get statistics { - final _ret = _objc_msgSend_181(this.pointer, _sel_statistics); - return NSDictionary._(_ret, retain: true, release: true); - } - - static NSArray allConnections() { - final _ret = _objc_msgSend_85(_class_NSConnection, _sel_allConnections); - return NSArray._(_ret, retain: true, release: true); - } - - static NSConnection defaultConnection() { - final _ret = _objc_msgSend_572(_class_NSConnection, _sel_defaultConnection); - return NSConnection._(_ret, retain: true, release: true); - } - - static NSConnection? connectionWithRegisteredName_host_( - NSString name, NSString? hostName) { - final _ret = _objc_msgSend_573( - _class_NSConnection, - _sel_connectionWithRegisteredName_host_, - name.pointer, - hostName?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSConnection._(_ret, retain: true, release: true); - } - - static NSConnection? connectionWithRegisteredName_host_usingNameServer_( - NSString name, NSString? hostName, NSPortNameServer server) { - final _ret = _objc_msgSend_578( - _class_NSConnection, - _sel_connectionWithRegisteredName_host_usingNameServer_, - name.pointer, - hostName?.pointer ?? ffi.nullptr, - server.pointer); - return _ret.address == 0 - ? null - : NSConnection._(_ret, retain: true, release: true); - } - - static NSDistantObject? rootProxyForConnectionWithRegisteredName_host_( - NSString name, NSString? hostName) { - final _ret = _objc_msgSend_583( - _class_NSConnection, - _sel_rootProxyForConnectionWithRegisteredName_host_, - name.pointer, - hostName?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSDistantObject._(_ret, retain: true, release: true); - } - - static NSDistantObject? - rootProxyForConnectionWithRegisteredName_host_usingNameServer_( - NSString name, NSString? hostName, NSPortNameServer server) { - final _ret = _objc_msgSend_584( - _class_NSConnection, - _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_, - name.pointer, - hostName?.pointer ?? ffi.nullptr, - server.pointer); - return _ret.address == 0 - ? null - : NSDistantObject._(_ret, retain: true, release: true); - } - - static NSConnection? serviceConnectionWithName_rootObject_usingNameServer_( - NSString name, NSObject root, NSPortNameServer server) { - final _ret = _objc_msgSend_585( - _class_NSConnection, - _sel_serviceConnectionWithName_rootObject_usingNameServer_, - name.pointer, - root.pointer, - server.pointer); - return _ret.address == 0 - ? null - : NSConnection._(_ret, retain: true, release: true); - } - - static NSConnection? serviceConnectionWithName_rootObject_( - NSString name, NSObject root) { - final _ret = _objc_msgSend_586(_class_NSConnection, - _sel_serviceConnectionWithName_rootObject_, name.pointer, root.pointer); - return _ret.address == 0 - ? null - : NSConnection._(_ret, retain: true, release: true); - } - - double get requestTimeout { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_requestTimeout) - : _objc_msgSend_165(this.pointer, _sel_requestTimeout); - } - - set requestTimeout(double value) { - return _objc_msgSend_542(this.pointer, _sel_setRequestTimeout_, value); - } - - double get replyTimeout { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_replyTimeout) - : _objc_msgSend_165(this.pointer, _sel_replyTimeout); - } - - set replyTimeout(double value) { - return _objc_msgSend_542(this.pointer, _sel_setReplyTimeout_, value); - } - - NSObject? get rootObject { - final _ret = _objc_msgSend_17(this.pointer, _sel_rootObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set rootObject(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setRootObject_, value?.pointer ?? ffi.nullptr); - } - - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); - } - - bool get independentConversationQueueing { - return _objc_msgSend_12(this.pointer, _sel_independentConversationQueueing); - } - - set independentConversationQueueing(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setIndependentConversationQueueing_, value); - } - - bool get valid { - return _objc_msgSend_12(this.pointer, _sel_isValid); - } - - NSDistantObject get rootProxy { - final _ret = _objc_msgSend_587(this.pointer, _sel_rootProxy); - return NSDistantObject._(_ret, retain: true, release: true); - } - - void invalidate() { - _objc_msgSend_1(this.pointer, _sel_invalidate); - } - - void addRequestMode_(NSString rmode) { - _objc_msgSend_247(this.pointer, _sel_addRequestMode_, rmode.pointer); - } - - void removeRequestMode_(NSString rmode) { - _objc_msgSend_247(this.pointer, _sel_removeRequestMode_, rmode.pointer); - } - - NSArray get requestModes { - final _ret = _objc_msgSend_85(this.pointer, _sel_requestModes); - return NSArray._(_ret, retain: true, release: true); - } - - bool registerName_(NSString? name) { - return _objc_msgSend_588( - this.pointer, _sel_registerName_, name?.pointer ?? ffi.nullptr); - } - - bool registerName_withNameServer_(NSString? name, NSPortNameServer server) { - return _objc_msgSend_589(this.pointer, _sel_registerName_withNameServer_, - name?.pointer ?? ffi.nullptr, server.pointer); - } - - static NSConnection? connectionWithReceivePort_sendPort_( - NSPort? receivePort, NSPort? sendPort) { - final _ret = _objc_msgSend_590( - _class_NSConnection, - _sel_connectionWithReceivePort_sendPort_, - receivePort?.pointer ?? ffi.nullptr, - sendPort?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSConnection._(_ret, retain: true, release: true); - } - - static NSObject? currentConversation() { - final _ret = - _objc_msgSend_17(_class_NSConnection, _sel_currentConversation); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSConnection? initWithReceivePort_sendPort_( - NSPort? receivePort, NSPort? sendPort) { - final _ret = _objc_msgSend_590( - this.pointer, - _sel_initWithReceivePort_sendPort_, - receivePort?.pointer ?? ffi.nullptr, - sendPort?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSConnection._(_ret, retain: true, release: true); - } - - NSPort get sendPort { - final _ret = _objc_msgSend_553(this.pointer, _sel_sendPort); - return NSPort._(_ret, retain: true, release: true); - } - - NSPort get receivePort { - final _ret = _objc_msgSend_553(this.pointer, _sel_receivePort); - return NSPort._(_ret, retain: true, release: true); - } - - void enableMultipleThreads() { - _objc_msgSend_1(this.pointer, _sel_enableMultipleThreads); - } - - bool get multipleThreadsEnabled { - return _objc_msgSend_12(this.pointer, _sel_multipleThreadsEnabled); - } - - void addRunLoop_(NSRunLoop runloop) { - _objc_msgSend_591(this.pointer, _sel_addRunLoop_, runloop.pointer); - } - - void removeRunLoop_(NSRunLoop runloop) { - _objc_msgSend_591(this.pointer, _sel_removeRunLoop_, runloop.pointer); - } - - void runInNewThread() { - _objc_msgSend_1(this.pointer, _sel_runInNewThread); - } - - NSArray get remoteObjects { - final _ret = _objc_msgSend_85(this.pointer, _sel_remoteObjects); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get localObjects { - final _ret = _objc_msgSend_85(this.pointer, _sel_localObjects); - return NSArray._(_ret, retain: true, release: true); - } - - void dispatchWithComponents_(NSArray components) { - _objc_msgSend_472( - this.pointer, _sel_dispatchWithComponents_, components.pointer); - } - - @override - NSConnection init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSConnection._(_ret, retain: true, release: true); - } - - static NSConnection new1() { - final _ret = _objc_msgSend_2(_class_NSConnection, _sel_new); - return NSConnection._(_ret, retain: false, release: true); - } - - static NSConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSConnection, _sel_allocWithZone_, zone); - return NSConnection._(_ret, retain: false, release: true); - } - - static NSConnection alloc() { - final _ret = _objc_msgSend_2(_class_NSConnection, _sel_alloc); - return NSConnection._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSConnection, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSConnection, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSConnection, _sel_accessInstanceVariablesDirectly); - } + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_ = + objc.registerName( + "initWithContentsOfMarkdownFileAtURL:options:baseURL:error:"); +final _objc_msgSend_53 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithMarkdown_options_baseURL_error_ = + objc.registerName("initWithMarkdown:options:baseURL:error:"); +final _objc_msgSend_54 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithMarkdownString_options_baseURL_error_ = + objc.registerName("initWithMarkdownString:options:baseURL:error:"); +final _objc_msgSend_55 = 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>)>(); - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSConnection, _sel_useStoredAccessor); - } +abstract class NSAttributedStringFormattingOptions { + static const int + NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging = 1; + static const int NSAttributedStringFormattingApplyReplacementIndexAttribute = + 2; +} - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSConnection, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } +late final _sel_initWithFormat_options_locale_ = + objc.registerName("initWithFormat:options:locale:"); +final _objc_msgSend_56 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSConnection, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } +final class __va_list_tag extends ffi.Struct { + @ffi.UnsignedInt() + external int gp_offset; - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSConnection, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } + @ffi.UnsignedInt() + external int fp_offset; - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSConnection, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } + external ffi.Pointer overflow_arg_area; - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSConnection, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } + external ffi.Pointer reg_save_area; } -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_572 = objc.msgSendPointer +late final _sel_initWithFormat_options_locale_arguments_ = + objc.registerName("initWithFormat:options:locale:arguments:"); +final _objc_msgSend_57 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); +late final _sel_localizedAttributedStringWithFormat_ = + objc.registerName("localizedAttributedStringWithFormat:"); +late final _sel_localizedAttributedStringWithFormat_options_ = + objc.registerName("localizedAttributedStringWithFormat:options:"); +final _objc_msgSend_58 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .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_59 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithFormat_options_locale_context_arguments_ = + objc.registerName("initWithFormat:options:locale:context:arguments:"); +final _objc_msgSend_60 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); +late final _sel_localizedAttributedStringWithFormat_context_ = + objc.registerName("localizedAttributedStringWithFormat:context:"); +final _objc_msgSend_61 = 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_62 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_attributedStringByInflectingString = + objc.registerName("attributedStringByInflectingString"); +final _objc_msgSend_63 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -26564,162 +2475,27 @@ final _objc_msgSend_572 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_connectionWithRegisteredName_host_ = - objc.registerName("connectionWithRegisteredName:host:"); -final _objc_msgSend_573 = objc.msgSendPointer +late final _sel_localizedAttributedStringForKey_value_table_ = + objc.registerName("localizedAttributedStringForKey:value:table:"); +final _objc_msgSend_64 = 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)>(); - -class NSPortNameServer extends NSObject { - NSPortNameServer._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSPortNameServer] that points to the same underlying object as [other]. - static NSPortNameServer castFrom(T other) { - return NSPortNameServer._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSPortNameServer] that wraps the given raw object pointer. - static NSPortNameServer castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPortNameServer._(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); - } - - static NSPortNameServer systemDefaultPortNameServer() { - final _ret = _objc_msgSend_574( - _class_NSPortNameServer, _sel_systemDefaultPortNameServer); - return NSPortNameServer._(_ret, retain: true, release: true); - } - - NSPort? portForName_(NSString name) { - final _ret = - _objc_msgSend_575(this.pointer, _sel_portForName_, name.pointer); - return _ret.address == 0 - ? null - : NSPort._(_ret, retain: true, release: true); - } - - NSPort? portForName_host_(NSString name, NSString? host) { - final _ret = _objc_msgSend_576(this.pointer, _sel_portForName_host_, - name.pointer, host?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSPort._(_ret, retain: true, release: true); - } - - bool registerPort_name_(NSPort port, NSString name) { - return _objc_msgSend_577( - this.pointer, _sel_registerPort_name_, port.pointer, name.pointer); - } - - bool removePortForName_(NSString name) { - return _objc_msgSend_64( - this.pointer, _sel_removePortForName_, name.pointer); - } - - @override - NSPortNameServer init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSPortNameServer._(_ret, retain: true, release: true); - } - - static NSPortNameServer new1() { - final _ret = _objc_msgSend_2(_class_NSPortNameServer, _sel_new); - return NSPortNameServer._(_ret, retain: false, release: true); - } - - static NSPortNameServer allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSPortNameServer, _sel_allocWithZone_, zone); - return NSPortNameServer._(_ret, retain: false, release: true); - } - - static NSPortNameServer alloc() { - final _ret = _objc_msgSend_2(_class_NSPortNameServer, _sel_alloc); - return NSPortNameServer._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSPortNameServer, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSPortNameServer, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSPortNameServer, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSPortNameServer, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSPortNameServer, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSPortNameServer, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSPortNameServer, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSPortNameServer, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSPortNameServer, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSPortNameServer = objc.getClass("NSPortNameServer"); -late final _sel_systemDefaultPortNameServer = - objc.registerName("systemDefaultPortNameServer"); -final _objc_msgSend_574 = objc.msgSendPointer +late final _sel_bundleIdentifier = objc.registerName("bundleIdentifier"); +late final _sel_infoDictionary = objc.registerName("infoDictionary"); +final _objc_msgSend_65 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -26727,8 +2503,28 @@ final _objc_msgSend_574 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_portForName_ = objc.registerName("portForName:"); -final _objc_msgSend_575 = objc.msgSendPointer +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_66 = 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_67 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -26738,8 +2534,9 @@ final _objc_msgSend_575 = objc.msgSendPointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_portForName_host_ = objc.registerName("portForName:host:"); -final _objc_msgSend_576 = objc.msgSendPointer +late final _sel_preferredLocalizationsFromArray_forPreferences_ = + objc.registerName("preferredLocalizationsFromArray:forPreferences:"); +final _objc_msgSend_68 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -26753,450 +2550,554 @@ final _objc_msgSend_576 = objc.msgSendPointer ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_registerPort_name_ = objc.registerName("registerPort:name:"); -final _objc_msgSend_577 = objc.msgSendPointer +late final _sel_executableArchitectures = + objc.registerName("executableArchitectures"); +final _objc_msgSend_69 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + 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_70 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Double, ffi.Pointer)>>() .asFunction< - bool Function( + void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + double, ffi.Pointer)>(); -late final _sel_removePortForName_ = objc.registerName("removePortForName:"); -late final _sel_connectionWithRegisteredName_host_usingNameServer_ = - objc.registerName("connectionWithRegisteredName:host:usingNameServer:"); -final _objc_msgSend_578 = objc.msgSendPointer +late final _sel_preservationPriorityForTag_ = + objc.registerName("preservationPriorityForTag:"); +final _objc_msgSend_71 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Double Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_71Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -class NSDistantObject extends NSProxy { - NSDistantObject._(ffi.Pointer pointer, +class NSMutableAttributedString extends NSAttributedString { + NSMutableAttributedString._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSDistantObject] that points to the same underlying object as [other]. - static NSDistantObject castFrom(T other) { - return NSDistantObject._(other.pointer, 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); - /// Returns a [NSDistantObject] that wraps the given raw object pointer. - static NSDistantObject castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDistantObject._(other, retain: retain, release: release); - } + /// Constructs a [NSMutableAttributedString] that wraps the given raw object pointer. + NSMutableAttributedString.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSDistantObject]. + /// Returns whether [obj] is an instance of [NSMutableAttributedString]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSDistantObject); + obj.pointer, _sel_isKindOfClass_, _class_NSMutableAttributedString); } - static NSObject? proxyWithTarget_connection_( - NSObject target, NSConnection connection) { - final _ret = _objc_msgSend_580(_class_NSDistantObject, - _sel_proxyWithTarget_connection_, target.pointer, connection.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + void replaceCharactersInRange_withString_(_NSRange range, objc.NSString str) { + _objc_msgSend_72(this.pointer, _sel_replaceCharactersInRange_withString_, + range, str.pointer); } - NSDistantObject? initWithTarget_connection_( - NSObject target, NSConnection connection) { - final _ret = _objc_msgSend_580(this.pointer, - _sel_initWithTarget_connection_, target.pointer, connection.pointer); + void setAttributes_range_(objc.NSDictionary? attrs, _NSRange range) { + _objc_msgSend_73(this.pointer, _sel_setAttributes_range_, + attrs?.pointer ?? ffi.nullptr, range); + } + + objc.NSMutableString get mutableString { + final _ret = _objc_msgSend_74(this.pointer, _sel_mutableString); + return objc.NSMutableString.castFromPointer(_ret, + retain: true, release: true); + } + + void addAttribute_value_range_( + objc.NSString name, objc.NSObject value, _NSRange range) { + _objc_msgSend_75(this.pointer, _sel_addAttribute_value_range_, name.pointer, + value.pointer, range); + } + + void addAttributes_range_(objc.NSDictionary attrs, _NSRange range) { + _objc_msgSend_76( + this.pointer, _sel_addAttributes_range_, attrs.pointer, range); + } + + void removeAttribute_range_(objc.NSString name, _NSRange range) { + _objc_msgSend_77( + this.pointer, _sel_removeAttribute_range_, name.pointer, range); + } + + void replaceCharactersInRange_withAttributedString_( + _NSRange range, NSAttributedString attrString) { + _objc_msgSend_78( + this.pointer, + _sel_replaceCharactersInRange_withAttributedString_, + range, + attrString.pointer); + } + + void insertAttributedString_atIndex_(NSAttributedString attrString, int loc) { + _objc_msgSend_79(this.pointer, _sel_insertAttributedString_atIndex_, + attrString.pointer, loc); + } + + void appendAttributedString_(NSAttributedString attrString) { + _objc_msgSend_80( + this.pointer, _sel_appendAttributedString_, attrString.pointer); + } + + void deleteCharactersInRange_(_NSRange range) { + _objc_msgSend_81(this.pointer, _sel_deleteCharactersInRange_, range); + } + + void setAttributedString_(NSAttributedString attrString) { + _objc_msgSend_80( + this.pointer, _sel_setAttributedString_, attrString.pointer); + } + + void beginEditing() { + _objc_msgSend_82(this.pointer, _sel_beginEditing); + } + + void endEditing() { + _objc_msgSend_82(this.pointer, _sel_endEditing); + } + + void appendLocalizedFormat_(NSAttributedString format) { + _objc_msgSend_80(this.pointer, _sel_appendLocalizedFormat_, format.pointer); + } + + @override + NSMutableAttributedString initWithString_(objc.NSString str) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithString_, str.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableAttributedString initWithString_attributes_( + objc.NSString str, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_36(this.pointer, _sel_initWithString_attributes_, + str.pointer, attrs?.pointer ?? ffi.nullptr); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableAttributedString initWithAttributedString_( + NSAttributedString attrStr) { + final _ret = _objc_msgSend_37( + this.pointer, _sel_initWithAttributedString_, attrStr.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableAttributedString? + initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( + objc.NSURL markdownFile, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_53( + this.pointer, + _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, + markdownFile.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); return _ret.address == 0 ? null - : NSDistantObject._(_ret, retain: true, release: true); - } - - static NSObject proxyWithLocal_connection_( - NSObject target, NSConnection connection) { - final _ret = _objc_msgSend_581(_class_NSDistantObject, - _sel_proxyWithLocal_connection_, target.pointer, connection.pointer); - return NSObject._(_ret, retain: true, release: true); + : NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSDistantObject initWithLocal_connection_( - NSObject target, NSConnection connection) { - final _ret = _objc_msgSend_581(this.pointer, _sel_initWithLocal_connection_, - target.pointer, connection.pointer); - return NSDistantObject._(_ret, retain: true, release: true); + @override + NSMutableAttributedString? initWithMarkdown_options_baseURL_error_( + objc.NSData markdown, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_54( + 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); } - NSDistantObject? initWithCoder_(NSCoder inCoder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, inCoder.pointer); + @override + NSMutableAttributedString? initWithMarkdownString_options_baseURL_error_( + objc.NSString markdownString, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_55( + this.pointer, + _sel_initWithMarkdownString_options_baseURL_error_, + markdownString.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); return _ret.address == 0 ? null - : NSDistantObject._(_ret, retain: true, release: true); + : NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - void setProtocolForProxy_(Protocol? proto) { - _objc_msgSend_582( - this.pointer, _sel_setProtocolForProxy_, proto?.pointer ?? ffi.nullptr); + @override + NSMutableAttributedString initWithFormat_options_locale_( + NSAttributedString format, int options, objc.NSLocale? locale) { + final _ret = _objc_msgSend_56( + this.pointer, + _sel_initWithFormat_options_locale_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSConnection get connectionForProxy { - final _ret = _objc_msgSend_572(this.pointer, _sel_connectionForProxy); - return NSConnection._(_ret, retain: true, release: true); + @override + NSMutableAttributedString initWithFormat_options_locale_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_57( + this.pointer, + _sel_initWithFormat_options_locale_arguments_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + arguments); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSObject alloc() { - final _ret = _objc_msgSend_2(_class_NSDistantObject, _sel_alloc); - return NSObject._(_ret, retain: false, release: true); + static NSMutableAttributedString localizedAttributedStringWithFormat_( + NSAttributedString format) { + final _ret = _objc_msgSend_37(_class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_, format.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static bool respondsToSelector_(ffi.Pointer aSelector) { - return _objc_msgSend_4( - _class_NSDistantObject, _sel_respondsToSelector_, aSelector); + static NSMutableAttributedString localizedAttributedStringWithFormat_options_( + NSAttributedString format, int options) { + final _ret = _objc_msgSend_58( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_options_, + format.pointer, + options); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } -} -late final _class_NSDistantObject = objc.getClass("NSDistantObject"); + @override + NSMutableAttributedString initWithFormat_options_locale_context_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context) { + final _ret = _objc_msgSend_59( + this.pointer, + _sel_initWithFormat_options_locale_context_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + context.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); + } -class NSProxy extends objc.ObjCObjectBase { - NSProxy._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super(pointer, retain: retain, release: release); + @override + NSMutableAttributedString initWithFormat_options_locale_context_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_60( + this.pointer, + _sel_initWithFormat_options_locale_context_arguments_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + context.pointer, + arguments); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); + } - /// Returns a [NSProxy] that points to the same underlying object as [other]. - static NSProxy castFrom(T other) { - return NSProxy._(other.pointer, retain: true, release: true); + static NSMutableAttributedString localizedAttributedStringWithFormat_context_( + NSAttributedString format, objc.NSDictionary context) { + final _ret = _objc_msgSend_61( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_context_, + format.pointer, + context.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - /// Returns a [NSProxy] that wraps the given raw object pointer. - static NSProxy castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProxy._(other, retain: retain, release: release); + static NSMutableAttributedString + localizedAttributedStringWithFormat_options_context_( + NSAttributedString format, int options, objc.NSDictionary context) { + final _ret = _objc_msgSend_62( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_options_context_, + format.pointer, + options, + context.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSProxy]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSProxy); + @override + NSMutableAttributedString init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSObject alloc() { - final _ret = _objc_msgSend_2(_class_NSProxy, _sel_alloc); - return NSObject._(_ret, retain: false, release: true); + static NSMutableAttributedString new1() { + final _ret = _objc_msgSend_40(_class_NSMutableAttributedString, _sel_new); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - static NSObject allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSProxy, _sel_allocWithZone_, zone); - return NSObject._(_ret, retain: false, release: true); + static NSMutableAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSMutableAttributedString, _sel_allocWithZone_, zone); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - static NSObject class1() { - final _ret = _objc_msgSend_2(_class_NSProxy, _sel_class); - return NSObject._(_ret, retain: true, release: true); + static NSMutableAttributedString alloc() { + final _ret = _objc_msgSend_40(_class_NSMutableAttributedString, _sel_alloc); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - void forwardInvocation_(NSInvocation invocation) { - _objc_msgSend_421( - this.pointer, _sel_forwardInvocation_, invocation.pointer); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMutableAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSMethodSignature? methodSignatureForSelector_( - ffi.Pointer sel) { - final _ret = - _objc_msgSend_579(this.pointer, _sel_methodSignatureForSelector_, sel); - return _ret.address == 0 - ? null - : NSMethodSignature._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMutableAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - void dealloc() { - _objc_msgSend_1(this.pointer, _sel_dealloc); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSMutableAttributedString, _sel_accessInstanceVariablesDirectly); } - void finalize() { - _objc_msgSend_1(this.pointer, _sel_finalize); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSMutableAttributedString, _sel_useStoredAccessor); } - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMutableAttributedString, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSString get debugDescription { - final _ret = _objc_msgSend_21(this.pointer, _sel_debugDescription); - return NSString._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMutableAttributedString, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static bool respondsToSelector_(ffi.Pointer aSelector) { - return _objc_msgSend_4(_class_NSProxy, _sel_respondsToSelector_, aSelector); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMutableAttributedString, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - bool allowsWeakReference() { - return _objc_msgSend_12(this.pointer, _sel_allowsWeakReference); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMutableAttributedString, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool retainWeakReference() { - return _objc_msgSend_12(this.pointer, _sel_retainWeakReference); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMutableAttributedString, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSProxy = objc.getClass("NSProxy"); -final _objc_msgSend_579 = 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_respondsToSelector_ = objc.registerName("respondsToSelector:"); -late final _sel_proxyWithTarget_connection_ = - objc.registerName("proxyWithTarget:connection:"); -final _objc_msgSend_580 = 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_initWithTarget_connection_ = - objc.registerName("initWithTarget:connection:"); -late final _sel_proxyWithLocal_connection_ = - objc.registerName("proxyWithLocal:connection:"); -final _objc_msgSend_581 = objc.msgSendPointer +late final _class_NSMutableAttributedString = + objc.getClass("NSMutableAttributedString"); +late final _sel_replaceCharactersInRange_withString_ = + objc.registerName("replaceCharactersInRange:withString:"); +final _objc_msgSend_72 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + _NSRange, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + _NSRange, ffi.Pointer)>(); -late final _sel_initWithLocal_connection_ = - objc.registerName("initWithLocal:connection:"); -late final _sel_setProtocolForProxy_ = - objc.registerName("setProtocolForProxy:"); -final _objc_msgSend_582 = objc.msgSendPointer +late final _sel_setAttributes_range_ = + objc.registerName("setAttributes:range:"); +final _objc_msgSend_73 = 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_connectionForProxy = objc.registerName("connectionForProxy"); -late final _sel_rootProxyForConnectionWithRegisteredName_host_ = - objc.registerName("rootProxyForConnectionWithRegisteredName:host:"); -final _objc_msgSend_583 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + _NSRange)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_ = - objc.registerName( - "rootProxyForConnectionWithRegisteredName:host:usingNameServer:"); -final _objc_msgSend_584 = objc.msgSendPointer + _NSRange)>(); +late final _sel_mutableString = objc.registerName("mutableString"); +final _objc_msgSend_74 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_serviceConnectionWithName_rootObject_usingNameServer_ = - objc.registerName("serviceConnectionWithName:rootObject:usingNameServer:"); -final _objc_msgSend_585 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_addAttribute_value_range_ = + objc.registerName("addAttribute:value:range:"); +final _objc_msgSend_75 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + _NSRange)>>() .asFunction< - instancetype Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_serviceConnectionWithName_rootObject_ = - objc.registerName("serviceConnectionWithName:rootObject:"); -final _objc_msgSend_586 = objc.msgSendPointer + _NSRange)>(); +late final _sel_addAttributes_range_ = + objc.registerName("addAttributes:range:"); +final _objc_msgSend_76 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + _NSRange)>>() .asFunction< - instancetype Function( + void 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_587 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer 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_588 = 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_registerName_withNameServer_ = - objc.registerName("registerName:withNameServer:"); -final _objc_msgSend_589 = objc.msgSendPointer + _NSRange)>(); +late final _sel_removeAttribute_range_ = + objc.registerName("removeAttribute:range:"); +final _objc_msgSend_77 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + _NSRange)>>() .asFunction< - bool Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_connectionWithReceivePort_sendPort_ = - objc.registerName("connectionWithReceivePort:sendPort:"); -final _objc_msgSend_590 = objc.msgSendPointer + _NSRange)>(); +late final _sel_replaceCharactersInRange_withAttributedString_ = + objc.registerName("replaceCharactersInRange:withAttributedString:"); +final _objc_msgSend_78 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + _NSRange, ffi.Pointer)>>() .asFunction< - instancetype Function( + void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + _NSRange, 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_591 = 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:"); -late final _sel_addConnection_toRunLoop_forMode_ = - objc.registerName("addConnection:toRunLoop:forMode:"); -final _objc_msgSend_592 = objc.msgSendPointer +late final _sel_insertAttributedString_atIndex_ = + objc.registerName("insertAttributedString:atIndex:"); +final _objc_msgSend_79 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong)>>() .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_encodePortObject_ = objc.registerName("encodePortObject:"); -final _objc_msgSend_593 = objc.msgSendPointer + int)>(); +late final _sel_appendAttributedString_ = + objc.registerName("appendAttributedString:"); +final _objc_msgSend_80 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -27206,1116 +3107,1386 @@ final _objc_msgSend_593 = objc.msgSendPointer .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_decodePortObject = objc.registerName("decodePortObject"); -final _objc_msgSend_594 = objc.msgSendPointer +late final _sel_deleteCharactersInRange_ = + objc.registerName("deleteCharactersInRange:"); +final _objc_msgSend_81 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_connection = objc.registerName("connection"); -final _objc_msgSend_595 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_setAttributedString_ = + objc.registerName("setAttributedString:"); +late final _sel_beginEditing = objc.registerName("beginEditing"); +final _objc_msgSend_82 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Void Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_portCoderWithReceivePort_sendPort_components_ = - objc.registerName("portCoderWithReceivePort:sendPort:components:"); -final _objc_msgSend_596 = 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_initWithReceivePort_sendPort_components_ = - objc.registerName("initWithReceivePort:sendPort:components:"); -late final _sel_dispatch = objc.registerName("dispatch"); -late final _sel_replacementObjectForPortCoder_ = - objc.registerName("replacementObjectForPortCoder:"); -final _objc_msgSend_597 = 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_endEditing = objc.registerName("endEditing"); +late final _sel_appendLocalizedFormat_ = + objc.registerName("appendLocalizedFormat:"); + +class NSDateFormatter extends NSFormatter { + NSDateFormatter._(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 [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 [NSDateFormatter]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSDateFormatter); + } + + int get formattingContext { + return _objc_msgSend_89(this.pointer, _sel_formattingContext); + } + + set formattingContext(int value) { + return _objc_msgSend_90(this.pointer, _sel_setFormattingContext_, value); + } + + bool getObjectValue_forString_range_error_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer<_NSRange> rangep, + ffi.Pointer> error) { + return _objc_msgSend_91( + this.pointer, + _sel_getObjectValue_forString_range_error_, + obj, + string.pointer, + rangep, + error); + } + + objc.NSString stringFromDate_(objc.NSDate date) { + final _ret = + _objc_msgSend_92(this.pointer, _sel_stringFromDate_, date.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSDate? dateFromString_(objc.NSString string) { + final _ret = + _objc_msgSend_93(this.pointer, _sel_dateFromString_, string.pointer); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSString localizedStringFromDate_dateStyle_timeStyle_( + objc.NSDate date, int dstyle, int tstyle) { + final _ret = _objc_msgSend_94( + _class_NSDateFormatter, + _sel_localizedStringFromDate_dateStyle_timeStyle_, + date.pointer, + dstyle, + tstyle); + return 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_95( + _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); + } + + static int getDefaultFormatterBehavior() { + return _objc_msgSend_96( + _class_NSDateFormatter, _sel_defaultFormatterBehavior); + } + + static void setDefaultFormatterBehavior(int value) { + return _objc_msgSend_97( + _class_NSDateFormatter, _sel_setDefaultFormatterBehavior_, value); + } + + void setLocalizedDateFormatFromTemplate_(objc.NSString dateFormatTemplate) { + _objc_msgSend_98(this.pointer, _sel_setLocalizedDateFormatFromTemplate_, + dateFormatTemplate.pointer); + } + + objc.NSString get dateFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_dateFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set dateFormat(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setDateFormat_, value.pointer); + } + + int get dateStyle { + return _objc_msgSend_100(this.pointer, _sel_dateStyle); + } + + set dateStyle(int value) { + return _objc_msgSend_101(this.pointer, _sel_setDateStyle_, value); + } -class NSClassDescription extends NSObject { - NSClassDescription._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + int get timeStyle { + return _objc_msgSend_100(this.pointer, _sel_timeStyle); + } - /// Returns a [NSClassDescription] that points to the same underlying object as [other]. - static NSClassDescription castFrom(T other) { - return NSClassDescription._(other.pointer, retain: true, release: true); + set timeStyle(int value) { + return _objc_msgSend_101(this.pointer, _sel_setTimeStyle_, value); } - /// Returns a [NSClassDescription] that wraps the given raw object pointer. - static NSClassDescription castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSClassDescription._(other, retain: retain, release: release); + objc.NSLocale get locale { + final _ret = _objc_msgSend_102(this.pointer, _sel_locale); + return objc.NSLocale.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSClassDescription]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSClassDescription); + set locale(objc.NSLocale value) { + return _objc_msgSend_103(this.pointer, _sel_setLocale_, value.pointer); } - static void registerClassDescription_forClass_( - NSClassDescription description, NSObject aClass) { - _objc_msgSend_598( - _class_NSClassDescription, - _sel_registerClassDescription_forClass_, - description.pointer, - aClass.pointer); + bool get generatesCalendarDates { + return _objc_msgSend_7(this.pointer, _sel_generatesCalendarDates); } - static void invalidateClassDescriptionCache() { - _objc_msgSend_1( - _class_NSClassDescription, _sel_invalidateClassDescriptionCache); + set generatesCalendarDates(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setGeneratesCalendarDates_, value); } - static NSClassDescription? classDescriptionForClass_(NSObject aClass) { - final _ret = _objc_msgSend_599(_class_NSClassDescription, - _sel_classDescriptionForClass_, aClass.pointer); - return _ret.address == 0 - ? null - : NSClassDescription._(_ret, retain: true, release: true); + int get formatterBehavior { + return _objc_msgSend_96(this.pointer, _sel_formatterBehavior); } - @override - NSArray get attributeKeys { - final _ret = _objc_msgSend_85(this.pointer, _sel_attributeKeys); - return NSArray._(_ret, retain: true, release: true); + set formatterBehavior(int value) { + return _objc_msgSend_97(this.pointer, _sel_setFormatterBehavior_, value); } - @override - NSArray get toOneRelationshipKeys { - final _ret = _objc_msgSend_85(this.pointer, _sel_toOneRelationshipKeys); - return NSArray._(_ret, retain: true, release: true); + NSTimeZone get timeZone { + final _ret = _objc_msgSend_110(this.pointer, _sel_timeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - @override - NSArray get toManyRelationshipKeys { - final _ret = _objc_msgSend_85(this.pointer, _sel_toManyRelationshipKeys); - return NSArray._(_ret, retain: true, release: true); + set timeZone(NSTimeZone value) { + return _objc_msgSend_111(this.pointer, _sel_setTimeZone_, value.pointer); } - @override - NSString? inverseForRelationshipKey_(NSString relationshipKey) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_inverseForRelationshipKey_, relationshipKey.pointer); + NSCalendar get calendar { + final _ret = _objc_msgSend_121(this.pointer, _sel_calendar); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); + } + + set calendar(NSCalendar value) { + return _objc_msgSend_161(this.pointer, _sel_setCalendar_, value.pointer); + } + + bool get lenient { + return _objc_msgSend_7(this.pointer, _sel_isLenient); + } + + set lenient(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLenient_, value); + } + + objc.NSDate? get twoDigitStartDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_twoDigitStartDate); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - @override - NSClassDescription init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSClassDescription._(_ret, retain: true, release: true); + set twoDigitStartDate(objc.NSDate? value) { + return _objc_msgSend_162(this.pointer, _sel_setTwoDigitStartDate_, + value?.pointer ?? ffi.nullptr); } - static NSClassDescription new1() { - final _ret = _objc_msgSend_2(_class_NSClassDescription, _sel_new); - return NSClassDescription._(_ret, retain: false, release: true); + objc.NSDate? get defaultDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_defaultDate); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static NSClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSClassDescription, _sel_allocWithZone_, zone); - return NSClassDescription._(_ret, retain: false, release: true); + set defaultDate(objc.NSDate? value) { + return _objc_msgSend_162( + this.pointer, _sel_setDefaultDate_, value?.pointer ?? ffi.nullptr); } - static NSClassDescription alloc() { - final _ret = _objc_msgSend_2(_class_NSClassDescription, _sel_alloc); - return NSClassDescription._(_ret, retain: false, release: true); + objc.NSArray get eraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_eraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSClassDescription, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + set eraSymbols(objc.NSArray value) { + return _objc_msgSend_163(this.pointer, _sel_setEraSymbols_, value.pointer); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSClassDescription, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + objc.NSArray get monthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_monthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSClassDescription, _sel_accessInstanceVariablesDirectly); + set monthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setMonthSymbols_, value.pointer); } - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSClassDescription, _sel_useStoredAccessor); + objc.NSArray get shortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSClassDescription, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + set shortMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortMonthSymbols_, value.pointer); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSClassDescription, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + objc.NSArray get weekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_weekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSClassDescription, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + set weekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setWeekdaySymbols_, value.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSClassDescription, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + objc.NSArray get shortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSClassDescription, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + set shortWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortWeekdaySymbols_, value.pointer); } -} -late final _class_NSClassDescription = objc.getClass("NSClassDescription"); -late final _sel_registerClassDescription_forClass_ = - objc.registerName("registerClassDescription:forClass:"); -final _objc_msgSend_598 = 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"); -late final _sel_classDescriptionForClass_ = - objc.registerName("classDescriptionForClass:"); -final _objc_msgSend_599 = 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:"); -late final _sel_classDescription = objc.registerName("classDescription"); -final _objc_msgSend_600 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + objc.NSString get AMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_AMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -class NSScriptObjectSpecifier extends NSObject { - NSScriptObjectSpecifier._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + set AMSymbol(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setAMSymbol_, value.pointer); + } - /// Returns a [NSScriptObjectSpecifier] that points to the same underlying object as [other]. - static NSScriptObjectSpecifier castFrom( - T other) { - return NSScriptObjectSpecifier._(other.pointer, - retain: true, release: true); + objc.NSString get PMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_PMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSScriptObjectSpecifier] that wraps the given raw object pointer. - static NSScriptObjectSpecifier castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSScriptObjectSpecifier._(other, retain: retain, release: release); + set PMSymbol(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setPMSymbol_, value.pointer); } - /// Returns whether [obj] is an instance of [NSScriptObjectSpecifier]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSScriptObjectSpecifier); + objc.NSArray get longEraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_longEraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSScriptObjectSpecifier? objectSpecifierWithDescriptor_( - NSAppleEventDescriptor descriptor) { - final _ret = _objc_msgSend_624(_class_NSScriptObjectSpecifier, - _sel_objectSpecifierWithDescriptor_, descriptor.pointer); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, retain: true, release: true); + set longEraSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setLongEraSymbols_, value.pointer); } - NSScriptObjectSpecifier initWithContainerSpecifier_key_( - NSScriptObjectSpecifier container, NSString property) { - final _ret = _objc_msgSend_625( - this.pointer, - _sel_initWithContainerSpecifier_key_, - container.pointer, - property.pointer); - return NSScriptObjectSpecifier._(_ret, retain: true, release: true); + objc.NSArray get veryShortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSScriptObjectSpecifier - initWithContainerClassDescription_containerSpecifier_key_( - NSScriptClassDescription classDesc, - NSScriptObjectSpecifier? container, - NSString property) { - final _ret = _objc_msgSend_645( - this.pointer, - _sel_initWithContainerClassDescription_containerSpecifier_key_, - classDesc.pointer, - container?.pointer ?? ffi.nullptr, - property.pointer); - return NSScriptObjectSpecifier._(_ret, retain: true, release: true); + set veryShortMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setVeryShortMonthSymbols_, value.pointer); + } + + objc.NSArray get standaloneMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + set standaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setStandaloneMonthSymbols_, value.pointer); } - NSScriptObjectSpecifier? initWithCoder_(NSCoder inCoder) { + objc.NSArray get shortStandaloneMonthSymbols { final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, inCoder.pointer); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, retain: true, release: true); + _objc_msgSend_6(this.pointer, _sel_shortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSScriptObjectSpecifier? get childSpecifier { - final _ret = _objc_msgSend_632(this.pointer, _sel_childSpecifier); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, retain: true, release: true); + set shortStandaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortStandaloneMonthSymbols_, value.pointer); } - set childSpecifier(NSScriptObjectSpecifier? value) { - return _objc_msgSend_633( - this.pointer, _sel_setChildSpecifier_, value?.pointer ?? ffi.nullptr); + objc.NSArray get veryShortStandaloneMonthSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSScriptObjectSpecifier? get containerSpecifier { - final _ret = _objc_msgSend_632(this.pointer, _sel_containerSpecifier); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, retain: true, release: true); + set veryShortStandaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setVeryShortStandaloneMonthSymbols_, value.pointer); } - set containerSpecifier(NSScriptObjectSpecifier? value) { - return _objc_msgSend_633(this.pointer, _sel_setContainerSpecifier_, - value?.pointer ?? ffi.nullptr); + objc.NSArray get veryShortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool get containerIsObjectBeingTested { - return _objc_msgSend_12(this.pointer, _sel_containerIsObjectBeingTested); + set veryShortWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setVeryShortWeekdaySymbols_, value.pointer); } - set containerIsObjectBeingTested(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setContainerIsObjectBeingTested_, value); + objc.NSArray get standaloneWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool get containerIsRangeContainerObject { - return _objc_msgSend_12(this.pointer, _sel_containerIsRangeContainerObject); + set standaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setStandaloneWeekdaySymbols_, value.pointer); } - set containerIsRangeContainerObject(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setContainerIsRangeContainerObject_, value); + objc.NSArray get shortStandaloneWeekdaySymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get key { - final _ret = _objc_msgSend_21(this.pointer, _sel_key); - return NSString._(_ret, retain: true, release: true); + set shortStandaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortStandaloneWeekdaySymbols_, value.pointer); } - set key(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setKey_, value.pointer); + objc.NSArray get veryShortStandaloneWeekdaySymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSScriptClassDescription? get containerClassDescription { + set veryShortStandaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163(this.pointer, + _sel_setVeryShortStandaloneWeekdaySymbols_, value.pointer); + } + + objc.NSArray get quarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_quarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + set quarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setQuarterSymbols_, value.pointer); + } + + objc.NSArray get shortQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + set shortQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortQuarterSymbols_, value.pointer); + } + + objc.NSArray get standaloneQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + set standaloneQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setStandaloneQuarterSymbols_, value.pointer); + } + + objc.NSArray get shortStandaloneQuarterSymbols { final _ret = - _objc_msgSend_628(this.pointer, _sel_containerClassDescription); + _objc_msgSend_6(this.pointer, _sel_shortStandaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + set shortStandaloneQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortStandaloneQuarterSymbols_, value.pointer); + } + + objc.NSDate? get gregorianStartDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_gregorianStartDate); return _ret.address == 0 ? null - : NSScriptClassDescription._(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set containerClassDescription(NSScriptClassDescription? value) { - return _objc_msgSend_647(this.pointer, _sel_setContainerClassDescription_, + set gregorianStartDate(objc.NSDate? value) { + return _objc_msgSend_162(this.pointer, _sel_setGregorianStartDate_, value?.pointer ?? ffi.nullptr); } - NSScriptClassDescription? get keyClassDescription { - final _ret = _objc_msgSend_628(this.pointer, _sel_keyClassDescription); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, retain: true, release: true); + bool get doesRelativeDateFormatting { + return _objc_msgSend_7(this.pointer, _sel_doesRelativeDateFormatting); } - ffi.Pointer indicesOfObjectsByEvaluatingWithContainer_count_( - NSObject container, ffi.Pointer count) { - return _objc_msgSend_648( - this.pointer, - _sel_indicesOfObjectsByEvaluatingWithContainer_count_, - container.pointer, - count); + set doesRelativeDateFormatting(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setDoesRelativeDateFormatting_, value); } - NSObject? objectsByEvaluatingWithContainers_(NSObject containers) { - final _ret = _objc_msgSend_16(this.pointer, - _sel_objectsByEvaluatingWithContainers_, containers.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + objc.NSObject initWithDateFormat_allowNaturalLanguage_( + objc.NSString format, bool flag) { + final _ret = _objc_msgSend_164(this.pointer, + _sel_initWithDateFormat_allowNaturalLanguage_, format.pointer, flag); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool allowsNaturalLanguage() { + return _objc_msgSend_7(this.pointer, _sel_allowsNaturalLanguage); + } + + @override + NSDateFormatter init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSDateFormatter.castFromPointer(_ret, retain: true, release: true); + } + + static NSDateFormatter new1() { + final _ret = _objc_msgSend_40(_class_NSDateFormatter, _sel_new); + return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); } - NSObject? get objectsByEvaluatingSpecifier { + static NSDateFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_17(this.pointer, _sel_objectsByEvaluatingSpecifier); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + _objc_msgSend_47(_class_NSDateFormatter, _sel_allocWithZone_, zone); + return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); } - int get evaluationErrorNumber { - return _objc_msgSend_83(this.pointer, _sel_evaluationErrorNumber); + static NSDateFormatter alloc() { + final _ret = _objc_msgSend_40(_class_NSDateFormatter, _sel_alloc); + return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); } - set evaluationErrorNumber(int value) { - return _objc_msgSend_635( - this.pointer, _sel_setEvaluationErrorNumber_, value); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSDateFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSScriptObjectSpecifier? get evaluationErrorSpecifier { - final _ret = _objc_msgSend_632(this.pointer, _sel_evaluationErrorSpecifier); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSDateFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSDateFormatter, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSDateFormatter, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSDateFormatter, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSDateFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSDateFormatter, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSDateFormatter, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSDateFormatter, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSDateFormatter = objc.getClass("NSDateFormatter"); + +class NSFormatter extends objc.NSObject { + NSFormatter._(ffi.Pointer pointer, + {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.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); + + /// Returns whether [obj] is an instance of [NSFormatter]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSFormatter); + } + + objc.NSString? stringForObjectValue_(objc.NSObject? obj) { + final _ret = _objc_msgSend_83( + this.pointer, _sel_stringForObjectValue_, obj?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSScriptObjectSpecifier._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSAppleEventDescriptor? get descriptor { - final _ret = _objc_msgSend_636(this.pointer, _sel_descriptor); + NSAttributedString? attributedStringForObjectValue_withDefaultAttributes_( + objc.NSObject obj, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_84( + this.pointer, + _sel_attributedStringForObjectValue_withDefaultAttributes_, + obj.pointer, + attrs?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString? editingStringForObjectValue_(objc.NSObject obj) { + final _ret = _objc_msgSend_85( + this.pointer, _sel_editingStringForObjectValue_, obj.pointer); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool getObjectValue_forString_errorDescription_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer> error) { + return _objc_msgSend_86( + this.pointer, + _sel_getObjectValue_forString_errorDescription_, + obj, + string.pointer, + error); + } + + bool isPartialStringValid_newEditingString_errorDescription_( + objc.NSString partialString, + ffi.Pointer> newString, + ffi.Pointer> error) { + return _objc_msgSend_87( + this.pointer, + _sel_isPartialStringValid_newEditingString_errorDescription_, + partialString.pointer, + newString, + error); + } + + bool + isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_( + ffi.Pointer> partialStringPtr, + ffi.Pointer<_NSRange> proposedSelRangePtr, + objc.NSString origString, + _NSRange origSelRange, + ffi.Pointer> error) { + return _objc_msgSend_88( + this.pointer, + _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_, + partialStringPtr, + proposedSelRangePtr, + origString.pointer, + origSelRange, + error); } @override - NSScriptObjectSpecifier init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSScriptObjectSpecifier._(_ret, retain: true, release: true); + NSFormatter init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFormatter.castFromPointer(_ret, retain: true, release: true); } - static NSScriptObjectSpecifier new1() { - final _ret = _objc_msgSend_2(_class_NSScriptObjectSpecifier, _sel_new); - return NSScriptObjectSpecifier._(_ret, retain: false, release: true); + static NSFormatter new1() { + final _ret = _objc_msgSend_40(_class_NSFormatter, _sel_new); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } - static NSScriptObjectSpecifier allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSScriptObjectSpecifier, _sel_allocWithZone_, zone); - return NSScriptObjectSpecifier._(_ret, retain: false, release: true); + static NSFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSFormatter, _sel_allocWithZone_, zone); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } - static NSScriptObjectSpecifier alloc() { - final _ret = _objc_msgSend_2(_class_NSScriptObjectSpecifier, _sel_alloc); - return NSScriptObjectSpecifier._(_ret, retain: false, release: true); + static NSFormatter alloc() { + final _ret = _objc_msgSend_40(_class_NSFormatter, _sel_alloc); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSScriptObjectSpecifier, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFormatter, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSScriptObjectSpecifier, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFormatter, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSScriptObjectSpecifier, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSFormatter, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSScriptObjectSpecifier, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSFormatter, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSScriptObjectSpecifier, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFormatter, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSScriptObjectSpecifier, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFormatter, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSScriptObjectSpecifier, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFormatter, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFormatter, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSFormatter, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSFormatter = objc.getClass("NSFormatter"); +late final _sel_stringForObjectValue_ = + objc.registerName("stringForObjectValue:"); +final _objc_msgSend_83 = 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_84 = 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_editingStringForObjectValue_ = + objc.registerName("editingStringForObjectValue:"); +final _objc_msgSend_85 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_getObjectValue_forString_errorDescription_ = + objc.registerName("getObjectValue:forString:errorDescription:"); +final _objc_msgSend_86 = 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_87 = 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_88 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer<_NSRange>, + ffi.Pointer, + _NSRange, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer<_NSRange>, + ffi.Pointer, + _NSRange, + ffi.Pointer>)>(); + +abstract class NSFormattingContext { + static const int NSFormattingContextUnknown = 0; + static const int NSFormattingContextDynamic = 1; + static const int NSFormattingContextStandalone = 2; + static const int NSFormattingContextListItem = 3; + static const int NSFormattingContextBeginningOfSentence = 4; + static const int NSFormattingContextMiddleOfSentence = 5; +} + +late final _sel_formattingContext = objc.registerName("formattingContext"); +final _objc_msgSend_89 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setFormattingContext_ = + objc.registerName("setFormattingContext:"); +final _objc_msgSend_90 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_getObjectValue_forString_range_error_ = + objc.registerName("getObjectValue:forString:range:error:"); +final _objc_msgSend_91 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer<_NSRange>, + ffi.Pointer>)>>() + .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_92 = 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_dateFromString_ = objc.registerName("dateFromString:"); +final _objc_msgSend_93 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSDateFormatterStyle { + static const int NSDateFormatterNoStyle = 0; + static const int NSDateFormatterShortStyle = 1; + static const int NSDateFormatterMediumStyle = 2; + static const int NSDateFormatterLongStyle = 3; + static const int NSDateFormatterFullStyle = 4; +} - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSScriptObjectSpecifier, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } +late final _sel_localizedStringFromDate_dateStyle_timeStyle_ = + objc.registerName("localizedStringFromDate:dateStyle:timeStyle:"); +final _objc_msgSend_94 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>() + .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_95 = 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)>(); - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSScriptObjectSpecifier, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } +abstract class NSDateFormatterBehavior { + static const int NSDateFormatterBehaviorDefault = 0; + static const int NSDateFormatterBehavior10_0 = 1000; + static const int NSDateFormatterBehavior10_4 = 1040; } -late final _class_NSScriptObjectSpecifier = - objc.getClass("NSScriptObjectSpecifier"); +late final _sel_defaultFormatterBehavior = + objc.registerName("defaultFormatterBehavior"); +final _objc_msgSend_96 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDefaultFormatterBehavior_ = + objc.registerName("setDefaultFormatterBehavior:"); +final _objc_msgSend_97 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setLocalizedDateFormatFromTemplate_ = + objc.registerName("setLocalizedDateFormatFromTemplate:"); +final _objc_msgSend_98 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dateFormat = objc.registerName("dateFormat"); +late final _sel_setDateFormat_ = objc.registerName("setDateFormat:"); +final _objc_msgSend_99 = 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_dateStyle = objc.registerName("dateStyle"); +final _objc_msgSend_100 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDateStyle_ = objc.registerName("setDateStyle:"); +final _objc_msgSend_101 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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"); +final _objc_msgSend_102 = 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_103 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_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:"); -class NSAppleEventDescriptor extends NSObject { - NSAppleEventDescriptor._(ffi.Pointer pointer, +class NSTimeZone extends objc.NSObject { + NSTimeZone._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSAppleEventDescriptor] that points to the same underlying object as [other]. - static NSAppleEventDescriptor castFrom( - T other) { - return NSAppleEventDescriptor._(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.pointer, retain: true, release: true); - /// Returns a [NSAppleEventDescriptor] that wraps the given raw object pointer. - static NSAppleEventDescriptor castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSAppleEventDescriptor._(other, retain: retain, release: release); - } + /// 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 [NSAppleEventDescriptor]. + /// Returns whether [obj] is an instance of [NSTimeZone]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSAppleEventDescriptor); + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTimeZone); } - static NSAppleEventDescriptor nullDescriptor() { - final _ret = - _objc_msgSend_601(_class_NSAppleEventDescriptor, _sel_nullDescriptor); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSAppleEventDescriptor? descriptorWithDescriptorType_bytes_length_( - int descriptorType, ffi.Pointer bytes, int byteCount) { - final _ret = _objc_msgSend_602( - _class_NSAppleEventDescriptor, - _sel_descriptorWithDescriptorType_bytes_length_, - descriptorType, - bytes, - byteCount); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); + objc.NSData get data { + final _ret = _objc_msgSend_104(this.pointer, _sel_data); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static NSAppleEventDescriptor? descriptorWithDescriptorType_data_( - int descriptorType, NSData? data) { - final _ret = _objc_msgSend_603( - _class_NSAppleEventDescriptor, - _sel_descriptorWithDescriptorType_data_, - descriptorType, - data?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); + int secondsFromGMTForDate_(objc.NSDate aDate) { + return _objc_msgSend_105( + this.pointer, _sel_secondsFromGMTForDate_, aDate.pointer); } - static NSAppleEventDescriptor descriptorWithBoolean_(int boolean) { - final _ret = _objc_msgSend_604( - _class_NSAppleEventDescriptor, _sel_descriptorWithBoolean_, boolean); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); + objc.NSString? abbreviationForDate_(objc.NSDate aDate) { + final _ret = _objc_msgSend_106( + this.pointer, _sel_abbreviationForDate_, aDate.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSAppleEventDescriptor descriptorWithEnumCode_(int enumerator) { - final _ret = _objc_msgSend_605(_class_NSAppleEventDescriptor, - _sel_descriptorWithEnumCode_, enumerator); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); + bool isDaylightSavingTimeForDate_(objc.NSDate aDate) { + return _objc_msgSend_107( + this.pointer, _sel_isDaylightSavingTimeForDate_, aDate.pointer); } - static NSAppleEventDescriptor descriptorWithInt32_(int signedInt) { - final _ret = _objc_msgSend_606( - _class_NSAppleEventDescriptor, _sel_descriptorWithInt32_, signedInt); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); + double daylightSavingTimeOffsetForDate_(objc.NSDate aDate) { + return objc.useMsgSendVariants + ? _objc_msgSend_108Fpret( + this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer) + : _objc_msgSend_108( + this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer); } - static NSAppleEventDescriptor descriptorWithDouble_(double doubleValue) { - final _ret = _objc_msgSend_607( - _class_NSAppleEventDescriptor, _sel_descriptorWithDouble_, doubleValue); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); + objc.NSDate? nextDaylightSavingTimeTransitionAfterDate_(objc.NSDate aDate) { + final _ret = _objc_msgSend_109(this.pointer, + _sel_nextDaylightSavingTimeTransitionAfterDate_, aDate.pointer); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static NSAppleEventDescriptor descriptorWithTypeCode_(int typeCode) { - final _ret = _objc_msgSend_605( - _class_NSAppleEventDescriptor, _sel_descriptorWithTypeCode_, typeCode); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); + static NSTimeZone getSystemTimeZone() { + final _ret = _objc_msgSend_110(_class_NSTimeZone, _sel_systemTimeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static NSAppleEventDescriptor descriptorWithString_(NSString string) { - final _ret = _objc_msgSend_608(_class_NSAppleEventDescriptor, - _sel_descriptorWithString_, string.pointer); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); + static void resetSystemTimeZone() { + _objc_msgSend_82(_class_NSTimeZone, _sel_resetSystemTimeZone); } - static NSAppleEventDescriptor descriptorWithDate_(NSDate date) { - final _ret = _objc_msgSend_609( - _class_NSAppleEventDescriptor, _sel_descriptorWithDate_, date.pointer); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); + static NSTimeZone getDefaultTimeZone() { + final _ret = _objc_msgSend_110(_class_NSTimeZone, _sel_defaultTimeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static NSAppleEventDescriptor descriptorWithFileURL_(NSURL fileURL) { - final _ret = _objc_msgSend_610(_class_NSAppleEventDescriptor, - _sel_descriptorWithFileURL_, fileURL.pointer); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); + static void setDefaultTimeZone(NSTimeZone value) { + return _objc_msgSend_111( + _class_NSTimeZone, _sel_setDefaultTimeZone_, value.pointer); } - static NSAppleEventDescriptor - appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_( - int eventClass, - int eventID, - NSAppleEventDescriptor? targetDescriptor, - int returnID, - int transactionID) { - final _ret = _objc_msgSend_611( - _class_NSAppleEventDescriptor, - _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_, - eventClass, - eventID, - targetDescriptor?.pointer ?? ffi.nullptr, - returnID, - transactionID); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); + static NSTimeZone getLocalTimeZone() { + final _ret = _objc_msgSend_110(_class_NSTimeZone, _sel_localTimeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static NSAppleEventDescriptor listDescriptor() { - final _ret = - _objc_msgSend_601(_class_NSAppleEventDescriptor, _sel_listDescriptor); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); + static objc.NSArray getKnownTimeZoneNames() { + final _ret = _objc_msgSend_6(_class_NSTimeZone, _sel_knownTimeZoneNames); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSAppleEventDescriptor recordDescriptor() { + static objc.NSDictionary getAbbreviationDictionary() { final _ret = - _objc_msgSend_601(_class_NSAppleEventDescriptor, _sel_recordDescriptor); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor currentProcessDescriptor() { - final _ret = _objc_msgSend_601( - _class_NSAppleEventDescriptor, _sel_currentProcessDescriptor); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor descriptorWithProcessIdentifier_( - int processIdentifier) { - final _ret = _objc_msgSend_606(_class_NSAppleEventDescriptor, - _sel_descriptorWithProcessIdentifier_, processIdentifier); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor descriptorWithBundleIdentifier_( - NSString bundleIdentifier) { - final _ret = _objc_msgSend_608(_class_NSAppleEventDescriptor, - _sel_descriptorWithBundleIdentifier_, bundleIdentifier.pointer); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); + _objc_msgSend_112(_class_NSTimeZone, _sel_abbreviationDictionary); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSAppleEventDescriptor descriptorWithApplicationURL_( - NSURL applicationURL) { - final _ret = _objc_msgSend_610(_class_NSAppleEventDescriptor, - _sel_descriptorWithApplicationURL_, applicationURL.pointer); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); + static void setAbbreviationDictionary(objc.NSDictionary value) { + return _objc_msgSend_113( + _class_NSTimeZone, _sel_setAbbreviationDictionary_, value.pointer); } - NSAppleEventDescriptor initWithAEDescNoCopy_(ffi.Pointer aeDesc) { - final _ret = - _objc_msgSend_612(this.pointer, _sel_initWithAEDescNoCopy_, aeDesc); - return NSAppleEventDescriptor._(_ret, retain: false, release: true); + static objc.NSString getTimeZoneDataVersion() { + final _ret = _objc_msgSend_12(_class_NSTimeZone, _sel_timeZoneDataVersion); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSAppleEventDescriptor? initWithDescriptorType_bytes_length_( - int descriptorType, ffi.Pointer bytes, int byteCount) { - final _ret = _objc_msgSend_613( - this.pointer, - _sel_initWithDescriptorType_bytes_length_, - descriptorType, - bytes, - byteCount); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); + int get secondsFromGMT { + return _objc_msgSend_114(this.pointer, _sel_secondsFromGMT); } - NSAppleEventDescriptor? initWithDescriptorType_data_( - int descriptorType, NSData? data) { - final _ret = _objc_msgSend_614( - this.pointer, - _sel_initWithDescriptorType_data_, - descriptorType, - data?.pointer ?? ffi.nullptr); + objc.NSString? get abbreviation { + final _ret = _objc_msgSend_13(this.pointer, _sel_abbreviation); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - NSAppleEventDescriptor - initWithEventClass_eventID_targetDescriptor_returnID_transactionID_( - int eventClass, - int eventID, - NSAppleEventDescriptor? targetDescriptor, - int returnID, - int transactionID) { - final _ret = _objc_msgSend_615( - this.pointer, - _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_, - eventClass, - eventID, - targetDescriptor?.pointer ?? ffi.nullptr, - returnID, - transactionID); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - NSAppleEventDescriptor initListDescriptor() { - final _ret = _objc_msgSend_2(this.pointer, _sel_initListDescriptor); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - NSAppleEventDescriptor initRecordDescriptor() { - final _ret = _objc_msgSend_2(this.pointer, _sel_initRecordDescriptor); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - ffi.Pointer get aeDesc { - return _objc_msgSend_616(this.pointer, _sel_aeDesc); - } - - int get descriptorType { - return _objc_msgSend_214(this.pointer, _sel_descriptorType); - } - - NSData get data { - final _ret = _objc_msgSend_43(this.pointer, _sel_data); - return NSData._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get booleanValue { - return _objc_msgSend_234(this.pointer, _sel_booleanValue); - } - - int get enumCodeValue { - return _objc_msgSend_214(this.pointer, _sel_enumCodeValue); - } - - int get int32Value { - return _objc_msgSend_237(this.pointer, _sel_int32Value); + bool get daylightSavingTime { + return _objc_msgSend_7(this.pointer, _sel_isDaylightSavingTime); } - double get doubleValue { + double get daylightSavingTimeOffset { return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_doubleValue) - : _objc_msgSend_165(this.pointer, _sel_doubleValue); - } - - int get typeCodeValue { - return _objc_msgSend_214(this.pointer, _sel_typeCodeValue); - } - - NSString? get stringValue { - final _ret = _objc_msgSend_44(this.pointer, _sel_stringValue); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSDate? get dateValue { - final _ret = _objc_msgSend_183(this.pointer, _sel_dateValue); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); + ? _objc_msgSend_115Fpret(this.pointer, _sel_daylightSavingTimeOffset) + : _objc_msgSend_115(this.pointer, _sel_daylightSavingTimeOffset); } - NSURL? get fileURLValue { - final _ret = _objc_msgSend_45(this.pointer, _sel_fileURLValue); + objc.NSDate? get nextDaylightSavingTimeTransition { + final _ret = + _objc_msgSend_116(this.pointer, _sel_nextDaylightSavingTimeTransition); return _ret.address == 0 ? null - : NSURL._(_ret, retain: true, release: true); - } - - int get eventClass { - return _objc_msgSend_214(this.pointer, _sel_eventClass); - } - - int get eventID { - return _objc_msgSend_214(this.pointer, _sel_eventID); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - int get returnID { - return _objc_msgSend_235(this.pointer, _sel_returnID); - } - - int get transactionID { - return _objc_msgSend_237(this.pointer, _sel_transactionID); + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void setParamDescriptor_forKeyword_( - NSAppleEventDescriptor descriptor, int keyword) { - _objc_msgSend_617(this.pointer, _sel_setParamDescriptor_forKeyword_, - descriptor.pointer, keyword); + bool isEqualToTimeZone_(NSTimeZone aTimeZone) { + return _objc_msgSend_117( + this.pointer, _sel_isEqualToTimeZone_, aTimeZone.pointer); } - NSAppleEventDescriptor? paramDescriptorForKeyword_(int keyword) { - final _ret = _objc_msgSend_618( - this.pointer, _sel_paramDescriptorForKeyword_, keyword); + objc.NSString? localizedName_locale_(int style, objc.NSLocale? locale) { + final _ret = _objc_msgSend_118(this.pointer, _sel_localizedName_locale_, + style, locale?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - void removeParamDescriptorWithKeyword_(int keyword) { - _objc_msgSend_619( - this.pointer, _sel_removeParamDescriptorWithKeyword_, keyword); - } - - void setAttributeDescriptor_forKeyword_( - NSAppleEventDescriptor descriptor, int keyword) { - _objc_msgSend_617(this.pointer, _sel_setAttributeDescriptor_forKeyword_, - descriptor.pointer, keyword); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSAppleEventDescriptor? attributeDescriptorForKeyword_(int keyword) { - final _ret = _objc_msgSend_618( - this.pointer, _sel_attributeDescriptorForKeyword_, keyword); + static NSTimeZone? timeZoneWithName_(objc.NSString tzName) { + final _ret = _objc_msgSend_2( + _class_NSTimeZone, _sel_timeZoneWithName_, tzName.pointer); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSAppleEventDescriptor? sendEventWithOptions_timeout_error_( - int sendOptions, - double timeoutInSeconds, - ffi.Pointer> error) { - final _ret = _objc_msgSend_620( - this.pointer, - _sel_sendEventWithOptions_timeout_error_, - sendOptions, - timeoutInSeconds, - error); + static NSTimeZone? timeZoneWithName_data_( + objc.NSString tzName, objc.NSData? aData) { + final _ret = _objc_msgSend_119( + _class_NSTimeZone, + _sel_timeZoneWithName_data_, + tzName.pointer, + aData?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - bool get isRecordDescriptor { - return _objc_msgSend_12(this.pointer, _sel_isRecordDescriptor); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - int get numberOfItems { - return _objc_msgSend_83(this.pointer, _sel_numberOfItems); - } - - void insertDescriptor_atIndex_(NSAppleEventDescriptor descriptor, int index) { - _objc_msgSend_621(this.pointer, _sel_insertDescriptor_atIndex_, - descriptor.pointer, index); - } - - NSAppleEventDescriptor? descriptorAtIndex_(int index) { + NSTimeZone? initWithName_(objc.NSString tzName) { final _ret = - _objc_msgSend_622(this.pointer, _sel_descriptorAtIndex_, index); + _objc_msgSend_2(this.pointer, _sel_initWithName_, tzName.pointer); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - void removeDescriptorAtIndex_(int index) { - _objc_msgSend_423(this.pointer, _sel_removeDescriptorAtIndex_, index); - } - - void setDescriptor_forKeyword_( - NSAppleEventDescriptor descriptor, int keyword) { - _objc_msgSend_617(this.pointer, _sel_setDescriptor_forKeyword_, - descriptor.pointer, keyword); - } - - NSAppleEventDescriptor? descriptorForKeyword_(int keyword) { - final _ret = - _objc_msgSend_618(this.pointer, _sel_descriptorForKeyword_, keyword); + NSTimeZone? initWithName_data_(objc.NSString tzName, objc.NSData? aData) { + final _ret = _objc_msgSend_119(this.pointer, _sel_initWithName_data_, + tzName.pointer, aData?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - void removeDescriptorWithKeyword_(int keyword) { - _objc_msgSend_619(this.pointer, _sel_removeDescriptorWithKeyword_, keyword); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - int keywordForDescriptorAtIndex_(int index) { - return _objc_msgSend_623( - this.pointer, _sel_keywordForDescriptorAtIndex_, index); + static NSTimeZone timeZoneForSecondsFromGMT_(int seconds) { + final _ret = _objc_msgSend_120( + _class_NSTimeZone, _sel_timeZoneForSecondsFromGMT_, seconds); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSAppleEventDescriptor? coerceToDescriptorType_(int descriptorType) { - final _ret = _objc_msgSend_618( - this.pointer, _sel_coerceToDescriptorType_, descriptorType); + static NSTimeZone? timeZoneWithAbbreviation_(objc.NSString abbreviation) { + final _ret = _objc_msgSend_2(_class_NSTimeZone, + _sel_timeZoneWithAbbreviation_, abbreviation.pointer); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } @override - NSAppleEventDescriptor init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); + NSTimeZone init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static NSAppleEventDescriptor new1() { - final _ret = _objc_msgSend_2(_class_NSAppleEventDescriptor, _sel_new); - return NSAppleEventDescriptor._(_ret, retain: false, release: true); + static NSTimeZone new1() { + final _ret = _objc_msgSend_40(_class_NSTimeZone, _sel_new); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - static NSAppleEventDescriptor allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSAppleEventDescriptor, _sel_allocWithZone_, zone); - return NSAppleEventDescriptor._(_ret, retain: false, release: true); + static NSTimeZone allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSTimeZone, _sel_allocWithZone_, zone); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - static NSAppleEventDescriptor alloc() { - final _ret = _objc_msgSend_2(_class_NSAppleEventDescriptor, _sel_alloc); - return NSAppleEventDescriptor._(_ret, retain: false, release: true); + static NSTimeZone alloc() { + final _ret = _objc_msgSend_40(_class_NSTimeZone, _sel_alloc); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSAppleEventDescriptor, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTimeZone, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSAppleEventDescriptor, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTimeZone, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSAppleEventDescriptor, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSTimeZone, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSAppleEventDescriptor, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSTimeZone, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSAppleEventDescriptor, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTimeZone, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSAppleEventDescriptor, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSTimeZone, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSAppleEventDescriptor, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTimeZone, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSAppleEventDescriptor, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSAppleEventDescriptor, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSAppleEventDescriptor = - objc.getClass("NSAppleEventDescriptor"); -late final _sel_nullDescriptor = objc.registerName("nullDescriptor"); -final _objc_msgSend_601 = 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_602 = 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_603 = 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_604 = objc.msgSendPointer + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSTimeZone, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSTimeZone, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, 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_104 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedChar)>>() + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_descriptorWithEnumCode_ = - objc.registerName("descriptorWithEnumCode:"); -final _objc_msgSend_605 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_secondsFromGMTForDate_ = + objc.registerName("secondsFromGMTForDate:"); +final _objc_msgSend_105 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>() + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_descriptorWithInt32_ = - objc.registerName("descriptorWithInt32:"); -final _objc_msgSend_606 = objc.msgSendPointer + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_abbreviationForDate_ = + objc.registerName("abbreviationForDate:"); +final _objc_msgSend_106 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_descriptorWithDouble_ = - objc.registerName("descriptorWithDouble:"); -final _objc_msgSend_607 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isDaylightSavingTimeForDate_ = + objc.registerName("isDaylightSavingTimeForDate:"); +final _objc_msgSend_107 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>() + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .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_608 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_daylightSavingTimeOffsetForDate_ = + objc.registerName("daylightSavingTimeOffsetForDate:"); +final _objc_msgSend_108 = 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_descriptorWithDate_ = objc.registerName("descriptorWithDate:"); -final _objc_msgSend_609 = objc.msgSendPointer +final _objc_msgSend_108Fpret = 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_descriptorWithFileURL_ = - objc.registerName("descriptorWithFileURL:"); -final _objc_msgSend_610 = objc.msgSendPointer +late final _sel_nextDaylightSavingTimeTransitionAfterDate_ = + objc.registerName("nextDaylightSavingTimeTransitionAfterDate:"); +final _objc_msgSend_109 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -28325,543 +4496,848 @@ final _objc_msgSend_610 = objc.msgSendPointer .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_611 = objc.msgSendPointer +late final _sel_systemTimeZone = objc.registerName("systemTimeZone"); +final _objc_msgSend_110 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.Pointer, - ffi.Short, - ffi.Int)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .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:"); - -@ffi.Packed(2) -final class AEDesc extends ffi.Struct { - @ffi.UnsignedInt() - external int descriptorType; - - external ffi.Pointer> dataHandle; -} - -final class OpaqueAEDataStorageType extends ffi.Opaque {} - -late final _sel_initWithAEDescNoCopy_ = - objc.registerName("initWithAEDescNoCopy:"); -final _objc_msgSend_612 = objc.msgSendPointer + 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_111 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.Void 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_613 = objc.msgSendPointer + 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_112 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer, int)>(); -late final _sel_initWithDescriptorType_data_ = - objc.registerName("initWithDescriptorType:data:"); -final _objc_msgSend_614 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setAbbreviationDictionary_ = + objc.registerName("setAbbreviationDictionary:"); +final _objc_msgSend_113 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void 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_615 = objc.msgSendPointer + 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_114 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt, - ffi.UnsignedInt, - ffi.Pointer, - ffi.Short, - ffi.Int)>>() + ffi.Long Function(ffi.Pointer, + ffi.Pointer)>>() .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_616 = 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"); +final _objc_msgSend_115 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Double Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + double Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_descriptorType = objc.registerName("descriptorType"); -late final _sel_booleanValue = objc.registerName("booleanValue"); -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_617 = objc.msgSendPointer +final _objc_msgSend_115Fpret = objc.msgSendFpretPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedInt)>>() + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_paramDescriptorForKeyword_ = - objc.registerName("paramDescriptorForKeyword:"); -final _objc_msgSend_618 = objc.msgSendPointer + double Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_nextDaylightSavingTimeTransition = + objc.registerName("nextDaylightSavingTimeTransition"); +final _objc_msgSend_116 = 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)>(); -late final _sel_removeParamDescriptorWithKeyword_ = - objc.registerName("removeParamDescriptorWithKeyword:"); -final _objc_msgSend_619 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_description = objc.registerName("description"); +late final _sel_isEqualToTimeZone_ = objc.registerName("isEqualToTimeZone:"); +final _objc_msgSend_117 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>() + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + 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:"); + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -abstract class NSAppleEventSendOptions { - static const int NSAppleEventSendNoReply = 1; - static const int NSAppleEventSendQueueReply = 2; - static const int NSAppleEventSendWaitForReply = 3; - static const int NSAppleEventSendNeverInteract = 16; - static const int NSAppleEventSendCanInteract = 32; - static const int NSAppleEventSendAlwaysInteract = 48; - static const int NSAppleEventSendCanSwitchLayer = 64; - static const int NSAppleEventSendDontRecord = 4096; - static const int NSAppleEventSendDontExecute = 8192; - static const int NSAppleEventSendDontAnnotate = 65536; - static const int NSAppleEventSendDefaultOptions = 35; +abstract class NSTimeZoneNameStyle { + static const int NSTimeZoneNameStyleStandard = 0; + static const int NSTimeZoneNameStyleShortStandard = 1; + static const int NSTimeZoneNameStyleDaylightSaving = 2; + static const int NSTimeZoneNameStyleShortDaylightSaving = 3; + static const int NSTimeZoneNameStyleGeneric = 4; + static const int NSTimeZoneNameStyleShortGeneric = 5; } -late final _sel_sendEventWithOptions_timeout_error_ = - objc.registerName("sendEventWithOptions:timeout:error:"); -final _objc_msgSend_620 = objc.msgSendPointer +late final _sel_localizedName_locale_ = + objc.registerName("localizedName:locale:"); +final _objc_msgSend_118 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Int32, - ffi.Double, - ffi.Pointer>)>>() + 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_621 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_timeZoneWithName_ = objc.registerName("timeZoneWithName:"); +late final _sel_timeZoneWithName_data_ = + objc.registerName("timeZoneWithName:data:"); +final _objc_msgSend_119 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Long)>>() + ffi.Pointer)>>() .asFunction< - void Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int)>(); -late final _sel_descriptorAtIndex_ = objc.registerName("descriptorAtIndex:"); -final _objc_msgSend_622 = 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_623 = objc.msgSendPointer + 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_120 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedInt Function(ffi.Pointer, + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Long)>>() .asFunction< - int Function(ffi.Pointer, + instancetype Function(ffi.Pointer, ffi.Pointer, int)>(); -late final _sel_coerceToDescriptorType_ = - objc.registerName("coerceToDescriptorType:"); -late final _sel_objectSpecifierWithDescriptor_ = - objc.registerName("objectSpecifierWithDescriptor:"); -final _objc_msgSend_624 = 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_625 = 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_timeZoneWithAbbreviation_ = + objc.registerName("timeZoneWithAbbreviation:"); +late final _sel_timeZone = objc.registerName("timeZone"); +late final _sel_setTimeZone_ = objc.registerName("setTimeZone:"); + +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.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_0(obj.pointer, _sel_isKindOfClass_, _class_NSCalendar); + } + + static NSCalendar getCurrentCalendar() { + final _ret = _objc_msgSend_121(_class_NSCalendar, _sel_currentCalendar); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); + } + + static NSCalendar getAutoupdatingCurrentCalendar() { + final _ret = + _objc_msgSend_121(_class_NSCalendar, _sel_autoupdatingCurrentCalendar); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); + } + + static NSCalendar? calendarWithIdentifier_( + objc.NSString calendarIdentifierConstant) { + final _ret = _objc_msgSend_122(_class_NSCalendar, + _sel_calendarWithIdentifier_, calendarIdentifierConstant.pointer); + return _ret.address == 0 + ? null + : NSCalendar.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSCalendar init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? initWithCalendarIdentifier_(objc.NSString ident) { + final _ret = _objc_msgSend_2( + this.pointer, _sel_initWithCalendarIdentifier_, ident.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString get calendarIdentifier { + final _ret = _objc_msgSend_12(this.pointer, _sel_calendarIdentifier); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSLocale? get locale { + final _ret = _objc_msgSend_123(this.pointer, _sel_locale); + return _ret.address == 0 + ? null + : objc.NSLocale.castFromPointer(_ret, retain: true, release: true); + } + + set locale(objc.NSLocale? value) { + return _objc_msgSend_124( + this.pointer, _sel_setLocale_, value?.pointer ?? ffi.nullptr); + } + + NSTimeZone get timeZone { + final _ret = _objc_msgSend_110(this.pointer, _sel_timeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); + } + + set timeZone(NSTimeZone value) { + return _objc_msgSend_111(this.pointer, _sel_setTimeZone_, value.pointer); + } + + int get firstWeekday { + return _objc_msgSend_29(this.pointer, _sel_firstWeekday); + } + + set firstWeekday(int value) { + return _objc_msgSend_125(this.pointer, _sel_setFirstWeekday_, value); + } + + int get minimumDaysInFirstWeek { + return _objc_msgSend_29(this.pointer, _sel_minimumDaysInFirstWeek); + } + + set minimumDaysInFirstWeek(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumDaysInFirstWeek_, value); + } + + objc.NSArray get eraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_eraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get longEraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_longEraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get monthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_monthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get shortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get veryShortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get standaloneMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get shortStandaloneMonthSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get veryShortStandaloneMonthSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get weekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_weekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get shortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get veryShortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get standaloneWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get shortStandaloneWeekdaySymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get veryShortStandaloneWeekdaySymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get quarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_quarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get shortQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get standaloneQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get shortStandaloneQuarterSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString get AMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_AMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString get PMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_PMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + void minimumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { + objc.useMsgSendVariants + ? _objc_msgSend_126Stret( + stret, this.pointer, _sel_minimumRangeOfUnit_, unit) + : stret.ref = + _objc_msgSend_126(this.pointer, _sel_minimumRangeOfUnit_, unit); + } -class NSScriptClassDescription extends NSClassDescription { - NSScriptClassDescription._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + void maximumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { + objc.useMsgSendVariants + ? _objc_msgSend_126Stret( + stret, this.pointer, _sel_maximumRangeOfUnit_, unit) + : stret.ref = + _objc_msgSend_126(this.pointer, _sel_maximumRangeOfUnit_, unit); + } - /// Returns a [NSScriptClassDescription] that points to the same underlying object as [other]. - static NSScriptClassDescription castFrom( - T other) { - return NSScriptClassDescription._(other.pointer, - retain: true, release: true); + void rangeOfUnit_inUnit_forDate_( + ffi.Pointer<_NSRange> stret, int smaller, int larger, objc.NSDate date) { + objc.useMsgSendVariants + ? _objc_msgSend_127Stret(stret, this.pointer, + _sel_rangeOfUnit_inUnit_forDate_, smaller, larger, date.pointer) + : stret.ref = _objc_msgSend_127(this.pointer, + _sel_rangeOfUnit_inUnit_forDate_, smaller, larger, date.pointer); } - /// Returns a [NSScriptClassDescription] that wraps the given raw object pointer. - static NSScriptClassDescription castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSScriptClassDescription._(other, retain: retain, release: release); + int ordinalityOfUnit_inUnit_forDate_( + int smaller, int larger, objc.NSDate date) { + return _objc_msgSend_128(this.pointer, + _sel_ordinalityOfUnit_inUnit_forDate_, smaller, larger, date.pointer); } - /// Returns whether [obj] is an instance of [NSScriptClassDescription]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSScriptClassDescription); + bool rangeOfUnit_startDate_interval_forDate_( + int unit, + ffi.Pointer> datep, + ffi.Pointer tip, + objc.NSDate date) { + return _objc_msgSend_129( + this.pointer, + _sel_rangeOfUnit_startDate_interval_forDate_, + unit, + datep, + tip, + date.pointer); } - static NSScriptClassDescription? classDescriptionForClass_(NSObject aClass) { - final _ret = _objc_msgSend_626(_class_NSScriptClassDescription, - _sel_classDescriptionForClass_, aClass.pointer); + objc.NSDate? dateFromComponents_(NSDateComponents comps) { + final _ret = _objc_msgSend_139( + this.pointer, _sel_dateFromComponents_, comps.pointer); return _ret.address == 0 ? null - : NSScriptClassDescription._(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSScriptClassDescription? initWithSuiteName_className_dictionary_( - NSString suiteName, NSString className, NSDictionary? classDeclaration) { - final _ret = _objc_msgSend_627( + NSDateComponents components_fromDate_(int unitFlags, objc.NSDate date) { + final _ret = _objc_msgSend_140( + this.pointer, _sel_components_fromDate_, unitFlags, date.pointer); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSDate? dateByAddingComponents_toDate_options_( + NSDateComponents comps, objc.NSDate date, int opts) { + final _ret = _objc_msgSend_141( this.pointer, - _sel_initWithSuiteName_className_dictionary_, - suiteName.pointer, - className.pointer, - classDeclaration?.pointer ?? ffi.nullptr); + _sel_dateByAddingComponents_toDate_options_, + comps.pointer, + date.pointer, + opts); return _ret.address == 0 ? null - : NSScriptClassDescription._(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSString? get suiteName { - final _ret = _objc_msgSend_44(this.pointer, _sel_suiteName); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + NSDateComponents components_fromDate_toDate_options_(int unitFlags, + objc.NSDate startingDate, objc.NSDate resultDate, int opts) { + final _ret = _objc_msgSend_142( + this.pointer, + _sel_components_fromDate_toDate_options_, + unitFlags, + startingDate.pointer, + resultDate.pointer, + opts); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - NSString? get className { - final _ret = _objc_msgSend_44(this.pointer, _sel_className); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + void getEra_year_month_day_fromDate_( + ffi.Pointer eraValuePointer, + ffi.Pointer yearValuePointer, + ffi.Pointer monthValuePointer, + ffi.Pointer dayValuePointer, + objc.NSDate date) { + _objc_msgSend_143( + this.pointer, + _sel_getEra_year_month_day_fromDate_, + eraValuePointer, + yearValuePointer, + monthValuePointer, + dayValuePointer, + date.pointer); + } + + void getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_( + ffi.Pointer eraValuePointer, + ffi.Pointer yearValuePointer, + ffi.Pointer weekValuePointer, + ffi.Pointer weekdayValuePointer, + objc.NSDate date) { + _objc_msgSend_143( + this.pointer, + _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_, + eraValuePointer, + yearValuePointer, + weekValuePointer, + weekdayValuePointer, + date.pointer); + } + + void getHour_minute_second_nanosecond_fromDate_( + ffi.Pointer hourValuePointer, + ffi.Pointer minuteValuePointer, + ffi.Pointer secondValuePointer, + ffi.Pointer nanosecondValuePointer, + objc.NSDate date) { + _objc_msgSend_143( + this.pointer, + _sel_getHour_minute_second_nanosecond_fromDate_, + hourValuePointer, + minuteValuePointer, + secondValuePointer, + nanosecondValuePointer, + date.pointer); + } + + int component_fromDate_(int unit, objc.NSDate date) { + return _objc_msgSend_144( + this.pointer, _sel_component_fromDate_, unit, date.pointer); } - NSString? get implementationClassName { - final _ret = _objc_msgSend_44(this.pointer, _sel_implementationClassName); + 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_145( + this.pointer, + _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_, + eraValue, + yearValue, + monthValue, + dayValue, + hourValue, + minuteValue, + secondValue, + nanosecondValue); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSScriptClassDescription? get superclassDescription { - final _ret = _objc_msgSend_628(this.pointer, _sel_superclassDescription); + 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_145( + this.pointer, + _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_, + eraValue, + yearValue, + weekValue, + weekdayValue, + hourValue, + minuteValue, + secondValue, + nanosecondValue); return _ret.address == 0 ? null - : NSScriptClassDescription._(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - int get appleEventCode { - return _objc_msgSend_214(this.pointer, _sel_appleEventCode); + objc.NSDate startOfDayForDate_(objc.NSDate date) { + final _ret = + _objc_msgSend_146(this.pointer, _sel_startOfDayForDate_, date.pointer); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - bool matchesAppleEventCode_(int appleEventCode) { - return _objc_msgSend_194( - this.pointer, _sel_matchesAppleEventCode_, appleEventCode); + NSDateComponents componentsInTimeZone_fromDate_( + NSTimeZone timezone, objc.NSDate date) { + final _ret = _objc_msgSend_147(this.pointer, + _sel_componentsInTimeZone_fromDate_, timezone.pointer, date.pointer); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - bool supportsCommand_(NSScriptCommandDescription commandDescription) { - return _objc_msgSend_641( - this.pointer, _sel_supportsCommand_, commandDescription.pointer); + int compareDate_toDate_toUnitGranularity_( + objc.NSDate date1, objc.NSDate date2, int unit) { + return _objc_msgSend_148( + this.pointer, + _sel_compareDate_toDate_toUnitGranularity_, + date1.pointer, + date2.pointer, + unit); } - ffi.Pointer selectorForCommand_( - NSScriptCommandDescription commandDescription) { - return _objc_msgSend_642( - this.pointer, _sel_selectorForCommand_, commandDescription.pointer); + bool isDate_equalToDate_toUnitGranularity_( + objc.NSDate date1, objc.NSDate date2, int unit) { + return _objc_msgSend_149( + this.pointer, + _sel_isDate_equalToDate_toUnitGranularity_, + date1.pointer, + date2.pointer, + unit); } - NSString? typeForKey_(NSString key) { - final _ret = _objc_msgSend_186(this.pointer, _sel_typeForKey_, key.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + bool isDate_inSameDayAsDate_(objc.NSDate date1, objc.NSDate date2) { + return _objc_msgSend_150(this.pointer, _sel_isDate_inSameDayAsDate_, + date1.pointer, date2.pointer); } - NSScriptClassDescription? classDescriptionForKey_(NSString key) { - final _ret = _objc_msgSend_643( - this.pointer, _sel_classDescriptionForKey_, key.pointer); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, retain: true, release: true); + bool isDateInToday_(objc.NSDate date) { + return _objc_msgSend_107(this.pointer, _sel_isDateInToday_, date.pointer); } - int appleEventCodeForKey_(NSString key) { - return _objc_msgSend_629( - this.pointer, _sel_appleEventCodeForKey_, key.pointer); + bool isDateInYesterday_(objc.NSDate date) { + return _objc_msgSend_107( + this.pointer, _sel_isDateInYesterday_, date.pointer); } - NSString? keyWithAppleEventCode_(int appleEventCode) { - final _ret = _objc_msgSend_644( - this.pointer, _sel_keyWithAppleEventCode_, appleEventCode); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + bool isDateInTomorrow_(objc.NSDate date) { + return _objc_msgSend_107( + this.pointer, _sel_isDateInTomorrow_, date.pointer); } - NSString? get defaultSubcontainerAttributeKey { - final _ret = - _objc_msgSend_44(this.pointer, _sel_defaultSubcontainerAttributeKey); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + bool isDateInWeekend_(objc.NSDate date) { + return _objc_msgSend_107(this.pointer, _sel_isDateInWeekend_, date.pointer); } - bool isLocationRequiredToCreateForKey_(NSString toManyRelationshipKey) { - return _objc_msgSend_64(this.pointer, - _sel_isLocationRequiredToCreateForKey_, toManyRelationshipKey.pointer); + bool rangeOfWeekendStartDate_interval_containingDate_( + ffi.Pointer> datep, + ffi.Pointer tip, + objc.NSDate date) { + return _objc_msgSend_151( + this.pointer, + _sel_rangeOfWeekendStartDate_interval_containingDate_, + datep, + tip, + date.pointer); } - bool hasPropertyForKey_(NSString key) { - return _objc_msgSend_64(this.pointer, _sel_hasPropertyForKey_, key.pointer); + bool nextWeekendStartDate_interval_options_afterDate_( + ffi.Pointer> datep, + ffi.Pointer tip, + int options, + objc.NSDate date) { + return _objc_msgSend_152( + this.pointer, + _sel_nextWeekendStartDate_interval_options_afterDate_, + datep, + tip, + options, + date.pointer); } - bool hasOrderedToManyRelationshipForKey_(NSString key) { - return _objc_msgSend_64( - this.pointer, _sel_hasOrderedToManyRelationshipForKey_, key.pointer); + NSDateComponents components_fromDateComponents_toDateComponents_options_( + int unitFlags, + NSDateComponents startingDateComp, + NSDateComponents resultDateComp, + int options) { + final _ret = _objc_msgSend_153( + this.pointer, + _sel_components_fromDateComponents_toDateComponents_options_, + unitFlags, + startingDateComp.pointer, + resultDateComp.pointer, + options); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - bool hasReadablePropertyForKey_(NSString key) { - return _objc_msgSend_64( - this.pointer, _sel_hasReadablePropertyForKey_, key.pointer); + objc.NSDate? dateByAddingUnit_value_toDate_options_( + int unit, int value, objc.NSDate date, int options) { + final _ret = _objc_msgSend_154( + this.pointer, + _sel_dateByAddingUnit_value_toDate_options_, + unit, + value, + date.pointer, + options); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - bool hasWritablePropertyForKey_(NSString key) { - return _objc_msgSend_64( - this.pointer, _sel_hasWritablePropertyForKey_, key.pointer); + void enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_( + objc.NSDate start, + NSDateComponents comps, + int opts, + ObjCBlock_ffiVoid_NSDate_bool_bool block) { + _objc_msgSend_155( + this.pointer, + _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_, + start.pointer, + comps.pointer, + opts, + block.pointer); } - bool isReadOnlyKey_(NSString key) { - return _objc_msgSend_64(this.pointer, _sel_isReadOnlyKey_, key.pointer); + objc.NSDate? nextDateAfterDate_matchingComponents_options_( + objc.NSDate date, NSDateComponents comps, int options) { + final _ret = _objc_msgSend_156( + this.pointer, + _sel_nextDateAfterDate_matchingComponents_options_, + date.pointer, + comps.pointer, + options); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static void registerClassDescription_forClass_( - NSClassDescription description, NSObject aClass) { - _objc_msgSend_598( - _class_NSScriptClassDescription, - _sel_registerClassDescription_forClass_, - description.pointer, - aClass.pointer); + objc.NSDate? nextDateAfterDate_matchingUnit_value_options_( + objc.NSDate date, int unit, int value, int options) { + final _ret = _objc_msgSend_157( + this.pointer, + _sel_nextDateAfterDate_matchingUnit_value_options_, + date.pointer, + unit, + value, + options); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static void invalidateClassDescriptionCache() { - _objc_msgSend_1( - _class_NSScriptClassDescription, _sel_invalidateClassDescriptionCache); + objc.NSDate? nextDateAfterDate_matchingHour_minute_second_options_( + objc.NSDate date, + int hourValue, + int minuteValue, + int secondValue, + int options) { + final _ret = _objc_msgSend_158( + this.pointer, + _sel_nextDateAfterDate_matchingHour_minute_second_options_, + date.pointer, + hourValue, + minuteValue, + secondValue, + options); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - @override - NSScriptClassDescription init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSScriptClassDescription._(_ret, retain: true, release: true); + objc.NSDate? dateBySettingUnit_value_ofDate_options_( + int unit, int v, objc.NSDate date, int opts) { + final _ret = _objc_msgSend_154( + this.pointer, + _sel_dateBySettingUnit_value_ofDate_options_, + unit, + v, + date.pointer, + opts); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static NSScriptClassDescription new1() { - final _ret = _objc_msgSend_2(_class_NSScriptClassDescription, _sel_new); - return NSScriptClassDescription._(_ret, retain: false, release: true); + objc.NSDate? dateBySettingHour_minute_second_ofDate_options_( + int h, int m, int s, objc.NSDate date, int opts) { + final _ret = _objc_msgSend_159( + this.pointer, + _sel_dateBySettingHour_minute_second_ofDate_options_, + h, + m, + s, + date.pointer, + opts); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static NSScriptClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSScriptClassDescription, _sel_allocWithZone_, zone); - return NSScriptClassDescription._(_ret, retain: false, release: true); + bool date_matchesComponents_(objc.NSDate date, NSDateComponents components) { + return _objc_msgSend_160(this.pointer, _sel_date_matchesComponents_, + date.pointer, components.pointer); } - static NSScriptClassDescription alloc() { - final _ret = _objc_msgSend_2(_class_NSScriptClassDescription, _sel_alloc); - return NSScriptClassDescription._(_ret, retain: false, release: true); + static NSCalendar new1() { + final _ret = _objc_msgSend_40(_class_NSCalendar, _sel_new); + return NSCalendar.castFromPointer(_ret, retain: false, release: true); + } + + static NSCalendar allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSCalendar, _sel_allocWithZone_, zone); + return NSCalendar.castFromPointer(_ret, retain: false, release: true); + } + + static NSCalendar alloc() { + final _ret = _objc_msgSend_40(_class_NSCalendar, _sel_alloc); + return NSCalendar.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSScriptClassDescription, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSCalendar, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSScriptClassDescription, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSCalendar, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSScriptClassDescription, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSCalendar, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSScriptClassDescription, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSCalendar, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSScriptClassDescription, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSCalendar, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSScriptClassDescription, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSCalendar, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSScriptClassDescription, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSCalendar, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSScriptClassDescription, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSCalendar, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSScriptClassDescription, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSCalendar, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSScriptClassDescription = - objc.getClass("NSScriptClassDescription"); -final _objc_msgSend_626 = objc.msgSendPointer +late final _class_NSCalendar = objc.getClass("NSCalendar"); +late final _sel_currentCalendar = objc.registerName("currentCalendar"); +final _objc_msgSend_121 = 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_122 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -28871,550 +5347,483 @@ final _objc_msgSend_626 = objc.msgSendPointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithSuiteName_className_dictionary_ = - objc.registerName("initWithSuiteName:className:dictionary:"); -final _objc_msgSend_627 = objc.msgSendPointer +late final _sel_initWithCalendarIdentifier_ = + objc.registerName("initWithCalendarIdentifier:"); +late final _sel_calendarIdentifier = objc.registerName("calendarIdentifier"); +final _objc_msgSend_123 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_124 = 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_125 = 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"); + +abstract class NSCalendarUnit { + static const int NSCalendarUnitEra = 2; + static const int NSCalendarUnitYear = 4; + static const int NSCalendarUnitMonth = 8; + static const int NSCalendarUnitDay = 16; + static const int NSCalendarUnitHour = 32; + static const int NSCalendarUnitMinute = 64; + static const int NSCalendarUnitSecond = 128; + static const int NSCalendarUnitWeekday = 512; + static const int NSCalendarUnitWeekdayOrdinal = 1024; + static const int NSCalendarUnitQuarter = 2048; + static const int NSCalendarUnitWeekOfMonth = 4096; + static const int NSCalendarUnitWeekOfYear = 8192; + static const int NSCalendarUnitYearForWeekOfYear = 16384; + static const int NSCalendarUnitNanosecond = 32768; + static const int NSCalendarUnitCalendar = 1048576; + static const int NSCalendarUnitTimeZone = 2097152; + static const int NSEraCalendarUnit = 2; + static const int NSYearCalendarUnit = 4; + static const int NSMonthCalendarUnit = 8; + static const int NSDayCalendarUnit = 16; + static const int NSHourCalendarUnit = 32; + static const int NSMinuteCalendarUnit = 64; + static const int NSSecondCalendarUnit = 128; + static const int NSWeekCalendarUnit = 256; + static const int NSWeekdayCalendarUnit = 512; + static const int NSWeekdayOrdinalCalendarUnit = 1024; + static const int NSQuarterCalendarUnit = 2048; + static const int NSWeekOfMonthCalendarUnit = 4096; + static const int NSWeekOfYearCalendarUnit = 8192; + static const int NSYearForWeekOfYearCalendarUnit = 16384; + static const int NSCalendarCalendarUnit = 1048576; + static const int NSTimeZoneCalendarUnit = 2097152; +} + +late final _sel_minimumRangeOfUnit_ = objc.registerName("minimumRangeOfUnit:"); +final _objc_msgSend_126 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_126Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .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_127 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, ffi.Pointer)>>() .asFunction< - instancetype Function( + _NSRange Function( ffi.Pointer, ffi.Pointer, + int, + int, + ffi.Pointer)>(); +final _objc_msgSend_127Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + 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_128 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( ffi.Pointer, + ffi.Pointer, + int, + int, 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_628 = objc.msgSendPointer +late final _sel_rangeOfUnit_startDate_interval_forDate_ = + objc.registerName("rangeOfUnit:startDate:interval:forDate:"); +final _objc_msgSend_129 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_appleEventCode = objc.registerName("appleEventCode"); -late final _sel_matchesAppleEventCode_ = - objc.registerName("matchesAppleEventCode:"); + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>(); -class NSScriptCommandDescription extends NSObject { - NSScriptCommandDescription._(ffi.Pointer pointer, +class NSDateComponents extends objc.NSObject { + NSDateComponents._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSScriptCommandDescription] that points to the same underlying object as [other]. - static NSScriptCommandDescription castFrom( - T other) { - return NSScriptCommandDescription._(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.pointer, retain: true, release: true); - /// Returns a [NSScriptCommandDescription] that wraps the given raw object pointer. - static NSScriptCommandDescription castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSScriptCommandDescription._(other, - retain: retain, release: release); - } + /// 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 [NSScriptCommandDescription]. + /// Returns whether [obj] is an instance of [NSDateComponents]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSScriptCommandDescription); - } - - @override - NSObject init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSObject._(_ret, retain: true, release: true); - } - - NSScriptCommandDescription? initWithSuiteName_commandName_dictionary_( - NSString suiteName, - NSString commandName, - NSDictionary? commandDeclaration) { - final _ret = _objc_msgSend_627( - this.pointer, - _sel_initWithSuiteName_commandName_dictionary_, - suiteName.pointer, - commandName.pointer, - commandDeclaration?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSScriptCommandDescription._(_ret, retain: true, release: true); - } - - NSScriptCommandDescription? initWithCoder_(NSCoder inCoder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, inCoder.pointer); - return _ret.address == 0 - ? null - : NSScriptCommandDescription._(_ret, retain: true, release: true); - } - - NSString get suiteName { - final _ret = _objc_msgSend_21(this.pointer, _sel_suiteName); - return NSString._(_ret, retain: true, release: true); - } - - NSString get commandName { - final _ret = _objc_msgSend_21(this.pointer, _sel_commandName); - return NSString._(_ret, retain: true, release: true); - } - - int get appleEventClassCode { - return _objc_msgSend_214(this.pointer, _sel_appleEventClassCode); - } - - int get appleEventCode { - return _objc_msgSend_214(this.pointer, _sel_appleEventCode); - } - - NSString get commandClassName { - final _ret = _objc_msgSend_21(this.pointer, _sel_commandClassName); - return NSString._(_ret, retain: true, release: true); + obj.pointer, _sel_isKindOfClass_, _class_NSDateComponents); } - NSString? get returnType { - final _ret = _objc_msgSend_44(this.pointer, _sel_returnType); + NSCalendar? get calendar { + final _ret = _objc_msgSend_130(this.pointer, _sel_calendar); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); - } - - int get appleEventCodeForReturnType { - return _objc_msgSend_214(this.pointer, _sel_appleEventCodeForReturnType); + : NSCalendar.castFromPointer(_ret, retain: true, release: true); } - NSArray get argumentNames { - final _ret = _objc_msgSend_85(this.pointer, _sel_argumentNames); - return NSArray._(_ret, retain: true, release: true); + set calendar(NSCalendar? value) { + return _objc_msgSend_131( + this.pointer, _sel_setCalendar_, value?.pointer ?? ffi.nullptr); } - NSString? typeForArgumentWithName_(NSString argumentName) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_typeForArgumentWithName_, argumentName.pointer); + NSTimeZone? get timeZone { + final _ret = _objc_msgSend_132(this.pointer, _sel_timeZone); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); - } - - int appleEventCodeForArgumentWithName_(NSString argumentName) { - return _objc_msgSend_629(this.pointer, - _sel_appleEventCodeForArgumentWithName_, argumentName.pointer); - } - - bool isOptionalArgumentWithName_(NSString argumentName) { - return _objc_msgSend_64( - this.pointer, _sel_isOptionalArgumentWithName_, argumentName.pointer); - } - - NSScriptCommand createCommandInstance() { - final _ret = _objc_msgSend_639(this.pointer, _sel_createCommandInstance); - return NSScriptCommand._(_ret, retain: true, release: true); - } - - NSScriptCommand createCommandInstanceWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_640( - this.pointer, _sel_createCommandInstanceWithZone_, zone); - return NSScriptCommand._(_ret, retain: true, release: true); - } - - static NSScriptCommandDescription new1() { - final _ret = _objc_msgSend_2(_class_NSScriptCommandDescription, _sel_new); - return NSScriptCommandDescription._(_ret, retain: false, release: true); - } - - static NSScriptCommandDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSScriptCommandDescription, _sel_allocWithZone_, zone); - return NSScriptCommandDescription._(_ret, retain: false, release: true); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static NSScriptCommandDescription alloc() { - final _ret = _objc_msgSend_2(_class_NSScriptCommandDescription, _sel_alloc); - return NSScriptCommandDescription._(_ret, retain: false, release: true); + set timeZone(NSTimeZone? value) { + return _objc_msgSend_133( + this.pointer, _sel_setTimeZone_, value?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSScriptCommandDescription, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + int get era { + return _objc_msgSend_114(this.pointer, _sel_era); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSScriptCommandDescription, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + set era(int value) { + return _objc_msgSend_134(this.pointer, _sel_setEra_, value); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12(_class_NSScriptCommandDescription, - _sel_accessInstanceVariablesDirectly); + int get year { + return _objc_msgSend_114(this.pointer, _sel_year); } - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSScriptCommandDescription, _sel_useStoredAccessor); + set year(int value) { + return _objc_msgSend_134(this.pointer, _sel_setYear_, value); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSScriptCommandDescription, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + int get month { + return _objc_msgSend_114(this.pointer, _sel_month); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSScriptCommandDescription, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + set month(int value) { + return _objc_msgSend_134(this.pointer, _sel_setMonth_, value); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSScriptCommandDescription, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + int get day { + return _objc_msgSend_114(this.pointer, _sel_day); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSScriptCommandDescription, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + set day(int value) { + return _objc_msgSend_134(this.pointer, _sel_setDay_, value); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSScriptCommandDescription, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + int get hour { + return _objc_msgSend_114(this.pointer, _sel_hour); } -} -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_629 = 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:"); - -class NSScriptCommand extends NSObject { - NSScriptCommand._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSScriptCommand] that points to the same underlying object as [other]. - static NSScriptCommand castFrom(T other) { - return NSScriptCommand._(other.pointer, retain: true, release: true); + set hour(int value) { + return _objc_msgSend_134(this.pointer, _sel_setHour_, value); } - /// Returns a [NSScriptCommand] that wraps the given raw object pointer. - static NSScriptCommand castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSScriptCommand._(other, retain: retain, release: release); + int get minute { + return _objc_msgSend_114(this.pointer, _sel_minute); } - /// Returns whether [obj] is an instance of [NSScriptCommand]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSScriptCommand); + set minute(int value) { + return _objc_msgSend_134(this.pointer, _sel_setMinute_, value); } - NSScriptCommand initWithCommandDescription_( - NSScriptCommandDescription commandDef) { - final _ret = _objc_msgSend_630( - this.pointer, _sel_initWithCommandDescription_, commandDef.pointer); - return NSScriptCommand._(_ret, retain: true, release: true); + int get second { + return _objc_msgSend_114(this.pointer, _sel_second); } - NSScriptCommand? initWithCoder_(NSCoder inCoder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, inCoder.pointer); - return _ret.address == 0 - ? null - : NSScriptCommand._(_ret, retain: true, release: true); + set second(int value) { + return _objc_msgSend_134(this.pointer, _sel_setSecond_, value); } - NSScriptCommandDescription get commandDescription { - final _ret = _objc_msgSend_631(this.pointer, _sel_commandDescription); - return NSScriptCommandDescription._(_ret, retain: true, release: true); + int get nanosecond { + return _objc_msgSend_114(this.pointer, _sel_nanosecond); } - NSObject? get directParameter { - final _ret = _objc_msgSend_17(this.pointer, _sel_directParameter); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + set nanosecond(int value) { + return _objc_msgSend_134(this.pointer, _sel_setNanosecond_, value); } - set directParameter(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDirectParameter_, value?.pointer ?? ffi.nullptr); + int get weekday { + return _objc_msgSend_114(this.pointer, _sel_weekday); } - NSScriptObjectSpecifier? get receiversSpecifier { - final _ret = _objc_msgSend_632(this.pointer, _sel_receiversSpecifier); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, retain: true, release: true); + set weekday(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekday_, value); } - set receiversSpecifier(NSScriptObjectSpecifier? value) { - return _objc_msgSend_633(this.pointer, _sel_setReceiversSpecifier_, - value?.pointer ?? ffi.nullptr); + int get weekdayOrdinal { + return _objc_msgSend_114(this.pointer, _sel_weekdayOrdinal); } - NSObject? get evaluatedReceivers { - final _ret = _objc_msgSend_17(this.pointer, _sel_evaluatedReceivers); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + set weekdayOrdinal(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekdayOrdinal_, value); } - NSDictionary? get arguments { - final _ret = _objc_msgSend_390(this.pointer, _sel_arguments); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + int get quarter { + return _objc_msgSend_114(this.pointer, _sel_quarter); } - set arguments(NSDictionary? value) { - return _objc_msgSend_634( - this.pointer, _sel_setArguments_, value?.pointer ?? ffi.nullptr); + set quarter(int value) { + return _objc_msgSend_134(this.pointer, _sel_setQuarter_, value); } - NSDictionary? get evaluatedArguments { - final _ret = _objc_msgSend_390(this.pointer, _sel_evaluatedArguments); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + int get weekOfMonth { + return _objc_msgSend_114(this.pointer, _sel_weekOfMonth); } - bool get wellFormed { - return _objc_msgSend_12(this.pointer, _sel_isWellFormed); + set weekOfMonth(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekOfMonth_, value); } - NSObject? performDefaultImplementation() { - final _ret = - _objc_msgSend_17(this.pointer, _sel_performDefaultImplementation); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + int get weekOfYear { + return _objc_msgSend_114(this.pointer, _sel_weekOfYear); } - NSObject? executeCommand() { - final _ret = _objc_msgSend_17(this.pointer, _sel_executeCommand); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + set weekOfYear(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekOfYear_, value); } - int get scriptErrorNumber { - return _objc_msgSend_83(this.pointer, _sel_scriptErrorNumber); + int get yearForWeekOfYear { + return _objc_msgSend_114(this.pointer, _sel_yearForWeekOfYear); } - set scriptErrorNumber(int value) { - return _objc_msgSend_635(this.pointer, _sel_setScriptErrorNumber_, value); + set yearForWeekOfYear(int value) { + return _objc_msgSend_134(this.pointer, _sel_setYearForWeekOfYear_, value); } - NSAppleEventDescriptor? get scriptErrorOffendingObjectDescriptor { - final _ret = _objc_msgSend_636( - this.pointer, _sel_scriptErrorOffendingObjectDescriptor); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); + bool get leapMonth { + return _objc_msgSend_7(this.pointer, _sel_isLeapMonth); } - set scriptErrorOffendingObjectDescriptor(NSAppleEventDescriptor? value) { - return _objc_msgSend_637( - this.pointer, - _sel_setScriptErrorOffendingObjectDescriptor_, - value?.pointer ?? ffi.nullptr); + set leapMonth(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLeapMonth_, value); } - NSAppleEventDescriptor? get scriptErrorExpectedTypeDescriptor { - final _ret = - _objc_msgSend_636(this.pointer, _sel_scriptErrorExpectedTypeDescriptor); + objc.NSDate? get date { + final _ret = _objc_msgSend_116(this.pointer, _sel_date); return _ret.address == 0 ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - set scriptErrorExpectedTypeDescriptor(NSAppleEventDescriptor? value) { - return _objc_msgSend_637( - this.pointer, - _sel_setScriptErrorExpectedTypeDescriptor_, - value?.pointer ?? ffi.nullptr); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSString? get scriptErrorString { - final _ret = _objc_msgSend_44(this.pointer, _sel_scriptErrorString); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + int week() { + return _objc_msgSend_114(this.pointer, _sel_week); } - set scriptErrorString(NSString? value) { - return _objc_msgSend_545(this.pointer, _sel_setScriptErrorString_, - value?.pointer ?? ffi.nullptr); + void setWeek_(int v) { + _objc_msgSend_135(this.pointer, _sel_setWeek_, v); } - static NSScriptCommand? currentCommand() { - final _ret = _objc_msgSend_638(_class_NSScriptCommand, _sel_currentCommand); - return _ret.address == 0 - ? null - : NSScriptCommand._(_ret, retain: true, release: true); + void setValue_forComponent_(int value, int unit) { + _objc_msgSend_136(this.pointer, _sel_setValue_forComponent_, value, unit); } - NSAppleEventDescriptor? get appleEvent { - final _ret = _objc_msgSend_636(this.pointer, _sel_appleEvent); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); + int valueForComponent_(int unit) { + return _objc_msgSend_137(this.pointer, _sel_valueForComponent_, unit); } - void suspendExecution() { - _objc_msgSend_1(this.pointer, _sel_suspendExecution); + bool get validDate { + return _objc_msgSend_7(this.pointer, _sel_isValidDate); } - void resumeExecutionWithResult_(NSObject? result) { - _objc_msgSend_289(this.pointer, _sel_resumeExecutionWithResult_, - result?.pointer ?? ffi.nullptr); + bool isValidDateInCalendar_(NSCalendar calendar) { + return _objc_msgSend_138( + this.pointer, _sel_isValidDateInCalendar_, calendar.pointer); } @override - NSScriptCommand init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSScriptCommand._(_ret, retain: true, release: true); + NSDateComponents init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - static NSScriptCommand new1() { - final _ret = _objc_msgSend_2(_class_NSScriptCommand, _sel_new); - return NSScriptCommand._(_ret, retain: false, release: true); + static NSDateComponents new1() { + final _ret = _objc_msgSend_40(_class_NSDateComponents, _sel_new); + return NSDateComponents.castFromPointer(_ret, retain: false, release: true); } - static NSScriptCommand allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSDateComponents allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSScriptCommand, _sel_allocWithZone_, zone); - return NSScriptCommand._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSDateComponents, _sel_allocWithZone_, zone); + return NSDateComponents.castFromPointer(_ret, retain: false, release: true); } - static NSScriptCommand alloc() { - final _ret = _objc_msgSend_2(_class_NSScriptCommand, _sel_alloc); - return NSScriptCommand._(_ret, retain: false, release: true); + static NSDateComponents alloc() { + final _ret = _objc_msgSend_40(_class_NSDateComponents, _sel_alloc); + return NSDateComponents.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSScriptCommand, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSDateComponents, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSScriptCommand, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSDateComponents, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSScriptCommand, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSDateComponents, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSScriptCommand, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSDateComponents, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSScriptCommand, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSDateComponents, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSScriptCommand, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSDateComponents, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSScriptCommand, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSDateComponents, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSScriptCommand, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSDateComponents, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSScriptCommand, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSDateComponents, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSScriptCommand = objc.getClass("NSScriptCommand"); -late final _sel_initWithCommandDescription_ = - objc.registerName("initWithCommandDescription:"); -final _objc_msgSend_630 = 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_631 = objc.msgSendPointer +late final _class_NSDateComponents = objc.getClass("NSDateComponents"); +late final _sel_calendar = objc.registerName("calendar"); +final _objc_msgSend_130 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -29422,10 +5831,18 @@ final _objc_msgSend_631 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_directParameter = objc.registerName("directParameter"); -late final _sel_setDirectParameter_ = objc.registerName("setDirectParameter:"); -late final _sel_receiversSpecifier = objc.registerName("receiversSpecifier"); -final _objc_msgSend_632 = objc.msgSendPointer +late final _sel_setCalendar_ = objc.registerName("setCalendar:"); +final _objc_msgSend_131 = 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_132 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -29433,9 +5850,7 @@ final _objc_msgSend_632 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setReceiversSpecifier_ = - objc.registerName("setReceiversSpecifier:"); -final _objc_msgSend_633 = objc.msgSendPointer +final _objc_msgSend_133 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -29445,28 +5860,49 @@ final _objc_msgSend_633 = objc.msgSendPointer .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_evaluatedReceivers = objc.registerName("evaluatedReceivers"); -late final _sel_arguments = objc.registerName("arguments"); -late final _sel_setArguments_ = objc.registerName("setArguments:"); -final _objc_msgSend_634 = objc.msgSendPointer +late final _sel_era = objc.registerName("era"); +late final _sel_setEra_ = objc.registerName("setEra:"); +final _objc_msgSend_134 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -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:"); -final _objc_msgSend_635 = objc.msgSendPointer + 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_135 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, @@ -29474,249 +5910,520 @@ final _objc_msgSend_635 = objc.msgSendPointer .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); -late final _sel_scriptErrorOffendingObjectDescriptor = - objc.registerName("scriptErrorOffendingObjectDescriptor"); -final _objc_msgSend_636 = objc.msgSendPointer +late final _sel_setValue_forComponent_ = + objc.registerName("setValue:forComponent:"); +final _objc_msgSend_136 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Long, ffi.Int32)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setScriptErrorOffendingObjectDescriptor_ = - objc.registerName("setScriptErrorOffendingObjectDescriptor:"); -final _objc_msgSend_637 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_valueForComponent_ = objc.registerName("valueForComponent:"); +final _objc_msgSend_137 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_138 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, + bool 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_638 = objc.msgSendPointer +late final _sel_dateFromComponents_ = objc.registerName("dateFromComponents:"); +final _objc_msgSend_139 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + 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_140 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() .asFunction< ffi.Pointer 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_639 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +abstract class NSCalendarOptions { + static const int NSCalendarWrapComponents = 1; + static const int NSCalendarMatchStrictly = 2; + static const int NSCalendarSearchBackwards = 4; + static const int NSCalendarMatchPreviousTimePreservingSmallerUnits = 256; + static const int NSCalendarMatchNextTimePreservingSmallerUnits = 512; + static const int NSCalendarMatchNextTime = 1024; + static const int NSCalendarMatchFirst = 4096; + static const int NSCalendarMatchLast = 8192; +} + +late final _sel_dateByAddingComponents_toDate_options_ = + objc.registerName("dateByAddingComponents:toDate:options:"); +final _objc_msgSend_141 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_createCommandInstanceWithZone_ = - objc.registerName("createCommandInstanceWithZone:"); -final _objc_msgSend_640 = objc.msgSendPointer + 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_142 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .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_143 = 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_144 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>>() + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>(); -late final _sel_supportsCommand_ = objc.registerName("supportsCommand:"); -final _objc_msgSend_641 = 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_145 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long)>>() .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_selectorForCommand_ = objc.registerName("selectorForCommand:"); -final _objc_msgSend_642 = objc.msgSendPointer + 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_146 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, + 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_643 = objc.msgSendPointer +late final _sel_componentsInTimeZone_fromDate_ = + objc.registerName("componentsInTimeZone:fromDate:"); +final _objc_msgSend_147 = 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)>(); -late final _sel_appleEventCodeForKey_ = - objc.registerName("appleEventCodeForKey:"); -late final _sel_keyWithAppleEventCode_ = - objc.registerName("keyWithAppleEventCode:"); -final _objc_msgSend_644 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +abstract class NSComparisonResult { + static const int NSOrderedAscending = -1; + static const int NSOrderedSame = 0; + static const int NSOrderedDescending = 1; +} + +late final _sel_compareDate_toDate_toUnitGranularity_ = + objc.registerName("compareDate:toDate:toUnitGranularity:"); +final _objc_msgSend_148 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>() + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() .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:"); -late final _sel_initWithContainerClassDescription_containerSpecifier_key_ = objc - .registerName("initWithContainerClassDescription:containerSpecifier:key:"); -final _objc_msgSend_645 = 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_149 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32)>>() .asFunction< - instancetype Function( + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, + int)>(); +late final _sel_isDate_inSameDayAsDate_ = + objc.registerName("isDate:inSameDayAsDate:"); +final _objc_msgSend_150 = 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_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:"); -final _objc_msgSend_646 = objc.msgSendPointer +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_151 = 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_containerClassDescription = - objc.registerName("containerClassDescription"); -late final _sel_setContainerClassDescription_ = - objc.registerName("setContainerClassDescription:"); -final _objc_msgSend_647 = 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_152 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Int32, 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_648 = objc.msgSendPointer + 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_153 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Int32)>>() .asFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + int, 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"); -late final _sel_scriptingValueForSpecifier_ = - objc.registerName("scriptingValueForSpecifier:"); -final _objc_msgSend_649 = objc.msgSendPointer + ffi.Pointer, + int)>(); +late final _sel_dateByAddingUnit_value_toDate_options_ = + objc.registerName("dateByAddingUnit:value:toDate:options:"); +final _objc_msgSend_154 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32, + ffi.Long, + ffi.Pointer, + ffi.Int32)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_scriptingProperties = objc.registerName("scriptingProperties"); -late final _sel_setScriptingProperties_ = - objc.registerName("setScriptingProperties:"); -late final _sel_copyScriptingValue_forKey_withProperties_ = - objc.registerName("copyScriptingValue:forKey:withProperties:"); -final _objc_msgSend_650 = objc.msgSendPointer + 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); +final _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry = , bool, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( + void Function(ffi.Pointer, bool, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[ + block.ref.target.address]!(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); + + /// 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); + } + + /// 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.newBlock( + _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; + + /// 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.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( + (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; + + /// 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_NSDate_bool_bool.listener( + void Function(objc.NSDate?, bool, ffi.Pointer) fn) + : this._(objc.newBlock( + (_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(), + _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( + (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.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + 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); +} + +late final _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_ = + objc.registerName( + "enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:"); +final _objc_msgSend_155 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_ = - objc.registerName( - "newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:"); -final _objc_msgSend_651 = objc.msgSendPointer + int, + ffi.Pointer)>(); +late final _sel_nextDateAfterDate_matchingComponents_options_ = + objc.registerName("nextDateAfterDate:matchingComponents:options:"); +final _objc_msgSend_156 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -29724,3537 +6431,2197 @@ final _objc_msgSend_651 = objc.msgSendPointer ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_classCode = objc.registerName("classCode"); -late final _sel_valueAtIndex_inPropertyWithKey_ = - objc.registerName("valueAtIndex:inPropertyWithKey:"); -final _objc_msgSend_652 = objc.msgSendPointer + int)>(); +late final _sel_nextDateAfterDate_matchingUnit_value_options_ = + objc.registerName("nextDateAfterDate:matchingUnit:value:options:"); +final _objc_msgSend_157 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Int32, + ffi.Long, + ffi.Int32)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, - ffi.Pointer)>(); -late final _sel_valueWithName_inPropertyWithKey_ = - objc.registerName("valueWithName:inPropertyWithKey:"); -late final _sel_valueWithUniqueID_inPropertyWithKey_ = - objc.registerName("valueWithUniqueID:inPropertyWithKey:"); -late final _sel_insertValue_atIndex_inPropertyWithKey_ = - objc.registerName("insertValue:atIndex:inPropertyWithKey:"); -final _objc_msgSend_653 = objc.msgSendPointer + int, + int)>(); +late final _sel_nextDateAfterDate_matchingHour_minute_second_options_ = + objc.registerName("nextDateAfterDate:matchingHour:minute:second:options:"); +final _objc_msgSend_158 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>() + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Int32)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); -late final _sel_removeValueAtIndex_fromPropertyWithKey_ = - objc.registerName("removeValueAtIndex:fromPropertyWithKey:"); -final _objc_msgSend_654 = objc.msgSendPointer + 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_159 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>() + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Pointer, + ffi.Int32)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, int, - ffi.Pointer)>(); -late final _sel_replaceValueAtIndex_inPropertyWithKey_withValue_ = - objc.registerName("replaceValueAtIndex:inPropertyWithKey:withValue:"); -final _objc_msgSend_655 = objc.msgSendPointer + int, + int, + ffi.Pointer, + int)>(); +late final _sel_date_matchesComponents_ = + objc.registerName("date:matchesComponents:"); +final _objc_msgSend_160 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( + bool Function( ffi.Pointer, ffi.Pointer, - int, ffi.Pointer, ffi.Pointer)>(); -late final _sel_insertValue_inPropertyWithKey_ = - objc.registerName("insertValue:inPropertyWithKey:"); -final _objc_msgSend_656 = objc.msgSendPointer +final _objc_msgSend_161 = 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_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_162 = 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_defaultDate = objc.registerName("defaultDate"); +late final _sel_setDefaultDate_ = objc.registerName("setDefaultDate:"); +late final _sel_setEraSymbols_ = objc.registerName("setEraSymbols:"); +final _objc_msgSend_163 = 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)>(); -late final _sel_coerceValue_forKey_ = objc.registerName("coerceValue:forKey:"); -final _objc_msgSend_657 = objc.msgSendPointer + 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_164 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_objectSpecifier = objc.registerName("objectSpecifier"); -late final _sel_indicesOfObjectsByEvaluatingObjectSpecifier_ = - objc.registerName("indicesOfObjectsByEvaluatingObjectSpecifier:"); -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_isEqualTo_ = objc.registerName("isEqualTo:"); -late final _sel_isLessThanOrEqualTo_ = - objc.registerName("isLessThanOrEqualTo:"); -late final _sel_isLessThan_ = objc.registerName("isLessThan:"); -late final _sel_isGreaterThanOrEqualTo_ = - objc.registerName("isGreaterThanOrEqualTo:"); -late final _sel_isGreaterThan_ = objc.registerName("isGreaterThan:"); -late final _sel_isNotEqualTo_ = objc.registerName("isNotEqualTo:"); -late final _sel_doesContain_ = objc.registerName("doesContain:"); -late final _sel_isLike_ = objc.registerName("isLike:"); -late final _sel_isCaseInsensitiveLike_ = - objc.registerName("isCaseInsensitiveLike:"); -late final _sel_scriptingIsEqualTo_ = objc.registerName("scriptingIsEqualTo:"); -late final _sel_scriptingIsLessThanOrEqualTo_ = - objc.registerName("scriptingIsLessThanOrEqualTo:"); -late final _sel_scriptingIsLessThan_ = - objc.registerName("scriptingIsLessThan:"); -late final _sel_scriptingIsGreaterThanOrEqualTo_ = - objc.registerName("scriptingIsGreaterThanOrEqualTo:"); -late final _sel_scriptingIsGreaterThan_ = - objc.registerName("scriptingIsGreaterThan:"); -late final _sel_scriptingBeginsWith_ = - objc.registerName("scriptingBeginsWith:"); -late final _sel_scriptingEndsWith_ = objc.registerName("scriptingEndsWith:"); -late final _sel_scriptingContains_ = objc.registerName("scriptingContains:"); - -class NSItemProvider extends NSObject { - NSItemProvider._(ffi.Pointer pointer, + bool)>(); +late final _sel_allowsNaturalLanguage = + objc.registerName("allowsNaturalLanguage"); + +class NSNumberFormatter extends NSFormatter { + NSNumberFormatter._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSItemProvider] that points to the same underlying object as [other]. - static NSItemProvider castFrom(T other) { - return NSItemProvider._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSNumberFormatter] that points to the same underlying object as [other]. + NSNumberFormatter.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSItemProvider] that wraps the given raw object pointer. - static NSItemProvider castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSItemProvider._(other, retain: retain, release: release); - } + /// 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); - /// Returns whether [obj] is an instance of [NSItemProvider]. + /// Returns whether [obj] is an instance of [NSNumberFormatter]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSItemProvider); - } - - @override - NSItemProvider init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSItemProvider._(_ret, retain: true, release: true); - } - - void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( - NSString typeIdentifier, - int visibility, - ObjCBlock_NSProgress_ffiVoidNSDataNSError loadHandler) { - _objc_msgSend_673( - this.pointer, - _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_, - typeIdentifier.pointer, - visibility, - loadHandler.pointer); - } - - void - registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_( - NSString typeIdentifier, - int fileOptions, - int visibility, - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError loadHandler) { - _objc_msgSend_674( - this.pointer, - _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_, - typeIdentifier.pointer, - fileOptions, - visibility, - loadHandler.pointer); - } - - NSArray get registeredTypeIdentifiers { - final _ret = _objc_msgSend_85(this.pointer, _sel_registeredTypeIdentifiers); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { - final _ret = _objc_msgSend_675(this.pointer, - _sel_registeredTypeIdentifiersWithFileOptions_, fileOptions); - return NSArray._(_ret, retain: true, release: true); - } - - bool hasItemConformingToTypeIdentifier_(NSString typeIdentifier) { - return _objc_msgSend_64(this.pointer, - _sel_hasItemConformingToTypeIdentifier_, typeIdentifier.pointer); - } - - bool hasRepresentationConformingToTypeIdentifier_fileOptions_( - NSString typeIdentifier, int fileOptions) { - return _objc_msgSend_676( - this.pointer, - _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_, - typeIdentifier.pointer, - fileOptions); + obj.pointer, _sel_isKindOfClass_, _class_NSNumberFormatter); } - NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_NSData_NSError completionHandler) { - final _ret = _objc_msgSend_677( - this.pointer, - _sel_loadDataRepresentationForTypeIdentifier_completionHandler_, - typeIdentifier.pointer, - completionHandler.pointer); - return NSProgress._(_ret, retain: true, release: true); + int get formattingContext { + return _objc_msgSend_89(this.pointer, _sel_formattingContext); } - NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_NSURL_NSError completionHandler) { - final _ret = _objc_msgSend_678( - this.pointer, - _sel_loadFileRepresentationForTypeIdentifier_completionHandler_, - typeIdentifier.pointer, - completionHandler.pointer); - return NSProgress._(_ret, retain: true, release: true); + set formattingContext(int value) { + return _objc_msgSend_90(this.pointer, _sel_setFormattingContext_, value); } - NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_NSURL_bool_NSError completionHandler) { - final _ret = _objc_msgSend_679( + bool getObjectValue_forString_range_error_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer<_NSRange> rangep, + ffi.Pointer> error) { + return _objc_msgSend_91( this.pointer, - _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_, - typeIdentifier.pointer, - completionHandler.pointer); - return NSProgress._(_ret, retain: true, release: true); - } - - NSString? get suggestedName { - final _ret = _objc_msgSend_44(this.pointer, _sel_suggestedName); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set suggestedName(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setSuggestedName_, value?.pointer ?? ffi.nullptr); + _sel_getObjectValue_forString_range_error_, + obj, + string.pointer, + rangep, + error); } - NSItemProvider initWithObject_(NSObject object) { + objc.NSString? stringFromNumber_(objc.NSNumber number) { final _ret = - _objc_msgSend_124(this.pointer, _sel_initWithObject_, object.pointer); - return NSItemProvider._(_ret, retain: true, release: true); - } - - void registerObject_visibility_(NSObject object, int visibility) { - _objc_msgSend_680(this.pointer, _sel_registerObject_visibility_, - object.pointer, visibility); - } - - void registerObjectOfClass_visibility_loadHandler_( - NSObject aClass, - int visibility, - ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError loadHandler) { - _objc_msgSend_681( - this.pointer, - _sel_registerObjectOfClass_visibility_loadHandler_, - aClass.pointer, - visibility, - loadHandler.pointer); - } - - bool canLoadObjectOfClass_(NSObject aClass) { - return _objc_msgSend_0( - this.pointer, _sel_canLoadObjectOfClass_, aClass.pointer); - } - - NSProgress loadObjectOfClass_completionHandler_(NSObject aClass, - ObjCBlock_ffiVoid_objcObjCObject_NSError completionHandler) { - final _ret = _objc_msgSend_682( - this.pointer, - _sel_loadObjectOfClass_completionHandler_, - aClass.pointer, - completionHandler.pointer); - return NSProgress._(_ret, retain: true, release: true); - } - - NSItemProvider initWithItem_typeIdentifier_( - NSObject? item, NSString? typeIdentifier) { - final _ret = _objc_msgSend_683( - this.pointer, - _sel_initWithItem_typeIdentifier_, - item?.pointer ?? ffi.nullptr, - typeIdentifier?.pointer ?? ffi.nullptr); - return NSItemProvider._(_ret, retain: true, release: true); - } - - NSItemProvider? initWithContentsOfURL_(NSURL fileURL) { - final _ret = _objc_msgSend_277( - this.pointer, _sel_initWithContentsOfURL_, fileURL.pointer); + _objc_msgSend_165(this.pointer, _sel_stringFromNumber_, number.pointer); return _ret.address == 0 ? null - : NSItemProvider._(_ret, retain: true, release: true); - } - - void registerItemForTypeIdentifier_loadHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary - loadHandler) { - _objc_msgSend_684( - this.pointer, - _sel_registerItemForTypeIdentifier_loadHandler_, - typeIdentifier.pointer, - loadHandler.pointer); - } - - void loadItemForTypeIdentifier_options_completionHandler_( - NSString typeIdentifier, - NSDictionary? options, - ObjCBlock_ffiVoid_objcObjCObject_NSError1? completionHandler) { - _objc_msgSend_685( - this.pointer, - _sel_loadItemForTypeIdentifier_options_completionHandler_, - typeIdentifier.pointer, - options?.pointer ?? ffi.nullptr, - completionHandler?.pointer ?? ffi.nullptr); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary? - get previewImageHandler { - final _ret = _objc_msgSend_686(this.pointer, _sel_previewImageHandler); + objc.NSNumber? numberFromString_(objc.NSString string) { + final _ret = + _objc_msgSend_166(this.pointer, _sel_numberFromString_, string.pointer); return _ret.address == 0 ? null - : ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary - ._(_ret, retain: true, release: true); + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - set previewImageHandler( - ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary? - value) { - return _objc_msgSend_687(this.pointer, _sel_setPreviewImageHandler_, - value?.pointer ?? ffi.nullptr); + static objc.NSString localizedStringFromNumber_numberStyle_( + objc.NSNumber num, int nstyle) { + final _ret = _objc_msgSend_167(_class_NSNumberFormatter, + _sel_localizedStringFromNumber_numberStyle_, num.pointer, nstyle); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void loadPreviewImageWithOptions_completionHandler_(NSDictionary options, - ObjCBlock_ffiVoid_objcObjCObject_NSError1 completionHandler) { - _objc_msgSend_688( - this.pointer, - _sel_loadPreviewImageWithOptions_completionHandler_, - options.pointer, - completionHandler.pointer); + static int defaultFormatterBehavior() { + return _objc_msgSend_168( + _class_NSNumberFormatter, _sel_defaultFormatterBehavior); } - static NSItemProvider new1() { - final _ret = _objc_msgSend_2(_class_NSItemProvider, _sel_new); - return NSItemProvider._(_ret, retain: false, release: true); + static void setDefaultFormatterBehavior_(int behavior) { + _objc_msgSend_169( + _class_NSNumberFormatter, _sel_setDefaultFormatterBehavior_, behavior); } - static NSItemProvider allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSItemProvider, _sel_allocWithZone_, zone); - return NSItemProvider._(_ret, retain: false, release: true); + int get numberStyle { + return _objc_msgSend_170(this.pointer, _sel_numberStyle); } - static NSItemProvider alloc() { - final _ret = _objc_msgSend_2(_class_NSItemProvider, _sel_alloc); - return NSItemProvider._(_ret, retain: false, release: true); + set numberStyle(int value) { + return _objc_msgSend_171(this.pointer, _sel_setNumberStyle_, value); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSItemProvider, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + objc.NSLocale get locale { + final _ret = _objc_msgSend_102(this.pointer, _sel_locale); + return objc.NSLocale.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSItemProvider, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + set locale(objc.NSLocale value) { + return _objc_msgSend_103(this.pointer, _sel_setLocale_, value.pointer); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSItemProvider, _sel_accessInstanceVariablesDirectly); + bool get generatesDecimalNumbers { + return _objc_msgSend_7(this.pointer, _sel_generatesDecimalNumbers); } - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSItemProvider, _sel_useStoredAccessor); + set generatesDecimalNumbers(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setGeneratesDecimalNumbers_, value); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSItemProvider, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + int get formatterBehavior { + return _objc_msgSend_168(this.pointer, _sel_formatterBehavior); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSItemProvider, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + set formatterBehavior(int value) { + return _objc_msgSend_172(this.pointer, _sel_setFormatterBehavior_, value); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSItemProvider, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + objc.NSString get negativeFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativeFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSItemProvider, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + set negativeFormat(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativeFormat_, value.pointer); } - static NSObject classForKeyedUnarchiver() { + objc.NSDictionary? get textAttributesForNegativeValues { final _ret = - _objc_msgSend_2(_class_NSItemProvider, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSItemProvider = objc.getClass("NSItemProvider"); - -abstract class NSItemProviderRepresentationVisibility { - static const int NSItemProviderRepresentationVisibilityAll = 0; - static const int NSItemProviderRepresentationVisibilityTeam = 1; - static const int NSItemProviderRepresentationVisibilityGroup = 2; - static const int NSItemProviderRepresentationVisibilityOwnProcess = 3; -} - -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_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); -final _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry = - Function(ffi.Pointer)>{}; -int _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure( - ffi.Pointer Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex; - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0) => - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[ - block.ref.target.address]!(arg0); - -class ObjCBlock_NSProgress_ffiVoidNSDataNSError extends objc.ObjCBlockBase { - ObjCBlock_NSProgress_ffiVoidNSDataNSError._( - 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_NSProgress_ffiVoidNSDataNSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_NSProgress_ffiVoidNSDataNSError._(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_NSProgress_ffiVoidNSDataNSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_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_NSProgress_ffiVoidNSDataNSError.fromFunction( - NSProgress? Function(ObjCBlock_ffiVoid_NSData_NSError) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline) - .cast(), - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure( - (ffi.Pointer arg0) => - fn(ObjCBlock_ffiVoid_NSData_NSError._(arg0, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr))); - static ffi.Pointer? _dartFuncTrampoline; - - NSProgress? call(ObjCBlock_ffiVoid_NSData_NSError 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 - : NSProgress._( - 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); -} - -class NSProgress extends NSObject { - NSProgress._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSProgress] that points to the same underlying object as [other]. - static NSProgress castFrom(T other) { - return NSProgress._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSProgress] that wraps the given raw object pointer. - static NSProgress castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProgress._(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); - } - - static NSProgress? currentProgress() { - final _ret = _objc_msgSend_659(_class_NSProgress, _sel_currentProgress); + _objc_msgSend_65(this.pointer, _sel_textAttributesForNegativeValues); return _ret.address == 0 ? null - : NSProgress._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSProgress progressWithTotalUnitCount_(int unitCount) { - final _ret = _objc_msgSend_660( - _class_NSProgress, _sel_progressWithTotalUnitCount_, unitCount); - return NSProgress._(_ret, retain: true, release: true); - } - - static NSProgress discreteProgressWithTotalUnitCount_(int unitCount) { - final _ret = _objc_msgSend_660( - _class_NSProgress, _sel_discreteProgressWithTotalUnitCount_, unitCount); - return NSProgress._(_ret, retain: true, release: true); - } - - static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( - int unitCount, NSProgress parent, int portionOfParentTotalUnitCount) { - final _ret = _objc_msgSend_661( - _class_NSProgress, - _sel_progressWithTotalUnitCount_parent_pendingUnitCount_, - unitCount, - parent.pointer, - portionOfParentTotalUnitCount); - return NSProgress._(_ret, retain: true, release: true); - } - - NSProgress initWithParent_userInfo_( - NSProgress? parentProgressOrNil, NSObject? userInfoOrNil) { - final _ret = _objc_msgSend_662( - this.pointer, - _sel_initWithParent_userInfo_, - parentProgressOrNil?.pointer ?? ffi.nullptr, - userInfoOrNil?.pointer ?? ffi.nullptr); - return NSProgress._(_ret, retain: true, release: true); - } - - void becomeCurrentWithPendingUnitCount_(int unitCount) { - _objc_msgSend_663( - this.pointer, _sel_becomeCurrentWithPendingUnitCount_, unitCount); - } - - void performAsCurrentWithPendingUnitCount_usingBlock_( - int unitCount, ObjCBlock_ffiVoid work) { - _objc_msgSend_664( + set textAttributesForNegativeValues(objc.NSDictionary? value) { + return _objc_msgSend_173( this.pointer, - _sel_performAsCurrentWithPendingUnitCount_usingBlock_, - unitCount, - work.pointer); - } - - void resignCurrent() { - _objc_msgSend_1(this.pointer, _sel_resignCurrent); - } - - void addChild_withPendingUnitCount_(NSProgress child, int inUnitCount) { - _objc_msgSend_665(this.pointer, _sel_addChild_withPendingUnitCount_, - child.pointer, inUnitCount); - } - - int get totalUnitCount { - return _objc_msgSend_666(this.pointer, _sel_totalUnitCount); - } - - set totalUnitCount(int value) { - return _objc_msgSend_667(this.pointer, _sel_setTotalUnitCount_, value); - } - - int get completedUnitCount { - return _objc_msgSend_666(this.pointer, _sel_completedUnitCount); - } - - set completedUnitCount(int value) { - return _objc_msgSend_667(this.pointer, _sel_setCompletedUnitCount_, value); + _sel_setTextAttributesForNegativeValues_, + value?.pointer ?? ffi.nullptr); } - NSString get localizedDescription { - final _ret = _objc_msgSend_21(this.pointer, _sel_localizedDescription); - return NSString._(_ret, retain: true, release: true); + objc.NSString get positiveFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_positiveFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set localizedDescription(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setLocalizedDescription_, value.pointer); + set positiveFormat(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositiveFormat_, value.pointer); } - NSString get localizedAdditionalDescription { + objc.NSDictionary? get textAttributesForPositiveValues { final _ret = - _objc_msgSend_21(this.pointer, _sel_localizedAdditionalDescription); - return NSString._(_ret, retain: true, release: true); - } - - set localizedAdditionalDescription(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setLocalizedAdditionalDescription_, value.pointer); - } - - bool get cancellable { - return _objc_msgSend_12(this.pointer, _sel_isCancellable); - } - - set cancellable(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setCancellable_, value); - } - - bool get pausable { - return _objc_msgSend_12(this.pointer, _sel_isPausable); - } - - set pausable(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setPausable_, value); - } - - bool get cancelled { - return _objc_msgSend_12(this.pointer, _sel_isCancelled); - } - - bool get paused { - return _objc_msgSend_12(this.pointer, _sel_isPaused); - } - - ObjCBlock_ffiVoid? get cancellationHandler { - final _ret = _objc_msgSend_668(this.pointer, _sel_cancellationHandler); + _objc_msgSend_65(this.pointer, _sel_textAttributesForPositiveValues); return _ret.address == 0 ? null - : ObjCBlock_ffiVoid._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set cancellationHandler(ObjCBlock_ffiVoid? value) { - return _objc_msgSend_669(this.pointer, _sel_setCancellationHandler_, + set textAttributesForPositiveValues(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, + _sel_setTextAttributesForPositiveValues_, value?.pointer ?? ffi.nullptr); } - ObjCBlock_ffiVoid? get pausingHandler { - final _ret = _objc_msgSend_668(this.pointer, _sel_pausingHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid._(_ret, retain: true, release: true); + bool get allowsFloats { + return _objc_msgSend_7(this.pointer, _sel_allowsFloats); } - set pausingHandler(ObjCBlock_ffiVoid? value) { - return _objc_msgSend_669( - this.pointer, _sel_setPausingHandler_, value?.pointer ?? ffi.nullptr); + set allowsFloats(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setAllowsFloats_, value); } - ObjCBlock_ffiVoid? get resumingHandler { - final _ret = _objc_msgSend_668(this.pointer, _sel_resumingHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid._(_ret, retain: true, release: true); + objc.NSString get decimalSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_decimalSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set resumingHandler(ObjCBlock_ffiVoid? value) { - return _objc_msgSend_669( - this.pointer, _sel_setResumingHandler_, value?.pointer ?? ffi.nullptr); + set decimalSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setDecimalSeparator_, value.pointer); } - void setUserInfoObject_forKey_(NSObject? objectOrNil, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setUserInfoObject_forKey_, - objectOrNil?.pointer ?? ffi.nullptr, key.pointer); + bool get alwaysShowsDecimalSeparator { + return _objc_msgSend_7(this.pointer, _sel_alwaysShowsDecimalSeparator); } - bool get indeterminate { - return _objc_msgSend_12(this.pointer, _sel_isIndeterminate); + set alwaysShowsDecimalSeparator(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAlwaysShowsDecimalSeparator_, value); } - double get fractionCompleted { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_fractionCompleted) - : _objc_msgSend_165(this.pointer, _sel_fractionCompleted); + objc.NSString get currencyDecimalSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencyDecimalSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool get finished { - return _objc_msgSend_12(this.pointer, _sel_isFinished); + set currencyDecimalSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrencyDecimalSeparator_, value.pointer); } - void cancel() { - _objc_msgSend_1(this.pointer, _sel_cancel); + bool get usesGroupingSeparator { + return _objc_msgSend_7(this.pointer, _sel_usesGroupingSeparator); } - void pause() { - _objc_msgSend_1(this.pointer, _sel_pause); + set usesGroupingSeparator(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesGroupingSeparator_, value); } - void resume() { - _objc_msgSend_1(this.pointer, _sel_resume); + objc.NSString get groupingSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_groupingSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject get userInfo { - final _ret = _objc_msgSend_2(this.pointer, _sel_userInfo); - return NSObject._(_ret, retain: true, release: true); + set groupingSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setGroupingSeparator_, value.pointer); } - NSString? get kind { - final _ret = _objc_msgSend_44(this.pointer, _sel_kind); + objc.NSString? get zeroSymbol { + final _ret = _objc_msgSend_13(this.pointer, _sel_zeroSymbol); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set kind(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setKind_, value?.pointer ?? ffi.nullptr); + set zeroSymbol(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setZeroSymbol_, value?.pointer ?? ffi.nullptr); } - NSNumber? get estimatedTimeRemaining { - final _ret = _objc_msgSend_215(this.pointer, _sel_estimatedTimeRemaining); + objc.NSDictionary? get textAttributesForZero { + final _ret = _objc_msgSend_65(this.pointer, _sel_textAttributesForZero); return _ret.address == 0 ? null - : NSNumber._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set estimatedTimeRemaining(NSNumber? value) { - return _objc_msgSend_670(this.pointer, _sel_setEstimatedTimeRemaining_, + set textAttributesForZero(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setTextAttributesForZero_, value?.pointer ?? ffi.nullptr); } - NSNumber? get throughput { - final _ret = _objc_msgSend_215(this.pointer, _sel_throughput); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); + objc.NSString get nilSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_nilSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set throughput(NSNumber? value) { - return _objc_msgSend_670( - this.pointer, _sel_setThroughput_, value?.pointer ?? ffi.nullptr); + set nilSymbol(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setNilSymbol_, value.pointer); } - NSString? get fileOperationKind { - final _ret = _objc_msgSend_44(this.pointer, _sel_fileOperationKind); + objc.NSDictionary? get textAttributesForNil { + final _ret = _objc_msgSend_65(this.pointer, _sel_textAttributesForNil); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set fileOperationKind(NSString? value) { - return _objc_msgSend_545(this.pointer, _sel_setFileOperationKind_, + set textAttributesForNil(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setTextAttributesForNil_, value?.pointer ?? ffi.nullptr); } - NSURL? get fileURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_fileURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - set fileURL(NSURL? value) { - return _objc_msgSend_671( - this.pointer, _sel_setFileURL_, value?.pointer ?? ffi.nullptr); - } - - NSNumber? get fileTotalCount { - final _ret = _objc_msgSend_215(this.pointer, _sel_fileTotalCount); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); + objc.NSString get notANumberSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_notANumberSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set fileTotalCount(NSNumber? value) { - return _objc_msgSend_670( - this.pointer, _sel_setFileTotalCount_, value?.pointer ?? ffi.nullptr); + set notANumberSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNotANumberSymbol_, value.pointer); } - NSNumber? get fileCompletedCount { - final _ret = _objc_msgSend_215(this.pointer, _sel_fileCompletedCount); + objc.NSDictionary? get textAttributesForNotANumber { + final _ret = + _objc_msgSend_65(this.pointer, _sel_textAttributesForNotANumber); return _ret.address == 0 ? null - : NSNumber._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set fileCompletedCount(NSNumber? value) { - return _objc_msgSend_670(this.pointer, _sel_setFileCompletedCount_, + set textAttributesForNotANumber(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setTextAttributesForNotANumber_, value?.pointer ?? ffi.nullptr); } - void publish() { - _objc_msgSend_1(this.pointer, _sel_publish); - } - - void unpublish() { - _objc_msgSend_1(this.pointer, _sel_unpublish); - } - - static NSObject addSubscriberForFileURL_withPublishingHandler_( - NSURL url, ObjCBlock_ffiVoid_NSProgress publishingHandler) { - final _ret = _objc_msgSend_672( - _class_NSProgress, - _sel_addSubscriberForFileURL_withPublishingHandler_, - url.pointer, - publishingHandler.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static void removeSubscriber_(NSObject subscriber) { - _objc_msgSend_15( - _class_NSProgress, _sel_removeSubscriber_, subscriber.pointer); - } - - bool get old { - return _objc_msgSend_12(this.pointer, _sel_isOld); - } - - @override - NSProgress init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSProgress._(_ret, retain: true, release: true); - } - - static NSProgress new1() { - final _ret = _objc_msgSend_2(_class_NSProgress, _sel_new); - return NSProgress._(_ret, retain: false, release: true); + objc.NSString get positiveInfinitySymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_positiveInfinitySymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSProgress allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSProgress, _sel_allocWithZone_, zone); - return NSProgress._(_ret, retain: false, release: true); + set positiveInfinitySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositiveInfinitySymbol_, value.pointer); } - static NSProgress alloc() { - final _ret = _objc_msgSend_2(_class_NSProgress, _sel_alloc); - return NSProgress._(_ret, retain: false, release: true); + objc.NSDictionary? get textAttributesForPositiveInfinity { + final _ret = + _objc_msgSend_65(this.pointer, _sel_textAttributesForPositiveInfinity); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSProgress, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + set textAttributesForPositiveInfinity(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, + _sel_setTextAttributesForPositiveInfinity_, + value?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSProgress, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + objc.NSString get negativeInfinitySymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativeInfinitySymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSProgress, _sel_accessInstanceVariablesDirectly); + set negativeInfinitySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativeInfinitySymbol_, value.pointer); } - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSProgress, _sel_useStoredAccessor); + objc.NSDictionary? get textAttributesForNegativeInfinity { + final _ret = + _objc_msgSend_65(this.pointer, _sel_textAttributesForNegativeInfinity); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSProgress, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + set textAttributesForNegativeInfinity(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, + _sel_setTextAttributesForNegativeInfinity_, + value?.pointer ?? ffi.nullptr); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSProgress, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + objc.NSString get positivePrefix { + final _ret = _objc_msgSend_12(this.pointer, _sel_positivePrefix); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSProgress, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + set positivePrefix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositivePrefix_, value.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSProgress, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + objc.NSString get positiveSuffix { + final _ret = _objc_msgSend_12(this.pointer, _sel_positiveSuffix); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSProgress, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + set positiveSuffix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositiveSuffix_, value.pointer); } -} -late final _class_NSProgress = objc.getClass("NSProgress"); -late final _sel_currentProgress = objc.registerName("currentProgress"); -final _objc_msgSend_659 = 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_660 = 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_661 = 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)>(); -late final _sel_initWithParent_userInfo_ = - objc.registerName("initWithParent:userInfo:"); -final _objc_msgSend_662 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_becomeCurrentWithPendingUnitCount_ = - objc.registerName("becomeCurrentWithPendingUnitCount:"); -final _objc_msgSend_663 = 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_performAsCurrentWithPendingUnitCount_usingBlock_ = - objc.registerName("performAsCurrentWithPendingUnitCount:usingBlock:"); -final _objc_msgSend_664 = 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"); -late final _sel_addChild_withPendingUnitCount_ = - objc.registerName("addChild:withPendingUnitCount:"); -final _objc_msgSend_665 = 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_666 = 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_667 = 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_setLocalizedDescription_ = - objc.registerName("setLocalizedDescription:"); -late final _sel_localizedAdditionalDescription = - objc.registerName("localizedAdditionalDescription"); -late final _sel_setLocalizedAdditionalDescription_ = - objc.registerName("setLocalizedAdditionalDescription:"); -late final _sel_isCancellable = objc.registerName("isCancellable"); -late final _sel_setCancellable_ = objc.registerName("setCancellable:"); -late final _sel_isPausable = objc.registerName("isPausable"); -late final _sel_setPausable_ = objc.registerName("setPausable:"); -late final _sel_isPaused = objc.registerName("isPaused"); -late final _sel_cancellationHandler = objc.registerName("cancellationHandler"); -final _objc_msgSend_668 = 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_669 = 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:"); -late final _sel_isIndeterminate = objc.registerName("isIndeterminate"); -late final _sel_fractionCompleted = objc.registerName("fractionCompleted"); -late final _sel_pause = objc.registerName("pause"); -late final _sel_resume = objc.registerName("resume"); -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:"); -final _objc_msgSend_670 = 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"); -late final _sel_setFileURL_ = objc.registerName("setFileURL:"); -final _objc_msgSend_671 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_fileTotalCount = objc.registerName("fileTotalCount"); -late final _sel_setFileTotalCount_ = objc.registerName("setFileTotalCount:"); -late final _sel_fileCompletedCount = objc.registerName("fileCompletedCount"); -late final _sel_setFileCompletedCount_ = - objc.registerName("setFileCompletedCount:"); -late final _sel_publish = objc.registerName("publish"); -late final _sel_unpublish = objc.registerName("unpublish"); -ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer)>()(arg0); -final _ObjCBlock_ffiVoid_NSProgress_closureRegistry = - Function(ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSProgress_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_registerClosure( - ffi.Pointer Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSProgress_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSProgress_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + objc.NSString get negativePrefix { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativePrefix); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSProgress_closureRegistry[block.ref.target.address]!( - arg0); + set negativePrefix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativePrefix_, value.pointer); + } -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); + objc.NSString get negativeSuffix { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativeSuffix); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - /// 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); + set negativeSuffix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativeSuffix_, value.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_NSProgress.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSProgress_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + objc.NSString get currencyCode { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencyCode); + return objc.NSString.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. - ObjCBlock_ffiVoid_NSProgress.fromFunction( - ObjCBlock_ffiVoid? Function(NSProgress) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSProgress_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSProgress_registerClosure( - (ffi.Pointer arg0) => - fn(NSProgress._(arg0, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr))); - static ffi.Pointer? _dartFuncTrampoline; + set currencyCode(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setCurrencyCode_, value.pointer); + } - 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._( - 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); -} + objc.NSString get currencySymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencySymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -late final _sel_addSubscriberForFileURL_withPublishingHandler_ = - objc.registerName("addSubscriberForFileURL:withPublishingHandler:"); -final _objc_msgSend_672 = 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"); -void _ObjCBlock_ffiVoid_NSData_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); -final _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + set currencySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrencySymbol_, value.pointer); + } -void _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); + objc.NSString get internationalCurrencySymbol { + final _ret = + _objc_msgSend_12(this.pointer, _sel_internationalCurrencySymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -class ObjCBlock_ffiVoid_NSData_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSData_NSError._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); + set internationalCurrencySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setInternationalCurrencySymbol_, value.pointer); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSData_NSError._(pointer, - retain: retain, release: release); + objc.NSString get percentSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_percentSymbol); + return objc.NSString.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_NSData_NSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + set percentSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPercentSymbol_, value.pointer); + } - /// 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_NSError.fromFunction(void Function(NSData?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSData._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; + objc.NSString get perMillSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_perMillSymbol); + return objc.NSString.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_NSData_NSError.listener(void Function(NSData?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSData._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + set perMillSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPerMillSymbol_, value.pointer); + } - void call(NSData? arg0, 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); -} + objc.NSString get minusSign { + final _ret = _objc_msgSend_12(this.pointer, _sel_minusSign); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -late final _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_ = - objc.registerName( - "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); -final _objc_msgSend_673 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + set minusSign(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setMinusSign_, value.pointer); + } -abstract class NSItemProviderFileOptions { - static const int NSItemProviderFileOptionOpenInPlace = 1; -} + objc.NSString get plusSign { + final _ret = _objc_msgSend_12(this.pointer, _sel_plusSign); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_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); -final _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry = - Function(ffi.Pointer)>{}; -int _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( - ffi.Pointer Function(ffi.Pointer) fn) { - final id = - ++_ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex; - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + set plusSign(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setPlusSign_, value.pointer); + } -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0) => - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[ - block.ref.target.address]!(arg0); + objc.NSString get exponentSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_exponentSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -class ObjCBlock_NSProgress_ffiVoidNSURLboolNSError extends objc.ObjCBlockBase { - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); + set exponentSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setExponentSymbol_, value.pointer); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_NSProgress_ffiVoidNSURLboolNSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_NSProgress_ffiVoidNSURLboolNSError._(pointer, - retain: retain, release: release); + int get groupingSize { + return _objc_msgSend_29(this.pointer, _sel_groupingSize); } - /// 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_NSProgress_ffiVoidNSURLboolNSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + set groupingSize(int value) { + return _objc_msgSend_125(this.pointer, _sel_setGroupingSize_, 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. - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError.fromFunction( - NSProgress? Function(ObjCBlock_ffiVoid_NSURL_bool_NSError) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline) - .cast(), - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( - (ffi.Pointer arg0) => - fn(ObjCBlock_ffiVoid_NSURL_bool_NSError._(arg0, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr))); - static ffi.Pointer? _dartFuncTrampoline; + int get secondaryGroupingSize { + return _objc_msgSend_29(this.pointer, _sel_secondaryGroupingSize); + } - NSProgress? call(ObjCBlock_ffiVoid_NSURL_bool_NSError 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 - : NSProgress._( - 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); -} + set secondaryGroupingSize(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setSecondaryGroupingSize_, value); + } -void _ObjCBlock_ffiVoid_NSURL_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); -final _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( - void Function( - ffi.Pointer, bool, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + objc.NSNumber? get multiplier { + final _ret = _objc_msgSend_174(this.pointer, _sel_multiplier); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + set multiplier(objc.NSNumber? value) { + return _objc_msgSend_175( + this.pointer, _sel_setMultiplier_, value?.pointer ?? ffi.nullptr); + } -class ObjCBlock_ffiVoid_NSURL_bool_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSURL_bool_NSError._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); + int get formatWidth { + return _objc_msgSend_29(this.pointer, _sel_formatWidth); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURL_bool_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSURL_bool_NSError._(pointer, - retain: retain, release: release); + set formatWidth(int value) { + return _objc_msgSend_125(this.pointer, _sel_setFormatWidth_, value); } - /// 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_bool_NSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Bool arg1, ffi.Pointer arg2)>> - ptr) - : this._( - objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_bool_NSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + objc.NSString get paddingCharacter { + final _ret = _objc_msgSend_12(this.pointer, _sel_paddingCharacter); + return objc.NSString.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. - ObjCBlock_ffiVoid_NSURL_bool_NSError.fromFunction( - void Function(NSURL?, bool, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSURL._(arg0, retain: true, release: true), arg1, arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; + set paddingCharacter(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPaddingCharacter_, value.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_NSURL_bool_NSError.listener(void Function(NSURL?, bool, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Bool, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSURL._(arg0, retain: true, release: true), - arg1, - arg2.address == 0 - ? null - : NSError._(arg2, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>? _dartFuncListenerTrampoline; + int get paddingPosition { + return _objc_msgSend_176(this.pointer, _sel_paddingPosition); + } - void call(NSURL? arg0, bool arg1, 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 ?? ffi.nullptr, arg1, arg2?.pointer ?? ffi.nullptr); -} + set paddingPosition(int value) { + return _objc_msgSend_177(this.pointer, _sel_setPaddingPosition_, value); + } -late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_ = - objc.registerName( - "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); -final _objc_msgSend_674 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer)>(); -late final _sel_registeredTypeIdentifiers = - objc.registerName("registeredTypeIdentifiers"); -late final _sel_registeredTypeIdentifiersWithFileOptions_ = - objc.registerName("registeredTypeIdentifiersWithFileOptions:"); -final _objc_msgSend_675 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_hasItemConformingToTypeIdentifier_ = - objc.registerName("hasItemConformingToTypeIdentifier:"); -late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_ = objc - .registerName("hasRepresentationConformingToTypeIdentifier:fileOptions:"); -final _objc_msgSend_676 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_ = - objc.registerName( - "loadDataRepresentationForTypeIdentifier:completionHandler:"); -final _objc_msgSend_677 = 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_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); -final _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + int get roundingMode { + return _objc_msgSend_178(this.pointer, _sel_roundingMode); + } -void _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[block.ref.target.address]!( - arg0, arg1); + set roundingMode(int value) { + return _objc_msgSend_179(this.pointer, _sel_setRoundingMode_, value); + } -class ObjCBlock_ffiVoid_NSURL_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSURL_NSError._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); + objc.NSNumber get roundingIncrement { + final _ret = _objc_msgSend_180(this.pointer, _sel_roundingIncrement); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + set roundingIncrement(objc.NSNumber value) { + return _objc_msgSend_181( + this.pointer, _sel_setRoundingIncrement_, value.pointer); + } + + int get minimumIntegerDigits { + return _objc_msgSend_29(this.pointer, _sel_minimumIntegerDigits); + } + + set minimumIntegerDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumIntegerDigits_, value); + } + + int get maximumIntegerDigits { + return _objc_msgSend_29(this.pointer, _sel_maximumIntegerDigits); + } + + set maximumIntegerDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMaximumIntegerDigits_, value); + } + + int get minimumFractionDigits { + return _objc_msgSend_29(this.pointer, _sel_minimumFractionDigits); + } + + set minimumFractionDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumFractionDigits_, value); + } + + int get maximumFractionDigits { + return _objc_msgSend_29(this.pointer, _sel_maximumFractionDigits); + } + + set maximumFractionDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMaximumFractionDigits_, value); + } + + objc.NSNumber? get minimum { + final _ret = _objc_msgSend_174(this.pointer, _sel_minimum); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + set minimum(objc.NSNumber? value) { + return _objc_msgSend_175( + this.pointer, _sel_setMinimum_, value?.pointer ?? ffi.nullptr); + } + + objc.NSNumber? get maximum { + final _ret = _objc_msgSend_174(this.pointer, _sel_maximum); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + set maximum(objc.NSNumber? value) { + return _objc_msgSend_175( + this.pointer, _sel_setMaximum_, value?.pointer ?? ffi.nullptr); + } + + objc.NSString get currencyGroupingSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencyGroupingSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set currencyGroupingSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrencyGroupingSeparator_, value.pointer); + } + + bool get lenient { + return _objc_msgSend_7(this.pointer, _sel_isLenient); + } + + set lenient(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLenient_, value); + } + + bool get usesSignificantDigits { + return _objc_msgSend_7(this.pointer, _sel_usesSignificantDigits); + } + + set usesSignificantDigits(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesSignificantDigits_, value); + } + + int get minimumSignificantDigits { + return _objc_msgSend_29(this.pointer, _sel_minimumSignificantDigits); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURL_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSURL_NSError._(pointer, - retain: retain, release: release); + set minimumSignificantDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumSignificantDigits_, value); } - /// 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_NSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + int get maximumSignificantDigits { + return _objc_msgSend_29(this.pointer, _sel_maximumSignificantDigits); + } - /// 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_NSError.fromFunction(void Function(NSURL?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure((ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSURL._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; + set maximumSignificantDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMaximumSignificantDigits_, 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. - ObjCBlock_ffiVoid_NSURL_NSError.listener(void Function(NSURL?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSURL._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + bool get partialStringValidationEnabled { + return _objc_msgSend_7(this.pointer, _sel_isPartialStringValidationEnabled); + } - void call(NSURL? arg0, 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); -} + set partialStringValidationEnabled(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setPartialStringValidationEnabled_, value); + } -late final _sel_loadFileRepresentationForTypeIdentifier_completionHandler_ = - objc.registerName( - "loadFileRepresentationForTypeIdentifier:completionHandler:"); -final _objc_msgSend_678 = 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_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_ = - objc.registerName( - "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); -final _objc_msgSend_679 = 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_suggestedName = objc.registerName("suggestedName"); -late final _sel_setSuggestedName_ = objc.registerName("setSuggestedName:"); -late final _sel_registerObject_visibility_ = - objc.registerName("registerObject:visibility:"); -final _objc_msgSend_680 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_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); -final _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureRegistry = - Function(ffi.Pointer)>{}; -int _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_registerClosure( - ffi.Pointer Function(ffi.Pointer) fn) { - final id = - ++_ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureRegistryIndex; - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + bool get hasThousandSeparators { + return _objc_msgSend_7(this.pointer, _sel_hasThousandSeparators); + } -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0) => - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureRegistry[ - block.ref.target.address]!(arg0); + set hasThousandSeparators(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHasThousandSeparators_, value); + } -class ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError - extends objc.ObjCBlockBase { - ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); + objc.NSString get thousandSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_thousandSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError._(pointer, - retain: retain, release: release); + set thousandSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setThousandSeparator_, value.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_NSProgress_ffiVoidobjcObjCObjectNSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + bool get localizesFormat { + return _objc_msgSend_7(this.pointer, _sel_localizesFormat); + } - /// 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_NSProgress_ffiVoidobjcObjCObjectNSError.fromFunction( - NSProgress? Function(ObjCBlock_ffiVoid_objcObjCObject_NSError) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureTrampoline) - .cast(), - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_registerClosure( - (ffi.Pointer arg0) => - fn(ObjCBlock_ffiVoid_objcObjCObject_NSError._(arg0, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr))); - static ffi.Pointer? _dartFuncTrampoline; + set localizesFormat(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLocalizesFormat_, value); + } - NSProgress? call(ObjCBlock_ffiVoid_objcObjCObject_NSError 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 - : NSProgress._( - 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); -} + objc.NSString get format { + final _ret = _objc_msgSend_12(this.pointer, _sel_format); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -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); -final _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_objcObjCObject_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + set format(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setFormat_, value.pointer); + } -void _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); + NSAttributedString get attributedStringForZero { + final _ret = _objc_msgSend_63(this.pointer, _sel_attributedStringForZero); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); + } -class ObjCBlock_ffiVoid_objcObjCObject_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_objcObjCObject_NSError._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); + set attributedStringForZero(NSAttributedString value) { + return _objc_msgSend_182( + this.pointer, _sel_setAttributedStringForZero_, value.pointer); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_objcObjCObject_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_objcObjCObject_NSError._(pointer, - retain: retain, release: release); + NSAttributedString get attributedStringForNil { + final _ret = _objc_msgSend_63(this.pointer, _sel_attributedStringForNil); + return NSAttributedString.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_objcObjCObject_NSError.fromFunctionPointer( - ffi - .Pointer< - ffi - .NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_NSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + set attributedStringForNil(NSAttributedString value) { + return _objc_msgSend_182( + this.pointer, _sel_setAttributedStringForNil_, value.pointer); + } - /// 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_NSError.fromFunction( - void Function(NSObject?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSObject._(arg0, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; + NSAttributedString get attributedStringForNotANumber { + final _ret = + _objc_msgSend_63(this.pointer, _sel_attributedStringForNotANumber); + return NSAttributedString.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_objcObjCObject_NSError.listener( - void Function(NSObject?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn( - arg0.address == 0 - ? null - : NSObject._(arg0, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + set attributedStringForNotANumber(NSAttributedString value) { + return _objc_msgSend_182( + this.pointer, _sel_setAttributedStringForNotANumber_, value.pointer); + } - void call(NSObject? arg0, 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); -} + NSDecimalNumberHandler get roundingBehavior { + final _ret = _objc_msgSend_183(this.pointer, _sel_roundingBehavior); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); + } -late final _sel_registerObjectOfClass_visibility_loadHandler_ = - objc.registerName("registerObjectOfClass:visibility:loadHandler:"); -final _objc_msgSend_681 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_canLoadObjectOfClass_ = - objc.registerName("canLoadObjectOfClass:"); -late final _sel_loadObjectOfClass_completionHandler_ = - objc.registerName("loadObjectOfClass:completionHandler:"); -final _objc_msgSend_682 = 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_initWithItem_typeIdentifier_ = - objc.registerName("initWithItem:typeIdentifier:"); -final _objc_msgSend_683 = 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)>(); -void - _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_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); -final _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureRegistry = - , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureRegistry[ - id] = fn; - return ffi.Pointer.fromAddress(id); -} + set roundingBehavior(NSDecimalNumberHandler value) { + return _objc_msgSend_185( + this.pointer, _sel_setRoundingBehavior_, value.pointer); + } -void _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + @override + NSNumberFormatter init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSNumberFormatter.castFromPointer(_ret, retain: true, release: true); + } -class ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary - extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); + static NSNumberFormatter new1() { + final _ret = _objc_msgSend_40(_class_NSNumberFormatter, _sel_new); + return NSNumberFormatter.castFromPointer(_ret, + retain: false, release: true); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary - ._(pointer, retain: retain, release: release); + static NSNumberFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSNumberFormatter, _sel_allocWithZone_, zone); + return NSNumberFormatter.castFromPointer(_ret, + retain: false, 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_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + static NSNumberFormatter alloc() { + final _ret = _objc_msgSend_40(_class_NSNumberFormatter, _sel_alloc); + return NSNumberFormatter.castFromPointer(_ret, + 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_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary.fromFunction( - void Function(ObjCBlock_ffiVoid_objcObjCObject_NSError1, NSObject, NSDictionary) - fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(_ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - ObjCBlock_ffiVoid_objcObjCObject_NSError1._(arg0, retain: true, release: true), - NSObject._(arg1, retain: true, release: true), - NSDictionary._(arg2, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSNumberFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } - /// 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_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary.listener( - void Function(ObjCBlock_ffiVoid_objcObjCObject_NSError1, NSObject, NSDictionary) - fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener(_ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - ObjCBlock_ffiVoid_objcObjCObject_NSError1._(arg0, retain: true, release: true), - NSObject._(arg1, retain: true, release: true), - NSDictionary._(arg2, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSNumberFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } - void call(ObjCBlock_ffiVoid_objcObjCObject_NSError1 arg0, NSObject arg1, - NSDictionary arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, arg0.pointer, arg1.pointer, arg2.pointer); -} + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSNumberFormatter, _sel_accessInstanceVariablesDirectly); + } -void _ObjCBlock_ffiVoid_objcObjCObject_NSError1_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); -final _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_registerClosure( - void Function( - ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureRegistryIndex; - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSNumberFormatter, _sel_useStoredAccessor); + } -void _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureRegistry[ - block.ref.target.address]!(arg0, arg1); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSNumberFormatter, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } -class ObjCBlock_ffiVoid_objcObjCObject_NSError1 extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_objcObjCObject_NSError1._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSNumberFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_objcObjCObject_NSError1 castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_objcObjCObject_NSError1._(pointer, - retain: retain, release: release); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSNumberFormatter, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.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_NSError1.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSNumberFormatter, _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. - ObjCBlock_ffiVoid_objcObjCObject_NSError1.fromFunction( - void Function(NSObject?, NSError) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(arg0.address == 0 ? null : NSObject._(arg0, retain: true, release: true), NSError._(arg1, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSNumberFormatter, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_objcObjCObject_NSError1.listener(void Function(NSObject?, NSError) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSObject._(arg0, retain: true, release: true), - NSError._(arg1, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; +late final _class_NSNumberFormatter = objc.getClass("NSNumberFormatter"); +late final _sel_stringFromNumber_ = objc.registerName("stringFromNumber:"); +final _objc_msgSend_165 = 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_166 = 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 call(NSObject? arg0, 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); +abstract class NSNumberFormatterStyle { + static const int NSNumberFormatterNoStyle = 0; + static const int NSNumberFormatterDecimalStyle = 1; + static const int NSNumberFormatterCurrencyStyle = 2; + static const int NSNumberFormatterPercentStyle = 3; + static const int NSNumberFormatterScientificStyle = 4; + static const int NSNumberFormatterSpellOutStyle = 5; + static const int NSNumberFormatterOrdinalStyle = 6; + static const int NSNumberFormatterCurrencyISOCodeStyle = 8; + static const int NSNumberFormatterCurrencyPluralStyle = 9; + static const int NSNumberFormatterCurrencyAccountingStyle = 10; } -late final _sel_registerItemForTypeIdentifier_loadHandler_ = - objc.registerName("registerItemForTypeIdentifier:loadHandler:"); -final _objc_msgSend_684 = objc.msgSendPointer +late final _sel_localizedStringFromNumber_numberStyle_ = + objc.registerName("localizedStringFromNumber:numberStyle:"); +final _objc_msgSend_167 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_loadItemForTypeIdentifier_options_completionHandler_ = - objc.registerName("loadItemForTypeIdentifier:options:completionHandler:"); -final _objc_msgSend_685 = objc.msgSendPointer + int)>(); + +abstract class NSNumberFormatterBehavior { + static const int NSNumberFormatterBehaviorDefault = 0; + static const int NSNumberFormatterBehavior10_0 = 1000; + static const int NSNumberFormatterBehavior10_4 = 1040; +} + +final _objc_msgSend_168 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_169 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_numberStyle = objc.registerName("numberStyle"); +final _objc_msgSend_170 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setNumberStyle_ = objc.registerName("setNumberStyle:"); +final _objc_msgSend_171 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_172 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_173 = 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_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"); +final _objc_msgSend_174 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setMultiplier_ = objc.registerName("setMultiplier:"); +final _objc_msgSend_175 = 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_previewImageHandler = objc.registerName("previewImageHandler"); -final _objc_msgSend_686 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +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:"); + +abstract class NSNumberFormatterPadPosition { + static const int NSNumberFormatterPadBeforePrefix = 0; + static const int NSNumberFormatterPadAfterPrefix = 1; + static const int NSNumberFormatterPadBeforeSuffix = 2; + static const int NSNumberFormatterPadAfterSuffix = 3; +} + +late final _sel_paddingPosition = objc.registerName("paddingPosition"); +final _objc_msgSend_176 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Int32 Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setPreviewImageHandler_ = - objc.registerName("setPreviewImageHandler:"); -final _objc_msgSend_687 = objc.msgSendPointer +late final _sel_setPaddingPosition_ = objc.registerName("setPaddingPosition:"); +final _objc_msgSend_177 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.Pointer, ffi.Int32)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_loadPreviewImageWithOptions_completionHandler_ = - objc.registerName("loadPreviewImageWithOptions:completionHandler:"); -final _objc_msgSend_688 = objc.msgSendPointer + ffi.Pointer, int)>(); + +abstract class NSNumberFormatterRoundingMode { + static const int NSNumberFormatterRoundCeiling = 0; + static const int NSNumberFormatterRoundFloor = 1; + static const int NSNumberFormatterRoundDown = 2; + static const int NSNumberFormatterRoundUp = 3; + static const int NSNumberFormatterRoundHalfEven = 4; + static const int NSNumberFormatterRoundHalfDown = 5; + static const int NSNumberFormatterRoundHalfUp = 6; +} + +late final _sel_roundingMode = objc.registerName("roundingMode"); +final _objc_msgSend_178 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setRoundingMode_ = objc.registerName("setRoundingMode:"); +final _objc_msgSend_179 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_roundingIncrement = objc.registerName("roundingIncrement"); +final _objc_msgSend_180 = 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_181 = 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_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_182 = 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 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:"); -class NSMutableString extends NSString { - NSMutableString._(ffi.Pointer pointer, +class NSDecimalNumberHandler extends objc.NSObject { + NSDecimalNumberHandler._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSMutableString] that points to the same underlying object as [other]. - static NSMutableString castFrom(T other) { - return NSMutableString._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSDecimalNumberHandler] that points to the same underlying object as [other]. + NSDecimalNumberHandler.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSMutableString] that wraps the given raw object pointer. - static NSMutableString castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableString._(other, retain: retain, release: release); - } + /// 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 [NSMutableString]. + /// Returns whether [obj] is an instance of [NSDecimalNumberHandler]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableString); + obj.pointer, _sel_isKindOfClass_, _class_NSDecimalNumberHandler); } - void replaceCharactersInRange_withString_(_NSRange range, NSString aString) { - _objc_msgSend_689(this.pointer, _sel_replaceCharactersInRange_withString_, - range, aString.pointer); + static NSDecimalNumberHandler getDefaultDecimalNumberHandler() { + final _ret = _objc_msgSend_183( + _class_NSDecimalNumberHandler, _sel_defaultDecimalNumberHandler); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } - void insertString_atIndex_(NSString aString, int loc) { - _objc_msgSend_690( - this.pointer, _sel_insertString_atIndex_, aString.pointer, loc); + NSDecimalNumberHandler + initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( + int roundingMode, + int scale, + bool exact, + bool overflow, + bool underflow, + bool divideByZero) { + final _ret = _objc_msgSend_184( + this.pointer, + _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, + roundingMode, + scale, + exact, + overflow, + underflow, + divideByZero); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } - void deleteCharactersInRange_(_NSRange range) { - _objc_msgSend_476(this.pointer, _sel_deleteCharactersInRange_, range); + static NSDecimalNumberHandler + decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( + int roundingMode, + int scale, + bool exact, + bool overflow, + bool underflow, + bool divideByZero) { + final _ret = _objc_msgSend_184( + _class_NSDecimalNumberHandler, + _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, + roundingMode, + scale, + exact, + overflow, + underflow, + divideByZero); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } - void appendString_(NSString aString) { - _objc_msgSend_247(this.pointer, _sel_appendString_, aString.pointer); + @override + NSDecimalNumberHandler init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); } - void appendFormat_(NSString format) { - _objc_msgSend_247(this.pointer, _sel_appendFormat_, format.pointer); + static NSDecimalNumberHandler new1() { + final _ret = _objc_msgSend_40(_class_NSDecimalNumberHandler, _sel_new); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); } - void setString_(NSString aString) { - _objc_msgSend_247(this.pointer, _sel_setString_, aString.pointer); + static NSDecimalNumberHandler allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSDecimalNumberHandler, _sel_allocWithZone_, zone); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); } - int replaceOccurrencesOfString_withString_options_range_(NSString target, - NSString replacement, int options, _NSRange searchRange) { - return _objc_msgSend_691( - this.pointer, - _sel_replaceOccurrencesOfString_withString_options_range_, - target.pointer, - replacement.pointer, - options, - searchRange); + static NSDecimalNumberHandler alloc() { + final _ret = _objc_msgSend_40(_class_NSDecimalNumberHandler, _sel_alloc); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); } - bool applyTransform_reverse_range_updatedRange_(NSString transform, - bool reverse, _NSRange range, ffi.Pointer<_NSRange> resultingRange) { - return _objc_msgSend_692( - this.pointer, - _sel_applyTransform_reverse_range_updatedRange_, - transform.pointer, - reverse, - range, - resultingRange); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSDecimalNumberHandler, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSMutableString initWithCapacity_(int capacity) { - final _ret = - _objc_msgSend_693(this.pointer, _sel_initWithCapacity_, capacity); - return NSMutableString._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSDecimalNumberHandler, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static NSMutableString stringWithCapacity_(int capacity) { - final _ret = _objc_msgSend_693( - _class_NSMutableString, _sel_stringWithCapacity_, capacity); - return NSMutableString._(_ret, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSDecimalNumberHandler, _sel_accessInstanceVariablesDirectly); } - @override - NSMutableString init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableString._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSDecimalNumberHandler, _sel_useStoredAccessor); } - @override - NSMutableString? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSDecimalNumberHandler, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static ffi.Pointer getAvailableStringEncodings() { - return _objc_msgSend_357( - _class_NSMutableString, _sel_availableStringEncodings); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSDecimalNumberHandler, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSString localizedNameOfStringEncoding_(int encoding) { - final _ret = _objc_msgSend_332( - _class_NSMutableString, _sel_localizedNameOfStringEncoding_, encoding); - return NSString._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSDecimalNumberHandler, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static int getDefaultCStringEncoding() { - return _objc_msgSend_10( - _class_NSMutableString, _sel_defaultCStringEncoding); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSDecimalNumberHandler, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, int length, bool freeBuffer) { - final _ret = _objc_msgSend_369( - this.pointer, - _sel_initWithCharactersNoCopy_length_freeWhenDone_, - characters, - length, - freeBuffer); - return NSMutableString._(_ret, retain: false, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSDecimalNumberHandler, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - @override - NSMutableString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, - int len, - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong? deallocator) { - final _ret = _objc_msgSend_370( - this.pointer, - _sel_initWithCharactersNoCopy_length_deallocator_, - chars, - len, - deallocator?.pointer ?? ffi.nullptr); - return NSMutableString._(_ret, retain: false, release: true); - } +late final _class_NSDecimalNumberHandler = + objc.getClass("NSDecimalNumberHandler"); +late final _sel_defaultDecimalNumberHandler = + objc.registerName("defaultDecimalNumberHandler"); +final _objc_msgSend_183 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - @override - NSMutableString initWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _objc_msgSend_371( - this.pointer, _sel_initWithCharacters_length_, characters, length); - return NSMutableString._(_ret, retain: true, release: true); - } +abstract class NSRoundingMode { + static const int NSRoundPlain = 0; + static const int NSRoundDown = 1; + static const int NSRoundUp = 2; + static const int NSRoundBankers = 3; +} - @override - NSMutableString? initWithUTF8String_( - ffi.Pointer nullTerminatedCString) { - final _ret = _objc_msgSend_372( - this.pointer, _sel_initWithUTF8String_, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } +late final _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = + objc.registerName( + "initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); +final _objc_msgSend_184 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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_185 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - @override - NSMutableString initWithString_(NSString aString) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithString_, aString.pointer); - return NSMutableString._(_ret, retain: true, release: true); - } +abstract class NSLocaleLanguageDirection { + static const int NSLocaleLanguageDirectionUnknown = 0; + static const int NSLocaleLanguageDirectionLeftToRight = 1; + static const int NSLocaleLanguageDirectionRightToLeft = 2; + static const int NSLocaleLanguageDirectionTopToBottom = 3; + static const int NSLocaleLanguageDirectionBottomToTop = 4; +} - @override - NSMutableString initWithFormat_(NSString format) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithFormat_, format.pointer); - return NSMutableString._(_ret, retain: true, release: true); - } +class NSScanner extends objc.NSObject { + NSScanner._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - @override - NSMutableString initWithFormat_arguments_( - NSString format, ffi.Pointer<__va_list_tag> argList) { - final _ret = _objc_msgSend_373( - this.pointer, _sel_initWithFormat_arguments_, format.pointer, argList); - return NSMutableString._(_ret, retain: true, release: true); - } + /// Constructs a [NSScanner] that points to the same underlying object as [other]. + NSScanner.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - @override - NSMutableString initWithFormat_locale_(NSString format, NSObject? locale) { - final _ret = _objc_msgSend_374(this.pointer, _sel_initWithFormat_locale_, - format.pointer, locale?.pointer ?? ffi.nullptr); - return NSMutableString._(_ret, 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); - @override - NSMutableString initWithFormat_locale_arguments_( - NSString format, NSObject? locale, ffi.Pointer<__va_list_tag> argList) { - final _ret = _objc_msgSend_375( - this.pointer, - _sel_initWithFormat_locale_arguments_, - format.pointer, - locale?.pointer ?? ffi.nullptr, - argList); - return NSMutableString._(_ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSScanner]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSScanner); } - @override - NSMutableString? initWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _objc_msgSend_376( - this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_error_, - format.pointer, - validFormatSpecifiers.pointer, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + objc.NSString get string { + final _ret = _objc_msgSend_12(this.pointer, _sel_string); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer> error) { - final _ret = _objc_msgSend_377( - this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_, - format.pointer, - validFormatSpecifiers.pointer, - locale?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + int get scanLocation { + return _objc_msgSend_29(this.pointer, _sel_scanLocation); } - @override - NSMutableString? - initWithValidatedFormat_validFormatSpecifiers_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _objc_msgSend_378( - this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_, - format.pointer, - validFormatSpecifiers.pointer, - argList, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + set scanLocation(int value) { + return _objc_msgSend_125(this.pointer, _sel_setScanLocation_, value); } - @override - NSMutableString? - initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _objc_msgSend_379( - this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_, - format.pointer, - validFormatSpecifiers.pointer, - locale?.pointer ?? ffi.nullptr, - argList, - error); + objc.NSCharacterSet? get charactersToBeSkipped { + final _ret = _objc_msgSend_186(this.pointer, _sel_charactersToBeSkipped); return _ret.address == 0 ? null - : NSMutableString._(_ret, retain: true, release: true); + : objc.NSCharacterSet.castFromPointer(_ret, + retain: true, release: true); } - @override - NSMutableString? initWithData_encoding_(NSData data, int encoding) { - final _ret = _objc_msgSend_380( - this.pointer, _sel_initWithData_encoding_, data.pointer, encoding); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + set charactersToBeSkipped(objc.NSCharacterSet? value) { + return _objc_msgSend_187(this.pointer, _sel_setCharactersToBeSkipped_, + value?.pointer ?? ffi.nullptr); } - @override - NSMutableString? initWithBytes_length_encoding_( - ffi.Pointer bytes, int len, int encoding) { - final _ret = _objc_msgSend_381(this.pointer, - _sel_initWithBytes_length_encoding_, bytes, len, encoding); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + bool get caseSensitive { + return _objc_msgSend_7(this.pointer, _sel_caseSensitive); } - @override - NSMutableString? initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { - final _ret = _objc_msgSend_382( - this.pointer, - _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_, - bytes, - len, - encoding, - freeBuffer); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: false, release: true); + set caseSensitive(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setCaseSensitive_, value); } - @override - NSMutableString? initWithBytesNoCopy_length_encoding_deallocator_( - ffi.Pointer bytes, - int len, - int encoding, - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _objc_msgSend_383( - this.pointer, - _sel_initWithBytesNoCopy_length_encoding_deallocator_, - bytes, - len, - encoding, - deallocator?.pointer ?? ffi.nullptr); + objc.NSObject? get locale { + final _ret = _objc_msgSend_66(this.pointer, _sel_locale); return _ret.address == 0 ? null - : NSMutableString._(_ret, retain: false, release: true); - } - - static NSMutableString string() { - final _ret = _objc_msgSend_2(_class_NSMutableString, _sel_string); - return NSMutableString._(_ret, retain: true, release: true); - } - - static NSMutableString stringWithString_(NSString string) { - final _ret = _objc_msgSend_31( - _class_NSMutableString, _sel_stringWithString_, string.pointer); - return NSMutableString._(_ret, retain: true, release: true); - } - - static NSMutableString stringWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _objc_msgSend_371(_class_NSMutableString, - _sel_stringWithCharacters_length_, characters, length); - return NSMutableString._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSMutableString? stringWithUTF8String_( - ffi.Pointer nullTerminatedCString) { - final _ret = _objc_msgSend_372(_class_NSMutableString, - _sel_stringWithUTF8String_, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + set locale(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setLocale_, value?.pointer ?? ffi.nullptr); } - static NSMutableString stringWithFormat_(NSString format) { - final _ret = _objc_msgSend_31( - _class_NSMutableString, _sel_stringWithFormat_, format.pointer); - return NSMutableString._(_ret, retain: true, release: true); + NSScanner initWithString_(objc.NSString string) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithString_, string.pointer); + return NSScanner.castFromPointer(_ret, retain: true, release: true); } - static NSMutableString localizedStringWithFormat_(NSString format) { - final _ret = _objc_msgSend_31(_class_NSMutableString, - _sel_localizedStringWithFormat_, format.pointer); - return NSMutableString._(_ret, retain: true, release: true); + bool scanInt_(ffi.Pointer result) { + return _objc_msgSend_189(this.pointer, _sel_scanInt_, result); } - static NSMutableString? - stringWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _objc_msgSend_376( - _class_NSMutableString, - _sel_stringWithValidatedFormat_validFormatSpecifiers_error_, - format.pointer, - validFormatSpecifiers.pointer, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + bool scanInteger_(ffi.Pointer result) { + return _objc_msgSend_190(this.pointer, _sel_scanInteger_, result); } - static NSMutableString? - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _objc_msgSend_376( - _class_NSMutableString, - _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_, - format.pointer, - validFormatSpecifiers.pointer, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + bool scanLongLong_(ffi.Pointer result) { + return _objc_msgSend_191(this.pointer, _sel_scanLongLong_, result); } - @override - NSMutableString? initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, int encoding) { - final _ret = _objc_msgSend_384(this.pointer, _sel_initWithCString_encoding_, - nullTerminatedCString, encoding); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + bool scanUnsignedLongLong_(ffi.Pointer result) { + return _objc_msgSend_192(this.pointer, _sel_scanUnsignedLongLong_, result); } - static NSMutableString? stringWithCString_encoding_( - ffi.Pointer cString, int enc) { - final _ret = _objc_msgSend_384( - _class_NSMutableString, _sel_stringWithCString_encoding_, cString, enc); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + bool scanFloat_(ffi.Pointer result) { + return _objc_msgSend_193(this.pointer, _sel_scanFloat_, result); } - @override - NSMutableString? initWithContentsOfURL_encoding_error_( - NSURL url, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_385(this.pointer, - _sel_initWithContentsOfURL_encoding_error_, url.pointer, enc, error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + bool scanDouble_(ffi.Pointer result) { + return _objc_msgSend_194(this.pointer, _sel_scanDouble_, result); } - @override - NSMutableString? initWithContentsOfFile_encoding_error_( - NSString path, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_386(this.pointer, - _sel_initWithContentsOfFile_encoding_error_, path.pointer, enc, error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + bool scanHexInt_(ffi.Pointer result) { + return _objc_msgSend_195(this.pointer, _sel_scanHexInt_, result); } - static NSMutableString? stringWithContentsOfURL_encoding_error_( - NSURL url, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_385(_class_NSMutableString, - _sel_stringWithContentsOfURL_encoding_error_, url.pointer, enc, error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + bool scanHexLongLong_(ffi.Pointer result) { + return _objc_msgSend_192(this.pointer, _sel_scanHexLongLong_, result); } - static NSMutableString? stringWithContentsOfFile_encoding_error_( - NSString path, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_386( - _class_NSMutableString, - _sel_stringWithContentsOfFile_encoding_error_, - path.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + bool scanHexFloat_(ffi.Pointer result) { + return _objc_msgSend_193(this.pointer, _sel_scanHexFloat_, result); } - @override - NSMutableString? initWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_387( - this.pointer, - _sel_initWithContentsOfURL_usedEncoding_error_, - url.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + bool scanHexDouble_(ffi.Pointer result) { + return _objc_msgSend_194(this.pointer, _sel_scanHexDouble_, result); } - @override - NSMutableString? initWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_388( - this.pointer, - _sel_initWithContentsOfFile_usedEncoding_error_, - path.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + bool scanString_intoString_( + objc.NSString string, ffi.Pointer> result) { + return _objc_msgSend_196( + this.pointer, _sel_scanString_intoString_, string.pointer, result); } - static NSMutableString? stringWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_387( - _class_NSMutableString, - _sel_stringWithContentsOfURL_usedEncoding_error_, - url.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + bool scanCharactersFromSet_intoString_(objc.NSCharacterSet set, + ffi.Pointer> result) { + return _objc_msgSend_197(this.pointer, + _sel_scanCharactersFromSet_intoString_, set.pointer, result); } - static NSMutableString? stringWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_388( - _class_NSMutableString, - _sel_stringWithContentsOfFile_usedEncoding_error_, - path.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); + bool scanUpToString_intoString_( + objc.NSString string, ffi.Pointer> result) { + return _objc_msgSend_196( + this.pointer, _sel_scanUpToString_intoString_, string.pointer, result); } - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NSData data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _objc_msgSend_389( - _class_NSMutableString, - _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_, - data.pointer, - opts?.pointer ?? ffi.nullptr, - string, - usedLossyConversion); + bool scanUpToCharactersFromSet_intoString_(objc.NSCharacterSet set, + ffi.Pointer> result) { + return _objc_msgSend_197(this.pointer, + _sel_scanUpToCharactersFromSet_intoString_, set.pointer, result); } - static NSObject? stringWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSMutableString, _sel_stringWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + bool get atEnd { + return _objc_msgSend_7(this.pointer, _sel_isAtEnd); } - static NSObject? stringWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - _class_NSMutableString, _sel_stringWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + static NSScanner scannerWithString_(objc.NSString string) { + final _ret = _objc_msgSend_35( + _class_NSScanner, _sel_scannerWithString_, string.pointer); + return NSScanner.castFromPointer(_ret, retain: true, release: true); } - static NSObject? stringWithCString_length_( - ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_384( - _class_NSMutableString, _sel_stringWithCString_length_, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + static objc.NSObject localizedScannerWithString_(objc.NSString string) { + final _ret = _objc_msgSend_35( + _class_NSScanner, _sel_localizedScannerWithString_, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject? stringWithCString_(ffi.Pointer bytes) { - final _ret = _objc_msgSend_372( - _class_NSMutableString, _sel_stringWithCString_, bytes); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + bool scanDecimal_(ffi.Pointer dcm) { + return _objc_msgSend_198(this.pointer, _sel_scanDecimal_, dcm); } - static NSString pathWithComponents_(NSArray components) { - final _ret = _objc_msgSend_396( - _class_NSMutableString, _sel_pathWithComponents_, components.pointer); - return NSString._(_ret, retain: true, release: true); + @override + NSScanner init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScanner.castFromPointer(_ret, retain: true, release: true); } - static NSMutableString new1() { - final _ret = _objc_msgSend_2(_class_NSMutableString, _sel_new); - return NSMutableString._(_ret, retain: false, release: true); + static NSScanner new1() { + final _ret = _objc_msgSend_40(_class_NSScanner, _sel_new); + return NSScanner.castFromPointer(_ret, retain: false, release: true); } - static NSMutableString allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMutableString, _sel_allocWithZone_, zone); - return NSMutableString._(_ret, retain: false, release: true); + static NSScanner allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSScanner, _sel_allocWithZone_, zone); + return NSScanner.castFromPointer(_ret, retain: false, release: true); } - static NSMutableString alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableString, _sel_alloc); - return NSMutableString._(_ret, retain: false, release: true); + static NSScanner alloc() { + final _ret = _objc_msgSend_40(_class_NSScanner, _sel_alloc); + return NSScanner.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableString, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScanner, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableString, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScanner, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableString, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSScanner, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMutableString, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSScanner, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableString, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScanner, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableString, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScanner, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableString, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScanner, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableString, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSScanner, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSMutableString, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSScanner, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSMutableString = objc.getClass("NSMutableString"); -late final _sel_replaceCharactersInRange_withString_ = - objc.registerName("replaceCharactersInRange:withString:"); -final _objc_msgSend_689 = objc.msgSendPointer +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_186 = 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_187 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_insertString_atIndex_ = - objc.registerName("insertString:atIndex:"); -final _objc_msgSend_690 = objc.msgSendPointer + 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_188 = 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_189 = 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_190 = 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_191 = 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_192 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function( + bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_deleteCharactersInRange_ = - objc.registerName("deleteCharactersInRange:"); -late final _sel_appendString_ = objc.registerName("appendString:"); -late final _sel_appendFormat_ = objc.registerName("appendFormat:"); -late final _sel_setString_ = objc.registerName("setString:"); -late final _sel_replaceOccurrencesOfString_withString_options_range_ = - objc.registerName("replaceOccurrencesOfString:withString:options:range:"); -final _objc_msgSend_691 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_scanFloat_ = objc.registerName("scanFloat:"); +final _objc_msgSend_193 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( + 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_194 = 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_195 = 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_196 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Int32, - _NSRange)>>() + ffi.Pointer>)>>() .asFunction< - int Function( + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -late final _sel_applyTransform_reverse_range_updatedRange_ = - objc.registerName("applyTransform:reverse:range:updatedRange:"); -final _objc_msgSend_692 = objc.msgSendPointer + ffi.Pointer>)>(); +late final _sel_scanCharactersFromSet_intoString_ = + objc.registerName("scanCharactersFromSet:intoString:"); +final _objc_msgSend_197 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Bool, - _NSRange, - ffi.Pointer<_NSRange>)>>() + ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - bool, - _NSRange, - ffi.Pointer<_NSRange>)>(); -final _objc_msgSend_693 = objc.msgSendPointer + 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_198 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_stringWithCapacity_ = objc.registerName("stringWithCapacity:"); + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -class NSNotification extends NSObject { - NSNotification._(ffi.Pointer pointer, +class NSException extends objc.NSObject { + NSException._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSNotification] that points to the same underlying object as [other]. - static NSNotification castFrom(T other) { - return NSNotification._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSException] that points to the same underlying object as [other]. + NSException.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSNotification] that wraps the given raw object pointer. - static NSNotification castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNotification._(other, retain: retain, release: release); - } + /// Constructs a [NSException] that wraps the given raw object pointer. + NSException.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSNotification]. + /// Returns whether [obj] is an instance of [NSException]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSNotification); + obj.pointer, _sel_isKindOfClass_, _class_NSException); + } + + static NSException exceptionWithName_reason_userInfo_( + objc.NSString name, objc.NSString? reason, objc.NSDictionary? userInfo) { + final _ret = _objc_msgSend_199( + _class_NSException, + _sel_exceptionWithName_reason_userInfo_, + name.pointer, + reason?.pointer ?? ffi.nullptr, + userInfo?.pointer ?? ffi.nullptr); + return NSException.castFromPointer(_ret, retain: true, release: true); + } + + NSException initWithName_reason_userInfo_(objc.NSString aName, + objc.NSString? aReason, objc.NSDictionary? aUserInfo) { + final _ret = _objc_msgSend_200( + this.pointer, + _sel_initWithName_reason_userInfo_, + aName.pointer, + aReason?.pointer ?? ffi.nullptr, + aUserInfo?.pointer ?? ffi.nullptr); + return NSException.castFromPointer(_ret, retain: true, release: true); } - NSString get name { - final _ret = _objc_msgSend_21(this.pointer, _sel_name); - return NSString._(_ret, retain: true, release: true); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject? get object { - final _ret = _objc_msgSend_17(this.pointer, _sel_object); + objc.NSString? get reason { + final _ret = _objc_msgSend_13(this.pointer, _sel_reason); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get userInfo { - final _ret = _objc_msgSend_390(this.pointer, _sel_userInfo); + objc.NSDictionary? get userInfo { + final _ret = _objc_msgSend_65(this.pointer, _sel_userInfo); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSNotification initWithName_object_userInfo_( - NSString name, NSObject? object, NSDictionary? userInfo) { - final _ret = _objc_msgSend_694( - this.pointer, - _sel_initWithName_object_userInfo_, - name.pointer, - object?.pointer ?? ffi.nullptr, - userInfo?.pointer ?? ffi.nullptr); - return NSNotification._(_ret, retain: true, release: true); + objc.NSArray get callStackReturnAddresses { + final _ret = _objc_msgSend_6(this.pointer, _sel_callStackReturnAddresses); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSNotification? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSNotification._(_ret, retain: true, release: true); + objc.NSArray get callStackSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_callStackSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSNotification notificationWithName_object_( - NSString aName, NSObject? anObject) { - final _ret = _objc_msgSend_374( - _class_NSNotification, - _sel_notificationWithName_object_, - aName.pointer, - anObject?.pointer ?? ffi.nullptr); - return NSNotification._(_ret, retain: true, release: true); + void raise() { + _objc_msgSend_82(this.pointer, _sel_raise); } - static NSNotification notificationWithName_object_userInfo_( - NSString aName, NSObject? anObject, NSDictionary? aUserInfo) { - final _ret = _objc_msgSend_694( - _class_NSNotification, - _sel_notificationWithName_object_userInfo_, - aName.pointer, - anObject?.pointer ?? ffi.nullptr, - aUserInfo?.pointer ?? ffi.nullptr); - return NSNotification._(_ret, retain: true, release: true); + static void raise_format_(objc.NSString name, objc.NSString format) { + _objc_msgSend_201( + _class_NSException, _sel_raise_format_, name.pointer, format.pointer); + } + + static void raise_format_arguments_(objc.NSString name, objc.NSString format, + ffi.Pointer<__va_list_tag> argList) { + _objc_msgSend_202(_class_NSException, _sel_raise_format_arguments_, + name.pointer, format.pointer, argList); } @override - NSNotification init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSNotification._(_ret, retain: true, release: true); + NSException init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSException.castFromPointer(_ret, retain: true, release: true); } - static NSNotification new1() { - final _ret = _objc_msgSend_2(_class_NSNotification, _sel_new); - return NSNotification._(_ret, retain: false, release: true); + static NSException new1() { + final _ret = _objc_msgSend_40(_class_NSException, _sel_new); + return NSException.castFromPointer(_ret, retain: false, release: true); } - static NSNotification allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSException allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSNotification, _sel_allocWithZone_, zone); - return NSNotification._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSException, _sel_allocWithZone_, zone); + return NSException.castFromPointer(_ret, retain: false, release: true); } - static NSNotification alloc() { - final _ret = _objc_msgSend_2(_class_NSNotification, _sel_alloc); - return NSNotification._(_ret, retain: false, release: true); + static NSException alloc() { + final _ret = _objc_msgSend_40(_class_NSException, _sel_alloc); + return NSException.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSNotification, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSException, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSNotification, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSException, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSNotification, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSException, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSNotification, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSException, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSNotification, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSException, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSNotification, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSException, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSNotification, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSException, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSNotification, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSException, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSNotification, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSException, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSNotification = objc.getClass("NSNotification"); -late final _sel_object = objc.registerName("object"); -late final _sel_initWithName_object_userInfo_ = - objc.registerName("initWithName:object:userInfo:"); -final _objc_msgSend_694 = objc.msgSendPointer +late final _class_NSException = objc.getClass("NSException"); +late final _sel_exceptionWithName_reason_userInfo_ = + objc.registerName("exceptionWithName:reason:userInfo:"); +final _objc_msgSend_199 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithName_reason_userInfo_ = + objc.registerName("initWithName:reason:userInfo:"); +final _objc_msgSend_200 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -33270,4347 +8637,5340 @@ final _objc_msgSend_694 = objc.msgSendPointer ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_notificationWithName_object_ = - objc.registerName("notificationWithName:object:"); -late final _sel_notificationWithName_object_userInfo_ = - objc.registerName("notificationWithName:object:userInfo:"); +late final _sel_reason = objc.registerName("reason"); +late final _sel_userInfo = objc.registerName("userInfo"); +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_201 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_raise_format_arguments_ = + objc.registerName("raise:format:arguments:"); +final _objc_msgSend_202 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); -class NSBundle extends NSObject { - NSBundle._(ffi.Pointer pointer, +class NSRunLoop extends objc.NSObject { + NSRunLoop._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSBundle] that points to the same underlying object as [other]. - static NSBundle castFrom(T other) { - return NSBundle._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSRunLoop] that points to the same underlying object as [other]. + NSRunLoop.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSBundle] that wraps the given raw object pointer. - static NSBundle castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSBundle._(other, retain: retain, release: release); - } + /// Constructs a [NSRunLoop] that wraps the given raw object pointer. + NSRunLoop.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSBundle]. + /// Returns whether [obj] is an instance of [NSRunLoop]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSBundle); + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSRunLoop); } - static NSBundle getMainBundle() { - final _ret = _objc_msgSend_695(_class_NSBundle, _sel_mainBundle); - return NSBundle._(_ret, retain: true, release: true); + static NSRunLoop getCurrentRunLoop() { + final _ret = _objc_msgSend_203(_class_NSRunLoop, _sel_currentRunLoop); + return NSRunLoop.castFromPointer(_ret, retain: true, release: true); } - static NSBundle? bundleWithPath_(NSString path) { - final _ret = - _objc_msgSend_38(_class_NSBundle, _sel_bundleWithPath_, path.pointer); - return _ret.address == 0 - ? null - : NSBundle._(_ret, retain: true, release: true); + static NSRunLoop getMainRunLoop() { + final _ret = _objc_msgSend_203(_class_NSRunLoop, _sel_mainRunLoop); + return NSRunLoop.castFromPointer(_ret, retain: true, release: true); } - NSBundle? initWithPath_(NSString path) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_initWithPath_, path.pointer); + objc.NSString? get currentMode { + final _ret = _objc_msgSend_13(this.pointer, _sel_currentMode); return _ret.address == 0 ? null - : NSBundle._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSBundle? bundleWithURL_(NSURL url) { - final _ret = - _objc_msgSend_277(_class_NSBundle, _sel_bundleWithURL_, url.pointer); - return _ret.address == 0 - ? null - : NSBundle._(_ret, retain: true, release: true); + ffi.Pointer<__CFRunLoop> getCFRunLoop() { + return _objc_msgSend_204(this.pointer, _sel_getCFRunLoop); } - NSBundle? initWithURL_(NSURL url) { - final _ret = - _objc_msgSend_277(this.pointer, _sel_initWithURL_, url.pointer); - return _ret.address == 0 - ? null - : NSBundle._(_ret, retain: true, release: true); + void addTimer_forMode_(NSTimer timer, objc.NSString mode) { + _objc_msgSend_213( + this.pointer, _sel_addTimer_forMode_, timer.pointer, mode.pointer); + } + + void addPort_forMode_(NSPort aPort, objc.NSString mode) { + _objc_msgSend_244( + this.pointer, _sel_addPort_forMode_, aPort.pointer, mode.pointer); } - static NSBundle bundleForClass_(NSObject aClass) { - final _ret = _objc_msgSend_696( - _class_NSBundle, _sel_bundleForClass_, aClass.pointer); - return NSBundle._(_ret, retain: true, release: true); + void removePort_forMode_(NSPort aPort, objc.NSString mode) { + _objc_msgSend_244( + this.pointer, _sel_removePort_forMode_, aPort.pointer, mode.pointer); } - static NSBundle? bundleWithIdentifier_(NSString identifier) { - final _ret = _objc_msgSend_697( - _class_NSBundle, _sel_bundleWithIdentifier_, identifier.pointer); + objc.NSDate? limitDateForMode_(objc.NSString mode) { + final _ret = + _objc_msgSend_93(this.pointer, _sel_limitDateForMode_, mode.pointer); return _ret.address == 0 ? null - : NSBundle._(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static NSArray getAllBundles() { - final _ret = _objc_msgSend_85(_class_NSBundle, _sel_allBundles); - return NSArray._(_ret, retain: true, release: true); + void acceptInputForMode_beforeDate_( + objc.NSString mode, objc.NSDate limitDate) { + _objc_msgSend_245(this.pointer, _sel_acceptInputForMode_beforeDate_, + mode.pointer, limitDate.pointer); } - static NSArray getAllFrameworks() { - final _ret = _objc_msgSend_85(_class_NSBundle, _sel_allFrameworks); - return NSArray._(_ret, retain: true, release: true); + void run() { + _objc_msgSend_82(this.pointer, _sel_run); } - bool load() { - return _objc_msgSend_12(this.pointer, _sel_load); + void runUntilDate_(objc.NSDate limitDate) { + _objc_msgSend_246(this.pointer, _sel_runUntilDate_, limitDate.pointer); } - bool get loaded { - return _objc_msgSend_12(this.pointer, _sel_isLoaded); + bool runMode_beforeDate_(objc.NSString mode, objc.NSDate limitDate) { + return _objc_msgSend_247(this.pointer, _sel_runMode_beforeDate_, + mode.pointer, limitDate.pointer); } - bool unload() { - return _objc_msgSend_12(this.pointer, _sel_unload); + void configureAsServer() { + _objc_msgSend_82(this.pointer, _sel_configureAsServer); } - bool preflightAndReturnError_( - ffi.Pointer> error) { - return _objc_msgSend_255( - this.pointer, _sel_preflightAndReturnError_, error); + void performInModes_block_(objc.NSArray modes, ObjCBlock_ffiVoid block) { + _objc_msgSend_248( + this.pointer, _sel_performInModes_block_, modes.pointer, block.pointer); } - bool loadAndReturnError_(ffi.Pointer> error) { - return _objc_msgSend_255(this.pointer, _sel_loadAndReturnError_, error); + void performBlock_(ObjCBlock_ffiVoid block) { + _objc_msgSend_249(this.pointer, _sel_performBlock_, block.pointer); } - NSURL get bundleURL { - final _ret = _objc_msgSend_466(this.pointer, _sel_bundleURL); - return NSURL._(_ret, retain: true, release: true); + void performSelector_target_argument_order_modes_( + ffi.Pointer aSelector, + objc.NSObject target, + objc.NSObject? arg, + int order, + objc.NSArray modes) { + _objc_msgSend_250( + this.pointer, + _sel_performSelector_target_argument_order_modes_, + aSelector, + target.pointer, + arg?.pointer ?? ffi.nullptr, + order, + modes.pointer); } - NSURL? get resourceURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_resourceURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + void cancelPerformSelector_target_argument_( + ffi.Pointer aSelector, + objc.NSObject target, + objc.NSObject? arg) { + _objc_msgSend_251(this.pointer, _sel_cancelPerformSelector_target_argument_, + aSelector, target.pointer, arg?.pointer ?? ffi.nullptr); } - NSURL? get executableURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_executableURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + void cancelPerformSelectorsWithTarget_(objc.NSObject target) { + _objc_msgSend_49( + this.pointer, _sel_cancelPerformSelectorsWithTarget_, target.pointer); } - NSURL? URLForAuxiliaryExecutable_(NSString executableName) { - final _ret = _objc_msgSend_257( - this.pointer, _sel_URLForAuxiliaryExecutable_, executableName.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + @override + NSRunLoop init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSRunLoop.castFromPointer(_ret, retain: true, release: true); } - NSURL? get privateFrameworksURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_privateFrameworksURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + static NSRunLoop new1() { + final _ret = _objc_msgSend_40(_class_NSRunLoop, _sel_new); + return NSRunLoop.castFromPointer(_ret, retain: false, release: true); } - NSURL? get sharedFrameworksURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_sharedFrameworksURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + static NSRunLoop allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSRunLoop, _sel_allocWithZone_, zone); + return NSRunLoop.castFromPointer(_ret, retain: false, release: true); } - NSURL? get sharedSupportURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_sharedSupportURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + static NSRunLoop alloc() { + final _ret = _objc_msgSend_40(_class_NSRunLoop, _sel_alloc); + return NSRunLoop.castFromPointer(_ret, retain: false, release: true); } - NSURL? get builtInPlugInsURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_builtInPlugInsURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSRunLoop, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSURL? get appStoreReceiptURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_appStoreReceiptURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSRunLoop, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSString get bundlePath { - final _ret = _objc_msgSend_21(this.pointer, _sel_bundlePath); - return NSString._(_ret, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSRunLoop, _sel_accessInstanceVariablesDirectly); } - NSString? get resourcePath { - final _ret = _objc_msgSend_44(this.pointer, _sel_resourcePath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSRunLoop, _sel_useStoredAccessor); } - NSString? get executablePath { - final _ret = _objc_msgSend_44(this.pointer, _sel_executablePath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSRunLoop, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSString? pathForAuxiliaryExecutable_(NSString executableName) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_pathForAuxiliaryExecutable_, executableName.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSRunLoop, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSString? get privateFrameworksPath { - final _ret = _objc_msgSend_44(this.pointer, _sel_privateFrameworksPath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSRunLoop, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSString? get sharedFrameworksPath { - final _ret = _objc_msgSend_44(this.pointer, _sel_sharedFrameworksPath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSRunLoop, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? get sharedSupportPath { - final _ret = _objc_msgSend_44(this.pointer, _sel_sharedSupportPath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSRunLoop, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSString? get builtInPlugInsPath { - final _ret = _objc_msgSend_44(this.pointer, _sel_builtInPlugInsPath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } +late final _class_NSRunLoop = objc.getClass("NSRunLoop"); +late final _sel_currentRunLoop = objc.registerName("currentRunLoop"); +final _objc_msgSend_203 = 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"); - static NSURL? URLForResource_withExtension_subdirectory_inBundleWithURL_( - NSString? name, NSString? ext, NSString? subpath, NSURL bundleURL) { - final _ret = _objc_msgSend_698( - _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 - : NSURL._(_ret, retain: true, release: true); - } +final class __CFRunLoop extends ffi.Opaque {} - static NSArray? URLsForResourcesWithExtension_subdirectory_inBundleWithURL_( - NSString? ext, NSString? subpath, NSURL bundleURL) { - final _ret = _objc_msgSend_699( - _class_NSBundle, - _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_, - ext?.pointer ?? ffi.nullptr, - subpath?.pointer ?? ffi.nullptr, - bundleURL.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } +late final _sel_getCFRunLoop = objc.registerName("getCFRunLoop"); +final _objc_msgSend_204 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer<__CFRunLoop> Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer<__CFRunLoop> Function( + ffi.Pointer, ffi.Pointer)>(); - NSURL? URLForResource_withExtension_(NSString? name, NSString? ext) { - final _ret = _objc_msgSend_700( - this.pointer, - _sel_URLForResource_withExtension_, - name?.pointer ?? ffi.nullptr, - ext?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } +class NSTimer extends objc.NSObject { + NSTimer._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSURL? URLForResource_withExtension_subdirectory_( - NSString? name, NSString? ext, NSString? subpath) { - final _ret = _objc_msgSend_701( - this.pointer, - _sel_URLForResource_withExtension_subdirectory_, - name?.pointer ?? ffi.nullptr, - ext?.pointer ?? ffi.nullptr, - subpath?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } + /// Constructs a [NSTimer] that points to the same underlying object as [other]. + NSTimer.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSURL? URLForResource_withExtension_subdirectory_localization_(NSString? name, - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _objc_msgSend_702( - 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 - : NSURL._(_ret, 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); - NSArray? URLsForResourcesWithExtension_subdirectory_( - NSString? ext, NSString? subpath) { - final _ret = _objc_msgSend_703( - this.pointer, - _sel_URLsForResourcesWithExtension_subdirectory_, - ext?.pointer ?? ffi.nullptr, - subpath?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSTimer]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTimer); } - NSArray? URLsForResourcesWithExtension_subdirectory_localization_( - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _objc_msgSend_704( - this.pointer, - _sel_URLsForResourcesWithExtension_subdirectory_localization_, - ext?.pointer ?? ffi.nullptr, - subpath?.pointer ?? ffi.nullptr, - localizationName?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + static NSTimer timerWithTimeInterval_invocation_repeats_( + double ti, objc.NSInvocation invocation, bool yesOrNo) { + final _ret = _objc_msgSend_205( + _class_NSTimer, + _sel_timerWithTimeInterval_invocation_repeats_, + ti, + invocation.pointer, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - static NSString? pathForResource_ofType_inDirectory_( - NSString? name, NSString? ext, NSString bundlePath) { - final _ret = _objc_msgSend_705( - _class_NSBundle, - _sel_pathForResource_ofType_inDirectory_, - name?.pointer ?? ffi.nullptr, - ext?.pointer ?? ffi.nullptr, - bundlePath.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static NSTimer scheduledTimerWithTimeInterval_invocation_repeats_( + double ti, objc.NSInvocation invocation, bool yesOrNo) { + final _ret = _objc_msgSend_205( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_invocation_repeats_, + ti, + invocation.pointer, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - static NSArray pathsForResourcesOfType_inDirectory_( - NSString? ext, NSString bundlePath) { - final _ret = _objc_msgSend_706( - _class_NSBundle, - _sel_pathsForResourcesOfType_inDirectory_, - ext?.pointer ?? ffi.nullptr, - bundlePath.pointer); - return NSArray._(_ret, retain: true, release: true); + static NSTimer timerWithTimeInterval_target_selector_userInfo_repeats_( + double ti, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? userInfo, + bool yesOrNo) { + final _ret = _objc_msgSend_206( + _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); } - NSString? pathForResource_ofType_(NSString? name, NSString? ext) { - final _ret = _objc_msgSend_707(this.pointer, _sel_pathForResource_ofType_, - name?.pointer ?? ffi.nullptr, ext?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static NSTimer + scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_( + double ti, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? userInfo, + bool yesOrNo) { + final _ret = _objc_msgSend_206( + _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); } - NSString? pathForResource_ofType_inDirectory_forLocalization_(NSString? name, - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _objc_msgSend_708( - this.pointer, - _sel_pathForResource_ofType_inDirectory_forLocalization_, - name?.pointer ?? ffi.nullptr, - ext?.pointer ?? ffi.nullptr, - subpath?.pointer ?? ffi.nullptr, - localizationName?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static NSTimer timerWithTimeInterval_repeats_block_( + double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { + final _ret = _objc_msgSend_207( + _class_NSTimer, + _sel_timerWithTimeInterval_repeats_block_, + interval, + repeats, + block.pointer); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - NSArray pathsForResourcesOfType_inDirectory_forLocalization_( - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _objc_msgSend_709( - this.pointer, - _sel_pathsForResourcesOfType_inDirectory_forLocalization_, - ext?.pointer ?? ffi.nullptr, - subpath?.pointer ?? ffi.nullptr, - localizationName?.pointer ?? ffi.nullptr); - return NSArray._(_ret, retain: true, release: true); + static NSTimer scheduledTimerWithTimeInterval_repeats_block_( + double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { + final _ret = _objc_msgSend_207( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_repeats_block_, + interval, + repeats, + block.pointer); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - NSString localizedStringForKey_value_table_( - NSString key, NSString? value, NSString? tableName) { - final _ret = _objc_msgSend_710( + NSTimer initWithFireDate_interval_repeats_block_(objc.NSDate date, + double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { + final _ret = _objc_msgSend_208( this.pointer, - _sel_localizedStringForKey_value_table_, - key.pointer, - value?.pointer ?? ffi.nullptr, - tableName?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); + _sel_initWithFireDate_interval_repeats_block_, + date.pointer, + interval, + repeats, + block.pointer); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString localizedAttributedStringForKey_value_table_( - NSString key, NSString? value, NSString? tableName) { - final _ret = _objc_msgSend_736( + NSTimer initWithFireDate_interval_target_selector_userInfo_repeats_( + objc.NSDate date, + double ti, + objc.NSObject t, + ffi.Pointer s, + objc.NSObject? ui, + bool rep) { + final _ret = _objc_msgSend_209( this.pointer, - _sel_localizedAttributedStringForKey_value_table_, - key.pointer, - value?.pointer ?? ffi.nullptr, - tableName?.pointer ?? ffi.nullptr); - return NSAttributedString._(_ret, retain: true, release: true); - } - - NSString? get bundleIdentifier { - final _ret = _objc_msgSend_44(this.pointer, _sel_bundleIdentifier); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSDictionary? get infoDictionary { - final _ret = _objc_msgSend_390(this.pointer, _sel_infoDictionary); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSDictionary? get localizedInfoDictionary { - final _ret = _objc_msgSend_390(this.pointer, _sel_localizedInfoDictionary); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + _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); } - NSObject? objectForInfoDictionaryKey_(NSString key) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_objectForInfoDictionaryKey_, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + void fire() { + _objc_msgSend_82(this.pointer, _sel_fire); } - NSObject? classNamed_(NSString className) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_classNamed_, className.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + objc.NSDate get fireDate { + final _ret = _objc_msgSend_210(this.pointer, _sel_fireDate); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSObject? get principalClass { - final _ret = _objc_msgSend_17(this.pointer, _sel_principalClass); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + set fireDate(objc.NSDate value) { + return _objc_msgSend_211(this.pointer, _sel_setFireDate_, value.pointer); } - NSArray get preferredLocalizations { - final _ret = _objc_msgSend_85(this.pointer, _sel_preferredLocalizations); - return NSArray._(_ret, retain: true, release: true); + double get timeInterval { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeInterval) + : _objc_msgSend_115(this.pointer, _sel_timeInterval); } - NSArray get localizations { - final _ret = _objc_msgSend_85(this.pointer, _sel_localizations); - return NSArray._(_ret, retain: true, release: true); + double get tolerance { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_tolerance) + : _objc_msgSend_115(this.pointer, _sel_tolerance); } - NSString? get developmentLocalization { - final _ret = _objc_msgSend_44(this.pointer, _sel_developmentLocalization); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + set tolerance(double value) { + return _objc_msgSend_212(this.pointer, _sel_setTolerance_, value); } - static NSArray preferredLocalizationsFromArray_(NSArray localizationsArray) { - final _ret = _objc_msgSend_68(_class_NSBundle, - _sel_preferredLocalizationsFromArray_, localizationsArray.pointer); - return NSArray._(_ret, retain: true, release: true); + void invalidate() { + _objc_msgSend_82(this.pointer, _sel_invalidate); } - static NSArray preferredLocalizationsFromArray_forPreferences_( - NSArray localizationsArray, NSArray? preferencesArray) { - final _ret = _objc_msgSend_737( - _class_NSBundle, - _sel_preferredLocalizationsFromArray_forPreferences_, - localizationsArray.pointer, - preferencesArray?.pointer ?? ffi.nullptr); - return NSArray._(_ret, retain: true, release: true); + bool get valid { + return _objc_msgSend_7(this.pointer, _sel_isValid); } - NSArray? get executableArchitectures { - final _ret = _objc_msgSend_84(this.pointer, _sel_executableArchitectures); + objc.NSObject? get userInfo { + final _ret = _objc_msgSend_66(this.pointer, _sel_userInfo); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); - } - - void setPreservationPriority_forTags_(double priority, NSSet tags) { - _objc_msgSend_738(this.pointer, _sel_setPreservationPriority_forTags_, - priority, tags.pointer); - } - - double preservationPriorityForTag_(NSString tag) { - return objc.useMsgSendVariants - ? _objc_msgSend_308Fpret( - this.pointer, _sel_preservationPriorityForTag_, tag.pointer) - : _objc_msgSend_308( - this.pointer, _sel_preservationPriorityForTag_, tag.pointer); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } @override - NSBundle init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSBundle._(_ret, retain: true, release: true); + NSTimer init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - static NSBundle new1() { - final _ret = _objc_msgSend_2(_class_NSBundle, _sel_new); - return NSBundle._(_ret, retain: false, release: true); + static NSTimer new1() { + final _ret = _objc_msgSend_40(_class_NSTimer, _sel_new); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } - static NSBundle allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSBundle, _sel_allocWithZone_, zone); - return NSBundle._(_ret, retain: false, release: true); + static NSTimer allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSTimer, _sel_allocWithZone_, zone); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } - static NSBundle alloc() { - final _ret = _objc_msgSend_2(_class_NSBundle, _sel_alloc); - return NSBundle._(_ret, retain: false, release: true); + static NSTimer alloc() { + final _ret = _objc_msgSend_40(_class_NSTimer, _sel_alloc); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSBundle, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTimer, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSBundle, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTimer, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSBundle, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSTimer, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSBundle, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSTimer, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSBundle, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTimer, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSBundle, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSTimer, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSBundle, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTimer, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { + static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = - _objc_msgSend_85(_class_NSBundle, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + _objc_msgSend_6(_class_NSTimer, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSBundle, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSTimer, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } -} - -late final _class_NSBundle = objc.getClass("NSBundle"); -late final _sel_mainBundle = objc.registerName("mainBundle"); -final _objc_msgSend_695 = 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:"); -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:"); -final _objc_msgSend_696 = 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_697 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_allBundles = objc.registerName("allBundles"); -late final _sel_allFrameworks = objc.registerName("allFrameworks"); -late final _sel_isLoaded = objc.registerName("isLoaded"); -late final _sel_unload = objc.registerName("unload"); -late final _sel_preflightAndReturnError_ = - objc.registerName("preflightAndReturnError:"); -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_698 = objc.msgSendPointer +} + +late final _class_NSTimer = objc.getClass("NSTimer"); +late final _sel_timerWithTimeInterval_invocation_repeats_ = + objc.registerName("timerWithTimeInterval:invocation:repeats:"); +final _objc_msgSend_205 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Double, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + double, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_ = - objc.registerName( - "URLsForResourcesWithExtension:subdirectory:inBundleWithURL:"); -final _objc_msgSend_699 = 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_206 = 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_700 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( + ffi.Double, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool)>>() .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_701 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( + double, 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_702 = 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); +final _ObjCBlock_ffiVoid_NSTimer_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSTimer_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSTimer_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSTimer_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSTimer_closureRegistry[block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_NSTimer extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSTimer._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSTimer castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSTimer._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSTimer.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSTimer.fromFunction(void Function(NSTimer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSTimer_registerClosure( + (ffi.Pointer arg0) => fn( + NSTimer.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSTimer.listener(void Function(NSTimer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSTimer_registerClosure( + (ffi.Pointer arg0) => fn( + NSTimer.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSTimer arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(pointer, arg0.pointer); +} + +late final _sel_timerWithTimeInterval_repeats_block_ = + objc.registerName("timerWithTimeInterval:repeats:block:"); +final _objc_msgSend_207 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Double, + ffi.Bool, + 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_703 = 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_208 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Double, + ffi.Bool, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_URLsForResourcesWithExtension_subdirectory_localization_ = objc - .registerName("URLsForResourcesWithExtension:subdirectory:localization:"); -final _objc_msgSend_704 = objc.msgSendPointer + double, + bool, + ffi.Pointer)>(); +late final _sel_initWithFireDate_interval_target_selector_userInfo_repeats_ = + objc.registerName( + "initWithFireDate:interval:target:selector:userInfo:repeats:"); +final _objc_msgSend_209 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype 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_705 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( + ffi.Double, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_pathsForResourcesOfType_inDirectory_ = - objc.registerName("pathsForResourcesOfType:inDirectory:"); -final _objc_msgSend_706 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( + double, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_pathForResource_ofType_ = - objc.registerName("pathForResource:ofType:"); -final _objc_msgSend_707 = objc.msgSendPointer + bool)>(); +late final _sel_fire = objc.registerName("fire"); +late final _sel_fireDate = objc.registerName("fireDate"); +final _objc_msgSend_210 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(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_708 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setFireDate_ = objc.registerName("setFireDate:"); +final _objc_msgSend_211 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void 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_709 = objc.msgSendPointer + 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_212 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() .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_710 = objc.msgSendPointer + 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_213 = 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)>(); -class NSAttributedString extends NSObject { - NSAttributedString._(ffi.Pointer pointer, +class NSPort extends objc.NSObject { + NSPort._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSAttributedString] that points to the same underlying object as [other]. - static NSAttributedString castFrom(T other) { - return NSAttributedString._(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.pointer, retain: true, release: true); - /// Returns a [NSAttributedString] that wraps the given raw object pointer. - static NSAttributedString castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSAttributedString._(other, retain: retain, release: release); - } + /// 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 [NSAttributedString]. + /// Returns whether [obj] is an instance of [NSPort]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSAttributedString); - } - - NSString get string { - final _ret = _objc_msgSend_21(this.pointer, _sel_string); - return NSString._(_ret, retain: true, release: true); - } - - NSDictionary attributesAtIndex_effectiveRange_( - int location, ffi.Pointer<_NSRange> range) { - final _ret = _objc_msgSend_711( - this.pointer, _sel_attributesAtIndex_effectiveRange_, location, range); - return NSDictionary._(_ret, retain: true, release: true); - } - - int get length { - return _objc_msgSend_10(this.pointer, _sel_length); - } - - NSObject? attribute_atIndex_effectiveRange_( - NSString attrName, int location, ffi.Pointer<_NSRange> range) { - final _ret = _objc_msgSend_712( - this.pointer, - _sel_attribute_atIndex_effectiveRange_, - attrName.pointer, - location, - range); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSAttributedString attributedSubstringFromRange_(_NSRange range) { - final _ret = _objc_msgSend_713( - this.pointer, _sel_attributedSubstringFromRange_, range); - return NSAttributedString._(_ret, retain: true, release: true); - } - - NSDictionary attributesAtIndex_longestEffectiveRange_inRange_( - int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { - final _ret = _objc_msgSend_714( - this.pointer, - _sel_attributesAtIndex_longestEffectiveRange_inRange_, - location, - range, - rangeLimit); - return NSDictionary._(_ret, retain: true, release: true); - } - - NSObject? attribute_atIndex_longestEffectiveRange_inRange_(NSString attrName, - int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { - final _ret = _objc_msgSend_715( - this.pointer, - _sel_attribute_atIndex_longestEffectiveRange_inRange_, - attrName.pointer, - location, - range, - rangeLimit); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - bool isEqualToAttributedString_(NSAttributedString other) { - return _objc_msgSend_716( - this.pointer, _sel_isEqualToAttributedString_, other.pointer); - } - - NSAttributedString initWithString_(NSString str) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithString_, str.pointer); - return NSAttributedString._(_ret, retain: true, release: true); - } - - NSAttributedString initWithString_attributes_( - NSString str, NSDictionary? attrs) { - final _ret = _objc_msgSend_717( - this.pointer, - _sel_initWithString_attributes_, - str.pointer, - attrs?.pointer ?? ffi.nullptr); - return NSAttributedString._(_ret, retain: true, release: true); - } - - NSAttributedString initWithAttributedString_(NSAttributedString attrStr) { - final _ret = _objc_msgSend_718( - this.pointer, _sel_initWithAttributedString_, attrStr.pointer); - return NSAttributedString._(_ret, retain: true, release: true); + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSPort); } - void enumerateAttributesInRange_options_usingBlock_(_NSRange enumerationRange, - int opts, ObjCBlock_ffiVoid_NSDictionary_NSRange_bool block) { - _objc_msgSend_719( - this.pointer, - _sel_enumerateAttributesInRange_options_usingBlock_, - enumerationRange, - opts, - block.pointer); + static NSPort port() { + final _ret = _objc_msgSend_214(_class_NSPort, _sel_port); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - void enumerateAttribute_inRange_options_usingBlock_( - NSString attrName, - _NSRange enumerationRange, - int opts, - ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool block) { - _objc_msgSend_720( - this.pointer, - _sel_enumerateAttribute_inRange_options_usingBlock_, - attrName.pointer, - enumerationRange, - opts, - block.pointer); + void invalidate() { + _objc_msgSend_82(this.pointer, _sel_invalidate); } - NSAttributedString? - initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( - NSURL markdownFile, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _objc_msgSend_725( - this.pointer, - _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, - markdownFile.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSAttributedString._(_ret, retain: true, release: true); + bool get valid { + return _objc_msgSend_7(this.pointer, _sel_isValid); } - NSAttributedString? initWithMarkdown_options_baseURL_error_( - NSData markdown, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _objc_msgSend_726( - this.pointer, - _sel_initWithMarkdown_options_baseURL_error_, - markdown.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSAttributedString._(_ret, retain: true, release: true); + void setDelegate_(objc.NSObject? anObject) { + _objc_msgSend_215( + this.pointer, _sel_setDelegate_, anObject?.pointer ?? ffi.nullptr); } - NSAttributedString? initWithMarkdownString_options_baseURL_error_( - NSString markdownString, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _objc_msgSend_727( - this.pointer, - _sel_initWithMarkdownString_options_baseURL_error_, - markdownString.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); + objc.NSObject? delegate() { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); return _ret.address == 0 ? null - : NSAttributedString._(_ret, retain: true, release: true); - } - - NSAttributedString initWithFormat_options_locale_( - NSAttributedString format, int options, NSLocale? locale) { - final _ret = _objc_msgSend_728( - this.pointer, - _sel_initWithFormat_options_locale_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr); - return NSAttributedString._(_ret, retain: true, release: true); - } - - NSAttributedString initWithFormat_options_locale_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _objc_msgSend_729( - this.pointer, - _sel_initWithFormat_options_locale_arguments_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr, - arguments); - return NSAttributedString._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSAttributedString localizedAttributedStringWithFormat_( - NSAttributedString format) { - final _ret = _objc_msgSend_718(_class_NSAttributedString, - _sel_localizedAttributedStringWithFormat_, format.pointer); - return NSAttributedString._(_ret, retain: true, release: true); + void scheduleInRunLoop_forMode_(NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + runLoop.pointer, mode.pointer); } - static NSAttributedString localizedAttributedStringWithFormat_options_( - NSAttributedString format, int options) { - final _ret = _objc_msgSend_730( - _class_NSAttributedString, - _sel_localizedAttributedStringWithFormat_options_, - format.pointer, - options); - return NSAttributedString._(_ret, retain: true, release: true); + void removeFromRunLoop_forMode_(NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_removeFromRunLoop_forMode_, + runLoop.pointer, mode.pointer); } - NSAttributedString initWithFormat_options_locale_context_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context) { - final _ret = _objc_msgSend_731( - this.pointer, - _sel_initWithFormat_options_locale_context_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr, - context.pointer); - return NSAttributedString._(_ret, retain: true, release: true); + int get reservedSpaceLength { + return _objc_msgSend_29(this.pointer, _sel_reservedSpaceLength); } - NSAttributedString initWithFormat_options_locale_context_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _objc_msgSend_732( - this.pointer, - _sel_initWithFormat_options_locale_context_arguments_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr, - context.pointer, - arguments); - return NSAttributedString._(_ret, retain: true, release: true); + bool sendBeforeDate_components_from_reserved_( + objc.NSDate limitDate, + objc.NSMutableArray? components, + NSPort? receivePort, + int headerSpaceReserved) { + return _objc_msgSend_217( + this.pointer, + _sel_sendBeforeDate_components_from_reserved_, + limitDate.pointer, + components?.pointer ?? ffi.nullptr, + receivePort?.pointer ?? ffi.nullptr, + headerSpaceReserved); } - static NSAttributedString localizedAttributedStringWithFormat_context_( - NSAttributedString format, NSDictionary context) { - final _ret = _objc_msgSend_733( - _class_NSAttributedString, - _sel_localizedAttributedStringWithFormat_context_, - format.pointer, - context.pointer); - return NSAttributedString._(_ret, retain: true, release: true); + bool sendBeforeDate_msgid_components_from_reserved_( + objc.NSDate limitDate, + int msgID, + objc.NSMutableArray? components, + NSPort? receivePort, + int headerSpaceReserved) { + return _objc_msgSend_218( + this.pointer, + _sel_sendBeforeDate_msgid_components_from_reserved_, + limitDate.pointer, + msgID, + components?.pointer ?? ffi.nullptr, + receivePort?.pointer ?? ffi.nullptr, + headerSpaceReserved); } - static NSAttributedString - localizedAttributedStringWithFormat_options_context_( - NSAttributedString format, int options, NSDictionary context) { - final _ret = _objc_msgSend_734( - _class_NSAttributedString, - _sel_localizedAttributedStringWithFormat_options_context_, - format.pointer, - options, - context.pointer); - return NSAttributedString._(_ret, retain: true, release: true); + void addConnection_toRunLoop_forMode_( + NSConnection conn, NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_243(this.pointer, _sel_addConnection_toRunLoop_forMode_, + conn.pointer, runLoop.pointer, mode.pointer); } - NSAttributedString attributedStringByInflectingString() { - final _ret = _objc_msgSend_735( - this.pointer, _sel_attributedStringByInflectingString); - return NSAttributedString._(_ret, retain: true, release: true); + void removeConnection_fromRunLoop_forMode_( + NSConnection conn, NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_243(this.pointer, _sel_removeConnection_fromRunLoop_forMode_, + conn.pointer, runLoop.pointer, mode.pointer); } @override - NSAttributedString init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSAttributedString._(_ret, retain: true, release: true); + NSPort init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - static NSAttributedString new1() { - final _ret = _objc_msgSend_2(_class_NSAttributedString, _sel_new); - return NSAttributedString._(_ret, retain: false, release: true); + static NSPort new1() { + final _ret = _objc_msgSend_40(_class_NSPort, _sel_new); + return NSPort.castFromPointer(_ret, retain: false, release: true); } - static NSAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSAttributedString, _sel_allocWithZone_, zone); - return NSAttributedString._(_ret, retain: false, release: true); + static NSPort allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSPort, _sel_allocWithZone_, zone); + return NSPort.castFromPointer(_ret, retain: false, release: true); } - static NSAttributedString alloc() { - final _ret = _objc_msgSend_2(_class_NSAttributedString, _sel_alloc); - return NSAttributedString._(_ret, retain: false, release: true); + static NSPort alloc() { + final _ret = _objc_msgSend_40(_class_NSPort, _sel_alloc); + return NSPort.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSAttributedString, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPort, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSAttributedString, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPort, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSAttributedString, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7(_class_NSPort, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSAttributedString, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSPort, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSAttributedString, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPort, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSAttributedString, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51( + _class_NSPort, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSAttributedString, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPort, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSAttributedString, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSPort, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSAttributedString, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSPort, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSAttributedString = objc.getClass("NSAttributedString"); -late final _sel_attributesAtIndex_effectiveRange_ = - objc.registerName("attributesAtIndex:effectiveRange:"); -final _objc_msgSend_711 = objc.msgSendPointer +late final _class_NSPort = objc.getClass("NSPort"); +late final _sel_port = objc.registerName("port"); +final _objc_msgSend_214 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, ffi.Pointer<_NSRange>)>(); -late final _sel_attribute_atIndex_effectiveRange_ = - objc.registerName("attribute:atIndex:effectiveRange:"); -final _objc_msgSend_712 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDelegate_ = objc.registerName("setDelegate:"); +final _objc_msgSend_215 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_NSRange>)>(); -late final _sel_attributedSubstringFromRange_ = - objc.registerName("attributedSubstringFromRange:"); -final _objc_msgSend_713 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); -late final _sel_attributesAtIndex_longestEffectiveRange_inRange_ = - objc.registerName("attributesAtIndex:longestEffectiveRange:inRange:"); -final _objc_msgSend_714 = objc.msgSendPointer + 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_216 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>, - _NSRange)>>() + ffi.Pointer, + ffi.Pointer)>>() .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_715 = objc.msgSendPointer + 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_217 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>, - _NSRange)>>() + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function( + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer<_NSRange>, - _NSRange)>(); -late final _sel_isEqualToAttributedString_ = - objc.registerName("isEqualToAttributedString:"); -final _objc_msgSend_716 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_sendBeforeDate_msgid_components_from_reserved_ = + objc.registerName("sendBeforeDate:msgid:components:from:reserved:"); +final _objc_msgSend_218 = 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_attributes_ = - objc.registerName("initWithString:attributes:"); -final _objc_msgSend_717 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( ffi.Pointer, - ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.UnsignedLong)>>() .asFunction< - instancetype Function( + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_initWithAttributedString_ = - objc.registerName("initWithAttributedString:"); -final _objc_msgSend_718 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + int, + ffi.Pointer, + ffi.Pointer, + int)>(); -abstract class NSAttributedStringEnumerationOptions { - static const int NSAttributedStringEnumerationReverse = 2; - static const int - NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = 1048576; -} +class NSConnection extends objc.NSObject { + NSConnection._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -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); -final _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( - void Function( - ffi.Pointer, _NSRange, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + /// Constructs a [NSConnection] that points to the same underlying object as [other]. + NSConnection.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + /// 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); -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 [NSConnection]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSConnection); + } - /// 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); + objc.NSDictionary get statistics { + final _ret = _objc_msgSend_112(this.pointer, _sel_statistics); + return objc.NSDictionary.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_NSDictionary_NSRange_bool.fromFunctionPointer( - ffi.Pointer< - ffi - .NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - _NSRange arg1, ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _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; + static objc.NSArray allConnections() { + final _ret = _objc_msgSend_6(_class_NSConnection, _sel_allConnections); + 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. - ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.fromFunction( - void Function(NSDictionary, _NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(NSDictionary._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.Pointer? _dartFuncTrampoline; + static NSConnection defaultConnection() { + final _ret = _objc_msgSend_219(_class_NSConnection, _sel_defaultConnection); + return NSConnection.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(NSDictionary, _NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(NSDictionary._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static NSConnection? connectionWithRegisteredName_host_( + objc.NSString name, objc.NSString? hostName) { + final _ret = _objc_msgSend_220( + _class_NSConnection, + _sel_connectionWithRegisteredName_host_, + name.pointer, + hostName?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); + } - void call(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); -} + static NSConnection? connectionWithRegisteredName_host_usingNameServer_( + objc.NSString name, objc.NSString? hostName, NSPortNameServer server) { + final _ret = _objc_msgSend_225( + _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); + } -late final _sel_enumerateAttributesInRange_options_usingBlock_ = - objc.registerName("enumerateAttributesInRange:options:usingBlock:"); -final _objc_msgSend_719 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - 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); -final _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( - void Function( - ffi.Pointer, _NSRange, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + static NSDistantObject? rootProxyForConnectionWithRegisteredName_host_( + objc.NSString name, objc.NSString? hostName) { + final _ret = _objc_msgSend_233( + _class_NSConnection, + _sel_rootProxyForConnectionWithRegisteredName_host_, + name.pointer, + hostName?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + static NSDistantObject? + rootProxyForConnectionWithRegisteredName_host_usingNameServer_( + objc.NSString name, + objc.NSString? hostName, + NSPortNameServer server) { + final _ret = _objc_msgSend_234( + _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); + } + + static NSConnection? serviceConnectionWithName_rootObject_usingNameServer_( + objc.NSString name, objc.NSObject root, NSPortNameServer server) { + final _ret = _objc_msgSend_235( + _class_NSConnection, + _sel_serviceConnectionWithName_rootObject_usingNameServer_, + name.pointer, + root.pointer, + server.pointer); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); + } + + static NSConnection? serviceConnectionWithName_rootObject_( + objc.NSString name, objc.NSObject root) { + final _ret = _objc_msgSend_236(_class_NSConnection, + _sel_serviceConnectionWithName_rootObject_, name.pointer, root.pointer); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); + } + + double get requestTimeout { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_requestTimeout) + : _objc_msgSend_115(this.pointer, _sel_requestTimeout); + } + + set requestTimeout(double value) { + return _objc_msgSend_212(this.pointer, _sel_setRequestTimeout_, value); + } + + double get replyTimeout { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_replyTimeout) + : _objc_msgSend_115(this.pointer, _sel_replyTimeout); + } + + set replyTimeout(double value) { + return _objc_msgSend_212(this.pointer, _sel_setReplyTimeout_, value); + } + + objc.NSObject? get rootObject { + final _ret = _objc_msgSend_66(this.pointer, _sel_rootObject); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + set rootObject(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setRootObject_, value?.pointer ?? ffi.nullptr); + } + + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); + } + + bool get independentConversationQueueing { + return _objc_msgSend_7(this.pointer, _sel_independentConversationQueueing); + } + + set independentConversationQueueing(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setIndependentConversationQueueing_, value); + } + + bool get valid { + return _objc_msgSend_7(this.pointer, _sel_isValid); + } + + NSDistantObject get rootProxy { + final _ret = _objc_msgSend_237(this.pointer, _sel_rootProxy); + return NSDistantObject.castFromPointer(_ret, retain: true, release: true); + } + + void invalidate() { + _objc_msgSend_82(this.pointer, _sel_invalidate); + } + + void addRequestMode_(objc.NSString rmode) { + _objc_msgSend_98(this.pointer, _sel_addRequestMode_, rmode.pointer); + } + + void removeRequestMode_(objc.NSString rmode) { + _objc_msgSend_98(this.pointer, _sel_removeRequestMode_, rmode.pointer); + } + + objc.NSArray get requestModes { + final _ret = _objc_msgSend_6(this.pointer, _sel_requestModes); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + bool registerName_(objc.NSString? name) { + return _objc_msgSend_238( + this.pointer, _sel_registerName_, name?.pointer ?? ffi.nullptr); + } + + bool registerName_withNameServer_( + objc.NSString? name, NSPortNameServer server) { + return _objc_msgSend_239(this.pointer, _sel_registerName_withNameServer_, + name?.pointer ?? ffi.nullptr, server.pointer); + } + + static NSConnection? connectionWithReceivePort_sendPort_( + NSPort? receivePort, NSPort? sendPort) { + final _ret = _objc_msgSend_240( + _class_NSConnection, + _sel_connectionWithReceivePort_sendPort_, + receivePort?.pointer ?? ffi.nullptr, + sendPort?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject? currentConversation() { + final _ret = + _objc_msgSend_66(_class_NSConnection, _sel_currentConversation); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } -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); + NSConnection? initWithReceivePort_sendPort_( + NSPort? receivePort, NSPort? sendPort) { + final _ret = _objc_msgSend_240( + this.pointer, + _sel_initWithReceivePort_sendPort_, + receivePort?.pointer ?? ffi.nullptr, + sendPort?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); + } - /// 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); + NSPort get sendPort { + final _ret = _objc_msgSend_214(this.pointer, _sel_sendPort); + return NSPort.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_objcObjCObject_NSRange_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - _NSRange arg1, ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _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; + NSPort get receivePort { + final _ret = _objc_msgSend_214(this.pointer, _sel_receivePort); + return NSPort.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. - ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool.fromFunction( - void Function(NSObject?, _NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSObject._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.Pointer? _dartFuncTrampoline; + void enableMultipleThreads() { + _objc_msgSend_82(this.pointer, _sel_enableMultipleThreads); + } - /// 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(NSObject?, _NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSObject._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>? _dartFuncListenerTrampoline; + bool get multipleThreadsEnabled { + return _objc_msgSend_7(this.pointer, _sel_multipleThreadsEnabled); + } - void call(NSObject? 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); -} + void addRunLoop_(NSRunLoop runloop) { + _objc_msgSend_241(this.pointer, _sel_addRunLoop_, runloop.pointer); + } -late final _sel_enumerateAttribute_inRange_options_usingBlock_ = - objc.registerName("enumerateAttribute:inRange:options:usingBlock:"); -final _objc_msgSend_720 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); + void removeRunLoop_(NSRunLoop runloop) { + _objc_msgSend_241(this.pointer, _sel_removeRunLoop_, runloop.pointer); + } -class NSAttributedStringMarkdownParsingOptions extends NSObject { - NSAttributedStringMarkdownParsingOptions._( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) - : super._(pointer, retain: retain, release: release); + void runInNewThread() { + _objc_msgSend_82(this.pointer, _sel_runInNewThread); + } - /// Returns a [NSAttributedStringMarkdownParsingOptions] that points to the same underlying object as [other]. - static NSAttributedStringMarkdownParsingOptions - castFrom(T other) { - return NSAttributedStringMarkdownParsingOptions._(other.pointer, - retain: true, release: true); + objc.NSArray get remoteObjects { + final _ret = _objc_msgSend_6(this.pointer, _sel_remoteObjects); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSAttributedStringMarkdownParsingOptions] that wraps the given raw object pointer. - static NSAttributedStringMarkdownParsingOptions castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSAttributedStringMarkdownParsingOptions._(other, - retain: retain, release: release); + objc.NSArray get localObjects { + final _ret = _objc_msgSend_6(this.pointer, _sel_localObjects); + return objc.NSArray.castFromPointer(_ret, retain: true, 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); + void dispatchWithComponents_(objc.NSArray components) { + _objc_msgSend_242( + this.pointer, _sel_dispatchWithComponents_, components.pointer); } @override - NSAttributedStringMarkdownParsingOptions init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSAttributedStringMarkdownParsingOptions._(_ret, - retain: true, release: true); + NSConnection init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSConnection.castFromPointer(_ret, retain: true, release: true); } - bool get allowsExtendedAttributes { - return _objc_msgSend_12(this.pointer, _sel_allowsExtendedAttributes); + static NSConnection new1() { + final _ret = _objc_msgSend_40(_class_NSConnection, _sel_new); + return NSConnection.castFromPointer(_ret, retain: false, release: true); } - set allowsExtendedAttributes(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAllowsExtendedAttributes_, value); + static NSConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSConnection, _sel_allocWithZone_, zone); + return NSConnection.castFromPointer(_ret, retain: false, release: true); } - int get interpretedSyntax { - return _objc_msgSend_721(this.pointer, _sel_interpretedSyntax); + static NSConnection alloc() { + final _ret = _objc_msgSend_40(_class_NSConnection, _sel_alloc); + return NSConnection.castFromPointer(_ret, retain: false, release: true); } - set interpretedSyntax(int value) { - return _objc_msgSend_722(this.pointer, _sel_setInterpretedSyntax_, value); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSConnection, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - int get failurePolicy { - return _objc_msgSend_723(this.pointer, _sel_failurePolicy); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSConnection, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set failurePolicy(int value) { - return _objc_msgSend_724(this.pointer, _sel_setFailurePolicy_, value); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSConnection, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSConnection, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSConnection, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSConnection, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSConnection, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSConnection, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSConnection, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_219 = 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_220 = 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)>(); + +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); } - NSString? get languageCode { - final _ret = _objc_msgSend_44(this.pointer, _sel_languageCode); + static NSPortNameServer systemDefaultPortNameServer() { + final _ret = _objc_msgSend_221( + _class_NSPortNameServer, _sel_systemDefaultPortNameServer); + return NSPortNameServer.castFromPointer(_ret, retain: true, release: true); + } + + NSPort? portForName_(objc.NSString name) { + final _ret = + _objc_msgSend_222(this.pointer, _sel_portForName_, name.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSPort.castFromPointer(_ret, retain: true, release: true); } - set languageCode(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setLanguageCode_, value?.pointer ?? ffi.nullptr); + NSPort? portForName_host_(objc.NSString name, objc.NSString? host) { + final _ret = _objc_msgSend_223(this.pointer, _sel_portForName_host_, + name.pointer, host?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSPort.castFromPointer(_ret, retain: true, release: true); } - bool get appliesSourcePositionAttributes { - return _objc_msgSend_12(this.pointer, _sel_appliesSourcePositionAttributes); + bool registerPort_name_(NSPort port, objc.NSString name) { + return _objc_msgSend_224( + this.pointer, _sel_registerPort_name_, port.pointer, name.pointer); } - set appliesSourcePositionAttributes(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAppliesSourcePositionAttributes_, value); + bool removePortForName_(objc.NSString name) { + return _objc_msgSend_51( + this.pointer, _sel_removePortForName_, name.pointer); } - static NSAttributedStringMarkdownParsingOptions new1() { - final _ret = _objc_msgSend_2( - _class_NSAttributedStringMarkdownParsingOptions, _sel_new); - return NSAttributedStringMarkdownParsingOptions._(_ret, - retain: false, release: true); + @override + NSPortNameServer init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPortNameServer.castFromPointer(_ret, retain: true, release: true); } - static NSAttributedStringMarkdownParsingOptions allocWithZone_( - ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSAttributedStringMarkdownParsingOptions, - _sel_allocWithZone_, - zone); - return NSAttributedStringMarkdownParsingOptions._(_ret, - retain: false, release: true); + static NSPortNameServer new1() { + final _ret = _objc_msgSend_40(_class_NSPortNameServer, _sel_new); + return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); } - static NSAttributedStringMarkdownParsingOptions alloc() { - final _ret = _objc_msgSend_2( - _class_NSAttributedStringMarkdownParsingOptions, _sel_alloc); - return NSAttributedStringMarkdownParsingOptions._(_ret, - retain: false, release: true); + static NSPortNameServer allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSPortNameServer, _sel_allocWithZone_, zone); + return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); + } + + static NSPortNameServer alloc() { + final _ret = _objc_msgSend_40(_class_NSPortNameServer, _sel_alloc); + return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSAttributedStringMarkdownParsingOptions, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPortNameServer, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSAttributedStringMarkdownParsingOptions, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPortNameServer, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12(_class_NSAttributedStringMarkdownParsingOptions, - _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSPortNameServer, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSAttributedStringMarkdownParsingOptions, - _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSPortNameServer, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63( - _class_NSAttributedStringMarkdownParsingOptions, - _sel_keyPathsForValuesAffectingValueForKey_, - key.pointer); - return NSSet._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPortNameServer, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSAttributedStringMarkdownParsingOptions, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPortNameServer, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSAttributedStringMarkdownParsingOptions, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPortNameServer, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSAttributedStringMarkdownParsingOptions, - _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPortNameServer, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSAttributedStringMarkdownParsingOptions, - _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSPortNameServer, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_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:"); - -abstract class NSAttributedStringMarkdownInterpretedSyntax { - static const int NSAttributedStringMarkdownInterpretedSyntaxFull = 0; - static const int NSAttributedStringMarkdownInterpretedSyntaxInlineOnly = 1; - static const int - NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace = - 2; -} - -late final _sel_interpretedSyntax = objc.registerName("interpretedSyntax"); -final _objc_msgSend_721 = objc.msgSendPointer +late final _class_NSPortNameServer = objc.getClass("NSPortNameServer"); +late final _sel_systemDefaultPortNameServer = + objc.registerName("systemDefaultPortNameServer"); +final _objc_msgSend_221 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setInterpretedSyntax_ = - objc.registerName("setInterpretedSyntax:"); -final _objc_msgSend_722 = objc.msgSendPointer +late final _sel_portForName_ = objc.registerName("portForName:"); +final _objc_msgSend_222 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_portForName_host_ = objc.registerName("portForName:host:"); +final _objc_msgSend_223 = 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_224 = 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_225 = 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)>(); -abstract class NSAttributedStringMarkdownParsingFailurePolicy { - static const int NSAttributedStringMarkdownParsingFailureReturnError = 0; - static const int - NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible = - 1; +class NSDistantObject extends NSProxy { + NSDistantObject._(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 [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 [NSDistantObject]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSDistantObject); + } + + static objc.NSObject? proxyWithTarget_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_229(_class_NSDistantObject, + _sel_proxyWithTarget_connection_, target.pointer, connection.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSDistantObject? initWithTarget_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_229(this.pointer, + _sel_initWithTarget_connection_, target.pointer, connection.pointer); + return _ret.address == 0 + ? null + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject proxyWithLocal_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_230(_class_NSDistantObject, + _sel_proxyWithLocal_connection_, target.pointer, connection.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSDistantObject initWithLocal_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_230(this.pointer, _sel_initWithLocal_connection_, + target.pointer, connection.pointer); + return NSDistantObject.castFromPointer(_ret, retain: true, release: true); + } + + NSDistantObject? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); + return _ret.address == 0 + ? null + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); + } + + void setProtocolForProxy_(objc.Protocol? proto) { + _objc_msgSend_232( + this.pointer, _sel_setProtocolForProxy_, proto?.pointer ?? ffi.nullptr); + } + + NSConnection get connectionForProxy { + final _ret = _objc_msgSend_219(this.pointer, _sel_connectionForProxy); + return NSConnection.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject alloc() { + final _ret = _objc_msgSend_40(_class_NSDistantObject, _sel_alloc); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static bool respondsToSelector_(ffi.Pointer aSelector) { + return _objc_msgSend_228( + _class_NSDistantObject, _sel_respondsToSelector_, aSelector); + } } -late final _sel_failurePolicy = objc.registerName("failurePolicy"); -final _objc_msgSend_723 = objc.msgSendPointer +late final _class_NSDistantObject = objc.getClass("NSDistantObject"); + +class NSProxy extends objc.ObjCObjectBase { + NSProxy._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSProxy] that points to the same underlying object as [other]. + NSProxy.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSProxy] that wraps the given raw object pointer. + NSProxy.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSProxy]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSProxy); + } + + static objc.NSObject alloc() { + final _ret = _objc_msgSend_40(_class_NSProxy, _sel_alloc); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static objc.NSObject allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSProxy, _sel_allocWithZone_, zone); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static objc.NSObject class1() { + final _ret = _objc_msgSend_40(_class_NSProxy, _sel_class); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void forwardInvocation_(objc.NSInvocation invocation) { + _objc_msgSend_226( + this.pointer, _sel_forwardInvocation_, invocation.pointer); + } + + objc.NSMethodSignature? methodSignatureForSelector_( + ffi.Pointer sel) { + final _ret = + _objc_msgSend_227(this.pointer, _sel_methodSignatureForSelector_, sel); + return _ret.address == 0 + ? null + : objc.NSMethodSignature.castFromPointer(_ret, + retain: true, release: true); + } + + void dealloc() { + _objc_msgSend_82(this.pointer, _sel_dealloc); + } + + void finalize() { + _objc_msgSend_82(this.pointer, _sel_finalize); + } + + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString get debugDescription { + final _ret = _objc_msgSend_12(this.pointer, _sel_debugDescription); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + static bool respondsToSelector_(ffi.Pointer aSelector) { + return _objc_msgSend_228( + _class_NSProxy, _sel_respondsToSelector_, aSelector); + } + + bool allowsWeakReference() { + return _objc_msgSend_7(this.pointer, _sel_allowsWeakReference); + } + + bool retainWeakReference() { + return _objc_msgSend_7(this.pointer, _sel_retainWeakReference); + } +} + +late final _class_NSProxy = objc.getClass("NSProxy"); +late final _sel_class = objc.registerName("class"); +late final _sel_forwardInvocation_ = objc.registerName("forwardInvocation:"); +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_methodSignatureForSelector_ = + objc.registerName("methodSignatureForSelector:"); +final _objc_msgSend_227 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setFailurePolicy_ = objc.registerName("setFailurePolicy:"); -final _objc_msgSend_724 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dealloc = objc.registerName("dealloc"); +late final _sel_finalize = objc.registerName("finalize"); +late final _sel_debugDescription = objc.registerName("debugDescription"); +late final _sel_respondsToSelector_ = objc.registerName("respondsToSelector:"); +final _objc_msgSend_228 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -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_725 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allowsWeakReference = objc.registerName("allowsWeakReference"); +late final _sel_retainWeakReference = objc.registerName("retainWeakReference"); +late final _sel_proxyWithTarget_connection_ = + objc.registerName("proxyWithTarget:connection:"); +final _objc_msgSend_229 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.Pointer)>>() .asFunction< - instancetype Function( + ffi.Pointer Function( 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_230 = 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_initWithMarkdown_options_baseURL_error_ = - objc.registerName("initWithMarkdown:options:baseURL:error:"); -final _objc_msgSend_726 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_initWithLocal_connection_ = + objc.registerName("initWithLocal:connection:"); +late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); +final _objc_msgSend_231 = 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_setProtocolForProxy_ = + objc.registerName("setProtocolForProxy:"); +final _objc_msgSend_232 = 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_connectionForProxy = objc.registerName("connectionForProxy"); +late final _sel_rootProxyForConnectionWithRegisteredName_host_ = + objc.registerName("rootProxyForConnectionWithRegisteredName:host:"); +final _objc_msgSend_233 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + 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, - ffi.Pointer>)>(); -late final _sel_initWithMarkdownString_options_baseURL_error_ = - objc.registerName("initWithMarkdownString:options:baseURL:error:"); -final _objc_msgSend_727 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_ = + objc.registerName( + "rootProxyForConnectionWithRegisteredName:host:usingNameServer:"); +final _objc_msgSend_234 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, 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, - ffi.Pointer>)>(); - -abstract class NSAttributedStringFormattingOptions { - static const int - NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging = 1; - static const int NSAttributedStringFormattingApplyReplacementIndexAttribute = - 2; -} - -late final _sel_initWithFormat_options_locale_ = - objc.registerName("initWithFormat:options:locale:"); -final _objc_msgSend_728 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_serviceConnectionWithName_rootObject_usingNameServer_ = + objc.registerName("serviceConnectionWithName:rootObject:usingNameServer:"); +final _objc_msgSend_235 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, + ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, + ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithFormat_options_locale_arguments_ = - objc.registerName("initWithFormat:options:locale:arguments:"); -final _objc_msgSend_729 = objc.msgSendPointer +late final _sel_serviceConnectionWithName_rootObject_ = + objc.registerName("serviceConnectionWithName:rootObject:"); +final _objc_msgSend_236 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>() + ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); -late final _sel_localizedAttributedStringWithFormat_ = - objc.registerName("localizedAttributedStringWithFormat:"); -late final _sel_localizedAttributedStringWithFormat_options_ = - objc.registerName("localizedAttributedStringWithFormat:options:"); -final _objc_msgSend_730 = objc.msgSendPointer + 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_237 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer 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_238 = 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_registerName_withNameServer_ = + objc.registerName("registerName:withNameServer:"); +final _objc_msgSend_239 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32)>>() + ffi.Pointer)>>() .asFunction< - instancetype Function( + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int)>(); -late final _sel_initWithFormat_options_locale_context_ = - objc.registerName("initWithFormat:options:locale:context:"); -final _objc_msgSend_731 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_connectionWithReceivePort_sendPort_ = + objc.registerName("connectionWithReceivePort:sendPort:"); +final _objc_msgSend_240 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithFormat_options_locale_context_arguments_ = - objc.registerName("initWithFormat:options:locale:context:arguments:"); -final _objc_msgSend_732 = objc.msgSendPointer +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_241 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + 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_242 = 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_243 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( ffi.Pointer, - ffi.Int32, + ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>() + ffi.Pointer)>>() .asFunction< - instancetype Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer, ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); -late final _sel_localizedAttributedStringWithFormat_context_ = - objc.registerName("localizedAttributedStringWithFormat:context:"); -final _objc_msgSend_733 = objc.msgSendPointer + 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_244 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - instancetype Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_localizedAttributedStringWithFormat_options_context_ = - objc.registerName("localizedAttributedStringWithFormat:options:context:"); -final _objc_msgSend_734 = objc.msgSendPointer +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_245 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer)>>() .asFunction< - instancetype Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, ffi.Pointer)>(); -late final _sel_attributedStringByInflectingString = - objc.registerName("attributedStringByInflectingString"); -final _objc_msgSend_735 = objc.msgSendPointer +late final _sel_run = objc.registerName("run"); +late final _sel_runUntilDate_ = objc.registerName("runUntilDate:"); +final _objc_msgSend_246 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + 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_736 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_runMode_beforeDate_ = objc.registerName("runMode:beforeDate:"); +final _objc_msgSend_247 = 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( + bool 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"); -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:"); -final _objc_msgSend_737 = objc.msgSendPointer +late final _sel_configureAsServer = objc.registerName("configureAsServer"); +void _ObjCBlock_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, +) => + block.ref.target + .cast>() + .asFunction()(); +final _ObjCBlock_ffiVoid_closureRegistry = {}; +int _ObjCBlock_ffiVoid_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_registerClosure(void Function() fn) { + final id = ++_ObjCBlock_ffiVoid_closureRegistryIndex; + _ObjCBlock_ffiVoid_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_closureTrampoline( + ffi.Pointer block, +) => + _ObjCBlock_ffiVoid_closureRegistry[block.ref.target.address]!(); + +class ObjCBlock_ffiVoid extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) { + return ObjCBlock_ffiVoid._(pointer, retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid.fromFunctionPointer( + ffi.Pointer> ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer)>( + _ObjCBlock_ffiVoid_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid.fromFunction(void Function() fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer)>( + _ObjCBlock_ffiVoid_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_registerClosure(() => fn()))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid.listener(void Function() fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_registerClosure(() => fn()))); + static ffi.NativeCallable)>? + _dartFuncListenerTrampoline; + + void call() => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block)>>() + .asFunction)>()( + pointer, + ); +} + +late final _sel_performInModes_block_ = + objc.registerName("performInModes:block:"); +final _objc_msgSend_248 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + 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_249 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_performSelector_target_argument_order_modes_ = + objc.registerName("performSelector:target:argument:order:modes:"); +final _objc_msgSend_250 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer, + ffi.Pointer, + int, ffi.Pointer)>(); -late final _sel_executableArchitectures = - objc.registerName("executableArchitectures"); -late final _sel_setPreservationPriority_forTags_ = - objc.registerName("setPreservationPriority:forTags:"); -final _objc_msgSend_738 = objc.msgSendPointer +late final _sel_cancelPerformSelector_target_argument_ = + objc.registerName("cancelPerformSelector:target:argument:"); +final _objc_msgSend_251 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Double, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, - double, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -late final _sel_preservationPriorityForTag_ = - objc.registerName("preservationPriorityForTag:"); +late final _sel_cancelPerformSelectorsWithTarget_ = + objc.registerName("cancelPerformSelectorsWithTarget:"); + +class NSFileHandle extends objc.NSObject { + NSFileHandle._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSFileHandle] that points to the same underlying object as [other]. + NSFileHandle.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSFileHandle] that wraps the given raw object pointer. + NSFileHandle.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSFileHandle]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSFileHandle); + } + + objc.NSData get availableData { + final _ret = _objc_msgSend_104(this.pointer, _sel_availableData); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSFileHandle initWithFileDescriptor_closeOnDealloc_(int fd, bool closeopt) { + final _ret = _objc_msgSend_252(this.pointer, + _sel_initWithFileDescriptor_closeOnDealloc_, fd, closeopt); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); + } + + NSFileHandle? initWithCoder_(objc.NSCoder coder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSData? readDataToEndOfFileAndReturnError_( + ffi.Pointer> error) { + final _ret = _objc_msgSend_253( + this.pointer, _sel_readDataToEndOfFileAndReturnError_, error); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } -class NSMutableAttributedString extends NSAttributedString { - NSMutableAttributedString._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + objc.NSData? readDataUpToLength_error_( + int length, ffi.Pointer> error) { + final _ret = _objc_msgSend_254( + this.pointer, _sel_readDataUpToLength_error_, length, error); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a [NSMutableAttributedString] that points to the same underlying object as [other]. - static NSMutableAttributedString castFrom( - T other) { - return NSMutableAttributedString._(other.pointer, - retain: true, release: true); + bool writeData_error_( + objc.NSData data, ffi.Pointer> error) { + return _objc_msgSend_255( + this.pointer, _sel_writeData_error_, data.pointer, error); } - /// Returns a [NSMutableAttributedString] that wraps the given raw object pointer. - static NSMutableAttributedString castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSMutableAttributedString._(other, retain: retain, release: release); + bool getOffset_error_(ffi.Pointer offsetInFile, + ffi.Pointer> error) { + return _objc_msgSend_256( + this.pointer, _sel_getOffset_error_, offsetInFile, error); } - /// Returns whether [obj] is an instance of [NSMutableAttributedString]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableAttributedString); + bool seekToEndReturningOffset_error_( + ffi.Pointer offsetInFile, + ffi.Pointer> error) { + return _objc_msgSend_256(this.pointer, _sel_seekToEndReturningOffset_error_, + offsetInFile, error); } - void replaceCharactersInRange_withString_(_NSRange range, NSString str) { - _objc_msgSend_689(this.pointer, _sel_replaceCharactersInRange_withString_, - range, str.pointer); + bool seekToOffset_error_( + int offset, ffi.Pointer> error) { + return _objc_msgSend_257( + this.pointer, _sel_seekToOffset_error_, offset, error); } - void setAttributes_range_(NSDictionary? attrs, _NSRange range) { - _objc_msgSend_739(this.pointer, _sel_setAttributes_range_, - attrs?.pointer ?? ffi.nullptr, range); + bool truncateAtOffset_error_( + int offset, ffi.Pointer> error) { + return _objc_msgSend_257( + this.pointer, _sel_truncateAtOffset_error_, offset, error); } - NSMutableString get mutableString { - final _ret = _objc_msgSend_740(this.pointer, _sel_mutableString); - return NSMutableString._(_ret, retain: true, release: true); + bool synchronizeAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_8( + this.pointer, _sel_synchronizeAndReturnError_, error); } - void addAttribute_value_range_( - NSString name, NSObject value, _NSRange range) { - _objc_msgSend_741(this.pointer, _sel_addAttribute_value_range_, - name.pointer, value.pointer, range); + bool closeAndReturnError_(ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_closeAndReturnError_, error); } - void addAttributes_range_(NSDictionary attrs, _NSRange range) { - _objc_msgSend_742( - this.pointer, _sel_addAttributes_range_, attrs.pointer, range); + static NSFileHandle getFileHandleWithStandardInput() { + final _ret = _objc_msgSend_258( + _class_NSFileHandle, _sel_fileHandleWithStandardInput); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - void removeAttribute_range_(NSString name, _NSRange range) { - _objc_msgSend_743( - this.pointer, _sel_removeAttribute_range_, name.pointer, range); + static NSFileHandle getFileHandleWithStandardOutput() { + final _ret = _objc_msgSend_258( + _class_NSFileHandle, _sel_fileHandleWithStandardOutput); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - void replaceCharactersInRange_withAttributedString_( - _NSRange range, NSAttributedString attrString) { - _objc_msgSend_744( - this.pointer, - _sel_replaceCharactersInRange_withAttributedString_, - range, - attrString.pointer); + static NSFileHandle getFileHandleWithStandardError() { + final _ret = _objc_msgSend_258( + _class_NSFileHandle, _sel_fileHandleWithStandardError); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - void insertAttributedString_atIndex_(NSAttributedString attrString, int loc) { - _objc_msgSend_745(this.pointer, _sel_insertAttributedString_atIndex_, - attrString.pointer, loc); + static NSFileHandle getFileHandleWithNullDevice() { + final _ret = + _objc_msgSend_258(_class_NSFileHandle, _sel_fileHandleWithNullDevice); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - void appendAttributedString_(NSAttributedString attrString) { - _objc_msgSend_746( - this.pointer, _sel_appendAttributedString_, attrString.pointer); + static NSFileHandle? fileHandleForReadingAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSFileHandle, _sel_fileHandleForReadingAtPath_, path.pointer); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - void deleteCharactersInRange_(_NSRange range) { - _objc_msgSend_476(this.pointer, _sel_deleteCharactersInRange_, range); + static NSFileHandle? fileHandleForWritingAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSFileHandle, _sel_fileHandleForWritingAtPath_, path.pointer); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - void setAttributedString_(NSAttributedString attrString) { - _objc_msgSend_746( - this.pointer, _sel_setAttributedString_, attrString.pointer); + static NSFileHandle? fileHandleForUpdatingAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSFileHandle, _sel_fileHandleForUpdatingAtPath_, path.pointer); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - void beginEditing() { - _objc_msgSend_1(this.pointer, _sel_beginEditing); + static NSFileHandle? fileHandleForReadingFromURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_259(_class_NSFileHandle, + _sel_fileHandleForReadingFromURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - void endEditing() { - _objc_msgSend_1(this.pointer, _sel_endEditing); + static NSFileHandle? fileHandleForWritingToURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_259(_class_NSFileHandle, + _sel_fileHandleForWritingToURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - void appendLocalizedFormat_(NSAttributedString format) { - _objc_msgSend_746( - this.pointer, _sel_appendLocalizedFormat_, format.pointer); + static NSFileHandle? fileHandleForUpdatingURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_259(_class_NSFileHandle, + _sel_fileHandleForUpdatingURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableAttributedString initWithString_(NSString str) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithString_, str.pointer); - return NSMutableAttributedString._(_ret, retain: true, release: true); + void readInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260(this.pointer, _sel_readInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); } - @override - NSMutableAttributedString initWithString_attributes_( - NSString str, NSDictionary? attrs) { - final _ret = _objc_msgSend_717( + void readInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_readInBackgroundAndNotify); + } + + void readToEndOfFileInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260( this.pointer, - _sel_initWithString_attributes_, - str.pointer, - attrs?.pointer ?? ffi.nullptr); - return NSMutableAttributedString._(_ret, retain: true, release: true); + _sel_readToEndOfFileInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); } - @override - NSMutableAttributedString initWithAttributedString_( - NSAttributedString attrStr) { - final _ret = _objc_msgSend_718( - this.pointer, _sel_initWithAttributedString_, attrStr.pointer); - return NSMutableAttributedString._(_ret, retain: true, release: true); + void readToEndOfFileInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_readToEndOfFileInBackgroundAndNotify); } - @override - NSMutableAttributedString? - initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( - NSURL markdownFile, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _objc_msgSend_725( + void acceptConnectionInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260( this.pointer, - _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, - markdownFile.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSMutableAttributedString._(_ret, retain: true, release: true); + _sel_acceptConnectionInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); } - @override - NSMutableAttributedString? initWithMarkdown_options_baseURL_error_( - NSData markdown, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _objc_msgSend_726( + void acceptConnectionInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_acceptConnectionInBackgroundAndNotify); + } + + void waitForDataInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260( this.pointer, - _sel_initWithMarkdown_options_baseURL_error_, - markdown.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); + _sel_waitForDataInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); + } + + void waitForDataInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_waitForDataInBackgroundAndNotify); + } + + ObjCBlock_ffiVoid_NSFileHandle? get readabilityHandler { + final _ret = _objc_msgSend_261(this.pointer, _sel_readabilityHandler); return _ret.address == 0 ? null - : NSMutableAttributedString._(_ret, retain: true, release: true); + : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, + retain: true, release: true); } - @override - NSMutableAttributedString? initWithMarkdownString_options_baseURL_error_( - NSString markdownString, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _objc_msgSend_727( - this.pointer, - _sel_initWithMarkdownString_options_baseURL_error_, - markdownString.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); + set readabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { + return _objc_msgSend_262(this.pointer, _sel_setReadabilityHandler_, + value?.pointer ?? ffi.nullptr); + } + + ObjCBlock_ffiVoid_NSFileHandle? get writeabilityHandler { + final _ret = _objc_msgSend_261(this.pointer, _sel_writeabilityHandler); return _ret.address == 0 ? null - : NSMutableAttributedString._(_ret, retain: true, release: true); + : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, + retain: true, release: true); } - @override - NSMutableAttributedString initWithFormat_options_locale_( - NSAttributedString format, int options, NSLocale? locale) { - final _ret = _objc_msgSend_728( - this.pointer, - _sel_initWithFormat_options_locale_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr); - return NSMutableAttributedString._(_ret, retain: true, release: true); + set writeabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { + return _objc_msgSend_262(this.pointer, _sel_setWriteabilityHandler_, + value?.pointer ?? ffi.nullptr); } - @override - NSMutableAttributedString initWithFormat_options_locale_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _objc_msgSend_729( - this.pointer, - _sel_initWithFormat_options_locale_arguments_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr, - arguments); - return NSMutableAttributedString._(_ret, retain: true, release: true); + NSFileHandle initWithFileDescriptor_(int fd) { + final _ret = + _objc_msgSend_263(this.pointer, _sel_initWithFileDescriptor_, fd); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static NSMutableAttributedString localizedAttributedStringWithFormat_( - NSAttributedString format) { - final _ret = _objc_msgSend_718(_class_NSMutableAttributedString, - _sel_localizedAttributedStringWithFormat_, format.pointer); - return NSMutableAttributedString._(_ret, retain: true, release: true); + int get fileDescriptor { + return _objc_msgSend_264(this.pointer, _sel_fileDescriptor); } - static NSMutableAttributedString localizedAttributedStringWithFormat_options_( - NSAttributedString format, int options) { - final _ret = _objc_msgSend_730( - _class_NSMutableAttributedString, - _sel_localizedAttributedStringWithFormat_options_, - format.pointer, - options); - return NSMutableAttributedString._(_ret, retain: true, release: true); + objc.NSData readDataToEndOfFile() { + final _ret = _objc_msgSend_104(this.pointer, _sel_readDataToEndOfFile); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableAttributedString initWithFormat_options_locale_context_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context) { - final _ret = _objc_msgSend_731( - this.pointer, - _sel_initWithFormat_options_locale_context_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr, - context.pointer); - return NSMutableAttributedString._(_ret, retain: true, release: true); + objc.NSData readDataOfLength_(int length) { + final _ret = + _objc_msgSend_265(this.pointer, _sel_readDataOfLength_, length); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableAttributedString initWithFormat_options_locale_context_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _objc_msgSend_732( - this.pointer, - _sel_initWithFormat_options_locale_context_arguments_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr, - context.pointer, - arguments); - return NSMutableAttributedString._(_ret, retain: true, release: true); + void writeData_(objc.NSData data) { + _objc_msgSend_266(this.pointer, _sel_writeData_, data.pointer); } - static NSMutableAttributedString localizedAttributedStringWithFormat_context_( - NSAttributedString format, NSDictionary context) { - final _ret = _objc_msgSend_733( - _class_NSMutableAttributedString, - _sel_localizedAttributedStringWithFormat_context_, - format.pointer, - context.pointer); - return NSMutableAttributedString._(_ret, retain: true, release: true); + int get offsetInFile { + return _objc_msgSend_267(this.pointer, _sel_offsetInFile); } - static NSMutableAttributedString - localizedAttributedStringWithFormat_options_context_( - NSAttributedString format, int options, NSDictionary context) { - final _ret = _objc_msgSend_734( - _class_NSMutableAttributedString, - _sel_localizedAttributedStringWithFormat_options_context_, - format.pointer, - options, - context.pointer); - return NSMutableAttributedString._(_ret, retain: true, release: true); + int seekToEndOfFile() { + return _objc_msgSend_267(this.pointer, _sel_seekToEndOfFile); + } + + void seekToFileOffset_(int offset) { + _objc_msgSend_268(this.pointer, _sel_seekToFileOffset_, offset); + } + + void truncateFileAtOffset_(int offset) { + _objc_msgSend_268(this.pointer, _sel_truncateFileAtOffset_, offset); + } + + void synchronizeFile() { + _objc_msgSend_82(this.pointer, _sel_synchronizeFile); + } + + void closeFile() { + _objc_msgSend_82(this.pointer, _sel_closeFile); } @override - NSMutableAttributedString init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableAttributedString._(_ret, retain: true, release: true); + NSFileHandle init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static NSMutableAttributedString new1() { - final _ret = _objc_msgSend_2(_class_NSMutableAttributedString, _sel_new); - return NSMutableAttributedString._(_ret, retain: false, release: true); + static NSFileHandle new1() { + final _ret = _objc_msgSend_40(_class_NSFileHandle, _sel_new); + return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } - static NSMutableAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSMutableAttributedString, _sel_allocWithZone_, zone); - return NSMutableAttributedString._(_ret, retain: false, release: true); + static NSFileHandle allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSFileHandle, _sel_allocWithZone_, zone); + return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } - static NSMutableAttributedString alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableAttributedString, _sel_alloc); - return NSMutableAttributedString._(_ret, retain: false, release: true); + static NSFileHandle alloc() { + final _ret = _objc_msgSend_40(_class_NSFileHandle, _sel_alloc); + return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableAttributedString, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFileHandle, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableAttributedString, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFileHandle, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableAttributedString, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSFileHandle, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSMutableAttributedString, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSFileHandle, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableAttributedString, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFileHandle, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableAttributedString, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFileHandle, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableAttributedString, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFileHandle, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableAttributedString, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFileHandle, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSFileHandle, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, 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_252 = 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_253 = 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_254 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_writeData_error_ = objc.registerName("writeData:error:"); +final _objc_msgSend_255 = 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_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_seekToEndReturningOffset_error_ = + objc.registerName("seekToEndReturningOffset:error:"); +late final _sel_seekToOffset_error_ = objc.registerName("seekToOffset:error:"); +final _objc_msgSend_257 = 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_258 = 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_259 = 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_260 = 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); +final _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[block.ref.target.address]!( + 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); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSMutableAttributedString, _sel_classForKeyedUnarchiver); - return NSObject._(_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_NSFileHandle.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _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.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( + (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._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( + (ffi.Pointer arg0) => fn( + NSFileHandle.castFromPointer(arg0, + retain: true, 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 _class_NSMutableAttributedString = - objc.getClass("NSMutableAttributedString"); -late final _sel_setAttributes_range_ = - objc.registerName("setAttributes:range:"); -final _objc_msgSend_739 = objc.msgSendPointer +late final _sel_readabilityHandler = objc.registerName("readabilityHandler"); +final _objc_msgSend_261 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_mutableString = objc.registerName("mutableString"); -final _objc_msgSend_740 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setReadabilityHandler_ = + objc.registerName("setReadabilityHandler:"); +final _objc_msgSend_262 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_addAttribute_value_range_ = - objc.registerName("addAttribute:value:range:"); -final _objc_msgSend_741 = objc.msgSendPointer + 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_263 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_addAttributes_range_ = - objc.registerName("addAttributes:range:"); -final _objc_msgSend_742 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_fileDescriptor = objc.registerName("fileDescriptor"); +final _objc_msgSend_264 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() + ffi.Int 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_743 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_readDataToEndOfFile = objc.registerName("readDataToEndOfFile"); +late final _sel_readDataOfLength_ = objc.registerName("readDataOfLength:"); +final _objc_msgSend_265 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() + ffi.Pointer 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_744 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_writeData_ = objc.registerName("writeData:"); +final _objc_msgSend_266 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_insertAttributedString_atIndex_ = - objc.registerName("insertAttributedString:atIndex:"); -final _objc_msgSend_745 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_offsetInFile = objc.registerName("offsetInFile"); +final _objc_msgSend_267 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.UnsignedLongLong 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_746 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_seekToEndOfFile = objc.registerName("seekToEndOfFile"); +late final _sel_seekToFileOffset_ = objc.registerName("seekToFileOffset:"); +final _objc_msgSend_268 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLongLong)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -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:"); + ffi.Pointer, int)>(); +late final _sel_truncateFileAtOffset_ = + objc.registerName("truncateFileAtOffset:"); +late final _sel_synchronizeFile = objc.registerName("synchronizeFile"); +late final _sel_closeFile = objc.registerName("closeFile"); -class NSDateFormatter extends NSFormatter { - NSDateFormatter._(ffi.Pointer pointer, +abstract class NSURLBookmarkCreationOptions { + static const int NSURLBookmarkCreationPreferFileIDResolution = 256; + static const int NSURLBookmarkCreationMinimalBookmark = 512; + static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; + static const int NSURLBookmarkCreationWithSecurityScope = 2048; + static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; + static const int NSURLBookmarkCreationWithoutImplicitSecurityScope = + 536870912; +} + +abstract class NSURLBookmarkResolutionOptions { + static const int NSURLBookmarkResolutionWithoutUI = 256; + static const int NSURLBookmarkResolutionWithoutMounting = 512; + static const int NSURLBookmarkResolutionWithSecurityScope = 1024; + static const int NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; +} + +class NSFileManager extends objc.NSObject { + NSFileManager._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSDateFormatter] that points to the same underlying object as [other]. - static NSDateFormatter castFrom(T other) { - return NSDateFormatter._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSFileManager] that points to the same underlying object as [other]. + NSFileManager.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSDateFormatter] that wraps the given raw object pointer. - static NSDateFormatter castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDateFormatter._(other, retain: retain, release: release); - } + /// 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 [NSDateFormatter]. + /// Returns whether [obj] is an instance of [NSFileManager]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSDateFormatter); - } - - int get formattingContext { - return _objc_msgSend_752(this.pointer, _sel_formattingContext); + obj.pointer, _sel_isKindOfClass_, _class_NSFileManager); } - set formattingContext(int value) { - return _objc_msgSend_753(this.pointer, _sel_setFormattingContext_, value); + static NSFileManager getDefaultManager() { + final _ret = _objc_msgSend_269(_class_NSFileManager, _sel_defaultManager); + return NSFileManager.castFromPointer(_ret, retain: true, release: true); } - bool getObjectValue_forString_range_error_( - ffi.Pointer> obj, - NSString string, - ffi.Pointer<_NSRange> rangep, - ffi.Pointer> error) { - return _objc_msgSend_754( + objc.NSArray? mountedVolumeURLsIncludingResourceValuesForKeys_options_( + objc.NSArray? propertyKeys, int options) { + final _ret = _objc_msgSend_270( this.pointer, - _sel_getObjectValue_forString_range_error_, - obj, - string.pointer, - rangep, - error); + _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_, + propertyKeys?.pointer ?? ffi.nullptr, + options); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString stringFromDate_(NSDate date) { - final _ret = - _objc_msgSend_755(this.pointer, _sel_stringFromDate_, date.pointer); - return NSString._(_ret, retain: true, release: true); + void unmountVolumeAtURL_options_completionHandler_( + objc.NSURL url, int mask, ObjCBlock_ffiVoid_NSError completionHandler) { + _objc_msgSend_271( + this.pointer, + _sel_unmountVolumeAtURL_options_completionHandler_, + url.pointer, + mask, + completionHandler.pointer); } - NSDate? dateFromString_(NSString string) { - final _ret = - _objc_msgSend_564(this.pointer, _sel_dateFromString_, string.pointer); + objc.NSArray? + contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_( + objc.NSURL url, + objc.NSArray? keys, + int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_272( + this.pointer, + _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_, + url.pointer, + keys?.pointer ?? ffi.nullptr, + mask, + error); return _ret.address == 0 ? null - : NSDate._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSString localizedStringFromDate_dateStyle_timeStyle_( - NSDate date, int dstyle, int tstyle) { - final _ret = _objc_msgSend_756( - _class_NSDateFormatter, - _sel_localizedStringFromDate_dateStyle_timeStyle_, - date.pointer, - dstyle, - tstyle); - return NSString._(_ret, retain: true, release: true); + objc.NSArray URLsForDirectory_inDomains_(int directory, int domainMask) { + final _ret = _objc_msgSend_273( + this.pointer, _sel_URLsForDirectory_inDomains_, directory, domainMask); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSString? dateFormatFromTemplate_options_locale_( - NSString tmplate, int opts, NSLocale? locale) { - final _ret = _objc_msgSend_757( - _class_NSDateFormatter, - _sel_dateFormatFromTemplate_options_locale_, - tmplate.pointer, - opts, - locale?.pointer ?? ffi.nullptr); + objc.NSURL? URLForDirectory_inDomain_appropriateForURL_create_error_( + int directory, + int domain, + objc.NSURL? url, + bool shouldCreate, + ffi.Pointer> error) { + final _ret = _objc_msgSend_274( + this.pointer, + _sel_URLForDirectory_inDomain_appropriateForURL_create_error_, + directory, + domain, + url?.pointer ?? ffi.nullptr, + shouldCreate, + error); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static int getDefaultFormatterBehavior() { - return _objc_msgSend_758( - _class_NSDateFormatter, _sel_defaultFormatterBehavior); + bool getRelationship_ofDirectoryAtURL_toItemAtURL_error_( + ffi.Pointer outRelationship, + objc.NSURL directoryURL, + objc.NSURL otherURL, + ffi.Pointer> error) { + return _objc_msgSend_275( + this.pointer, + _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_, + outRelationship, + directoryURL.pointer, + otherURL.pointer, + error); } - static void setDefaultFormatterBehavior(int value) { - return _objc_msgSend_759( - _class_NSDateFormatter, _sel_setDefaultFormatterBehavior_, value); + bool getRelationship_ofDirectory_inDomain_toItemAtURL_error_( + ffi.Pointer outRelationship, + int directory, + int domainMask, + objc.NSURL url, + ffi.Pointer> error) { + return _objc_msgSend_276( + this.pointer, + _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_, + outRelationship, + directory, + domainMask, + url.pointer, + error); } - void setLocalizedDateFormatFromTemplate_(NSString dateFormatTemplate) { - _objc_msgSend_247(this.pointer, _sel_setLocalizedDateFormatFromTemplate_, - dateFormatTemplate.pointer); + bool createDirectoryAtURL_withIntermediateDirectories_attributes_error_( + objc.NSURL url, + bool createIntermediates, + objc.NSDictionary? attributes, + ffi.Pointer> error) { + return _objc_msgSend_277( + this.pointer, + _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_, + url.pointer, + createIntermediates, + attributes?.pointer ?? ffi.nullptr, + error); } - NSString get dateFormat { - final _ret = _objc_msgSend_21(this.pointer, _sel_dateFormat); - return NSString._(_ret, retain: true, release: true); + bool createSymbolicLinkAtURL_withDestinationURL_error_(objc.NSURL url, + objc.NSURL destURL, ffi.Pointer> error) { + return _objc_msgSend_278( + this.pointer, + _sel_createSymbolicLinkAtURL_withDestinationURL_error_, + url.pointer, + destURL.pointer, + error); } - set dateFormat(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setDateFormat_, value.pointer); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get dateStyle { - return _objc_msgSend_760(this.pointer, _sel_dateStyle); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - set dateStyle(int value) { - return _objc_msgSend_761(this.pointer, _sel_setDateStyle_, value); + bool setAttributes_ofItemAtPath_error_(objc.NSDictionary attributes, + objc.NSString path, ffi.Pointer> error) { + return _objc_msgSend_279( + this.pointer, + _sel_setAttributes_ofItemAtPath_error_, + attributes.pointer, + path.pointer, + error); } - int get timeStyle { - return _objc_msgSend_760(this.pointer, _sel_timeStyle); + bool createDirectoryAtPath_withIntermediateDirectories_attributes_error_( + objc.NSString path, + bool createIntermediates, + objc.NSDictionary? attributes, + ffi.Pointer> error) { + return _objc_msgSend_280( + this.pointer, + _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_, + path.pointer, + createIntermediates, + attributes?.pointer ?? ffi.nullptr, + error); } - set timeStyle(int value) { - return _objc_msgSend_761(this.pointer, _sel_setTimeStyle_, value); + objc.NSArray? contentsOfDirectoryAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_281(this.pointer, + _sel_contentsOfDirectoryAtPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSLocale get locale { - final _ret = _objc_msgSend_197(this.pointer, _sel_locale); - return NSLocale._(_ret, retain: true, release: true); + objc.NSArray? subpathsOfDirectoryAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_281(this.pointer, + _sel_subpathsOfDirectoryAtPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set locale(NSLocale value) { - return _objc_msgSend_762(this.pointer, _sel_setLocale_, value.pointer); + objc.NSDictionary? attributesOfItemAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_282( + this.pointer, _sel_attributesOfItemAtPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - bool get generatesCalendarDates { - return _objc_msgSend_12(this.pointer, _sel_generatesCalendarDates); + objc.NSDictionary? attributesOfFileSystemForPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_282(this.pointer, + _sel_attributesOfFileSystemForPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set generatesCalendarDates(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setGeneratesCalendarDates_, value); + bool createSymbolicLinkAtPath_withDestinationPath_error_(objc.NSString path, + objc.NSString destPath, ffi.Pointer> error) { + return _objc_msgSend_283( + this.pointer, + _sel_createSymbolicLinkAtPath_withDestinationPath_error_, + path.pointer, + destPath.pointer, + error); } - int get formatterBehavior { - return _objc_msgSend_758(this.pointer, _sel_formatterBehavior); + objc.NSString? destinationOfSymbolicLinkAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_284(this.pointer, + _sel_destinationOfSymbolicLinkAtPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set formatterBehavior(int value) { - return _objc_msgSend_759(this.pointer, _sel_setFormatterBehavior_, value); + bool copyItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_283(this.pointer, _sel_copyItemAtPath_toPath_error_, + srcPath.pointer, dstPath.pointer, error); } - NSTimeZone get timeZone { - final _ret = _objc_msgSend_179(this.pointer, _sel_timeZone); - return NSTimeZone._(_ret, retain: true, release: true); + bool moveItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_283(this.pointer, _sel_moveItemAtPath_toPath_error_, + srcPath.pointer, dstPath.pointer, error); } - set timeZone(NSTimeZone value) { - return _objc_msgSend_180(this.pointer, _sel_setTimeZone_, value.pointer); + bool linkItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_283(this.pointer, _sel_linkItemAtPath_toPath_error_, + srcPath.pointer, dstPath.pointer, error); } - NSCalendar get calendar { - final _ret = _objc_msgSend_763(this.pointer, _sel_calendar); - return NSCalendar._(_ret, retain: true, release: true); + bool removeItemAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + return _objc_msgSend_285( + this.pointer, _sel_removeItemAtPath_error_, path.pointer, error); } - set calendar(NSCalendar value) { - return _objc_msgSend_799(this.pointer, _sel_setCalendar_, value.pointer); + bool copyItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_278(this.pointer, _sel_copyItemAtURL_toURL_error_, + srcURL.pointer, dstURL.pointer, error); } - bool get lenient { - return _objc_msgSend_12(this.pointer, _sel_isLenient); + bool moveItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_278(this.pointer, _sel_moveItemAtURL_toURL_error_, + srcURL.pointer, dstURL.pointer, error); } - set lenient(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setLenient_, value); + bool linkItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_278(this.pointer, _sel_linkItemAtURL_toURL_error_, + srcURL.pointer, dstURL.pointer, error); } - NSDate? get twoDigitStartDate { - final _ret = _objc_msgSend_183(this.pointer, _sel_twoDigitStartDate); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); + bool removeItemAtURL_error_( + objc.NSURL URL, ffi.Pointer> error) { + return _objc_msgSend_286( + this.pointer, _sel_removeItemAtURL_error_, URL.pointer, error); } - set twoDigitStartDate(NSDate? value) { - return _objc_msgSend_800(this.pointer, _sel_setTwoDigitStartDate_, - value?.pointer ?? ffi.nullptr); + bool trashItemAtURL_resultingItemURL_error_( + objc.NSURL url, + ffi.Pointer> outResultingURL, + ffi.Pointer> error) { + return _objc_msgSend_287( + this.pointer, + _sel_trashItemAtURL_resultingItemURL_error_, + url.pointer, + outResultingURL, + error); } - NSDate? get defaultDate { - final _ret = _objc_msgSend_183(this.pointer, _sel_defaultDate); + objc.NSDictionary? fileAttributesAtPath_traverseLink_( + objc.NSString path, bool yorn) { + final _ret = _objc_msgSend_288(this.pointer, + _sel_fileAttributesAtPath_traverseLink_, path.pointer, yorn); return _ret.address == 0 ? null - : NSDate._(_ret, retain: true, release: true); - } - - set defaultDate(NSDate? value) { - return _objc_msgSend_800( - this.pointer, _sel_setDefaultDate_, value?.pointer ?? ffi.nullptr); - } - - NSArray get eraSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_eraSymbols); - return NSArray._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set eraSymbols(NSArray value) { - return _objc_msgSend_801(this.pointer, _sel_setEraSymbols_, value.pointer); + bool changeFileAttributes_atPath_( + objc.NSDictionary attributes, objc.NSString path) { + return _objc_msgSend_289(this.pointer, _sel_changeFileAttributes_atPath_, + attributes.pointer, path.pointer); } - NSArray get monthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_monthSymbols); - return NSArray._(_ret, retain: true, release: true); + objc.NSArray? directoryContentsAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_290( + this.pointer, _sel_directoryContentsAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set monthSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setMonthSymbols_, value.pointer); + objc.NSDictionary? fileSystemAttributesAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_291( + this.pointer, _sel_fileSystemAttributesAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSArray get shortMonthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_shortMonthSymbols); - return NSArray._(_ret, retain: true, release: true); + objc.NSString? pathContentOfSymbolicLinkAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_pathContentOfSymbolicLinkAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set shortMonthSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setShortMonthSymbols_, value.pointer); + bool createSymbolicLinkAtPath_pathContent_( + objc.NSString path, objc.NSString otherpath) { + return _objc_msgSend_292( + this.pointer, + _sel_createSymbolicLinkAtPath_pathContent_, + path.pointer, + otherpath.pointer); } - NSArray get weekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_weekdaySymbols); - return NSArray._(_ret, retain: true, release: true); + bool createDirectoryAtPath_attributes_( + objc.NSString path, objc.NSDictionary attributes) { + return _objc_msgSend_293( + this.pointer, + _sel_createDirectoryAtPath_attributes_, + path.pointer, + attributes.pointer); } - set weekdaySymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setWeekdaySymbols_, value.pointer); + bool linkPath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.NSObject? handler) { + return _objc_msgSend_294(this.pointer, _sel_linkPath_toPath_handler_, + src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); } - NSArray get shortWeekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_shortWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); + bool copyPath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.NSObject? handler) { + return _objc_msgSend_294(this.pointer, _sel_copyPath_toPath_handler_, + src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); } - set shortWeekdaySymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setShortWeekdaySymbols_, value.pointer); + bool movePath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.NSObject? handler) { + return _objc_msgSend_294(this.pointer, _sel_movePath_toPath_handler_, + src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); } - NSString get AMSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_AMSymbol); - return NSString._(_ret, retain: true, release: true); + bool removeFileAtPath_handler_(objc.NSString path, objc.NSObject? handler) { + return _objc_msgSend_295(this.pointer, _sel_removeFileAtPath_handler_, + path.pointer, handler?.pointer ?? ffi.nullptr); } - set AMSymbol(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setAMSymbol_, value.pointer); + objc.NSString get currentDirectoryPath { + final _ret = _objc_msgSend_12(this.pointer, _sel_currentDirectoryPath); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString get PMSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_PMSymbol); - return NSString._(_ret, retain: true, release: true); + bool changeCurrentDirectoryPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_changeCurrentDirectoryPath_, path.pointer); } - set PMSymbol(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setPMSymbol_, value.pointer); + bool fileExistsAtPath_(objc.NSString path) { + return _objc_msgSend_51(this.pointer, _sel_fileExistsAtPath_, path.pointer); } - NSArray get longEraSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_longEraSymbols); - return NSArray._(_ret, retain: true, release: true); + bool fileExistsAtPath_isDirectory_( + objc.NSString path, ffi.Pointer isDirectory) { + return _objc_msgSend_296(this.pointer, _sel_fileExistsAtPath_isDirectory_, + path.pointer, isDirectory); } - set longEraSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setLongEraSymbols_, value.pointer); + bool isReadableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isReadableFileAtPath_, path.pointer); } - NSArray get veryShortMonthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_veryShortMonthSymbols); - return NSArray._(_ret, retain: true, release: true); + bool isWritableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isWritableFileAtPath_, path.pointer); } - set veryShortMonthSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setVeryShortMonthSymbols_, value.pointer); + bool isExecutableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isExecutableFileAtPath_, path.pointer); } - NSArray get standaloneMonthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_standaloneMonthSymbols); - return NSArray._(_ret, retain: true, release: true); + bool isDeletableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isDeletableFileAtPath_, path.pointer); } - set standaloneMonthSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setStandaloneMonthSymbols_, value.pointer); + bool contentsEqualAtPath_andPath_(objc.NSString path1, objc.NSString path2) { + return _objc_msgSend_292(this.pointer, _sel_contentsEqualAtPath_andPath_, + path1.pointer, path2.pointer); } - NSArray get shortStandaloneMonthSymbols { + objc.NSString displayNameAtPath_(objc.NSString path) { final _ret = - _objc_msgSend_85(this.pointer, _sel_shortStandaloneMonthSymbols); - return NSArray._(_ret, retain: true, release: true); + _objc_msgSend_297(this.pointer, _sel_displayNameAtPath_, path.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set shortStandaloneMonthSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setShortStandaloneMonthSymbols_, value.pointer); + objc.NSArray? componentsToDisplayForPath_(objc.NSString path) { + final _ret = _objc_msgSend_290( + this.pointer, _sel_componentsToDisplayForPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSArray get veryShortStandaloneMonthSymbols { + objc.NSObject? enumeratorAtPath_(objc.NSString path) { final _ret = - _objc_msgSend_85(this.pointer, _sel_veryShortStandaloneMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set veryShortStandaloneMonthSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setVeryShortStandaloneMonthSymbols_, value.pointer); - } - - NSArray get veryShortWeekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_veryShortWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set veryShortWeekdaySymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setVeryShortWeekdaySymbols_, value.pointer); - } - - NSArray get standaloneWeekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_standaloneWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); + _objc_msgSend_2(this.pointer, _sel_enumeratorAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set standaloneWeekdaySymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setStandaloneWeekdaySymbols_, value.pointer); + objc.NSObject? + enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_( + objc.NSURL url, + objc.NSArray? keys, + int mask, + ObjCBlock_bool_NSURL_NSError? handler) { + final _ret = _objc_msgSend_298( + this.pointer, + _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_, + url.pointer, + keys?.pointer ?? ffi.nullptr, + mask, + handler?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSArray get shortStandaloneWeekdaySymbols { + objc.NSArray? subpathsAtPath_(objc.NSString path) { final _ret = - _objc_msgSend_85(this.pointer, _sel_shortStandaloneWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); + _objc_msgSend_290(this.pointer, _sel_subpathsAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set shortStandaloneWeekdaySymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setShortStandaloneWeekdaySymbols_, value.pointer); + objc.NSData? contentsAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_299(this.pointer, _sel_contentsAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSArray get veryShortStandaloneWeekdaySymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_veryShortStandaloneWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); + bool createFileAtPath_contents_attributes_( + objc.NSString path, objc.NSData? data, objc.NSDictionary? attr) { + return _objc_msgSend_300( + this.pointer, + _sel_createFileAtPath_contents_attributes_, + path.pointer, + data?.pointer ?? ffi.nullptr, + attr?.pointer ?? ffi.nullptr); } - set veryShortStandaloneWeekdaySymbols(NSArray value) { - return _objc_msgSend_801(this.pointer, - _sel_setVeryShortStandaloneWeekdaySymbols_, value.pointer); + ffi.Pointer fileSystemRepresentationWithPath_(objc.NSString path) { + return _objc_msgSend_301( + this.pointer, _sel_fileSystemRepresentationWithPath_, path.pointer); } - NSArray get quarterSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_quarterSymbols); - return NSArray._(_ret, retain: true, release: true); + objc.NSString stringWithFileSystemRepresentation_length_( + ffi.Pointer str, int len) { + final _ret = _objc_msgSend_302(this.pointer, + _sel_stringWithFileSystemRepresentation_length_, str, len); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set quarterSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setQuarterSymbols_, value.pointer); + bool + replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_( + objc.NSURL originalItemURL, + objc.NSURL newItemURL, + objc.NSString? backupItemName, + int options, + ffi.Pointer> resultingURL, + ffi.Pointer> error) { + return _objc_msgSend_303( + this.pointer, + _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_, + originalItemURL.pointer, + newItemURL.pointer, + backupItemName?.pointer ?? ffi.nullptr, + options, + resultingURL, + error); } - NSArray get shortQuarterSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_shortQuarterSymbols); - return NSArray._(_ret, retain: true, release: true); + bool setUbiquitous_itemAtURL_destinationURL_error_( + bool flag, + objc.NSURL url, + objc.NSURL destinationURL, + ffi.Pointer> error) { + return _objc_msgSend_304( + this.pointer, + _sel_setUbiquitous_itemAtURL_destinationURL_error_, + flag, + url.pointer, + destinationURL.pointer, + error); } - set shortQuarterSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setShortQuarterSymbols_, value.pointer); + bool isUbiquitousItemAtURL_(objc.NSURL url) { + return _objc_msgSend_305( + this.pointer, _sel_isUbiquitousItemAtURL_, url.pointer); } - NSArray get standaloneQuarterSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_standaloneQuarterSymbols); - return NSArray._(_ret, retain: true, release: true); + bool startDownloadingUbiquitousItemAtURL_error_( + objc.NSURL url, ffi.Pointer> error) { + return _objc_msgSend_286(this.pointer, + _sel_startDownloadingUbiquitousItemAtURL_error_, url.pointer, error); } - set standaloneQuarterSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setStandaloneQuarterSymbols_, value.pointer); + bool evictUbiquitousItemAtURL_error_( + objc.NSURL url, ffi.Pointer> error) { + return _objc_msgSend_286( + this.pointer, _sel_evictUbiquitousItemAtURL_error_, url.pointer, error); } - NSArray get shortStandaloneQuarterSymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_shortStandaloneQuarterSymbols); - return NSArray._(_ret, retain: true, release: true); + objc.NSURL? URLForUbiquityContainerIdentifier_( + objc.NSString? containerIdentifier) { + final _ret = _objc_msgSend_306( + this.pointer, + _sel_URLForUbiquityContainerIdentifier_, + containerIdentifier?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - set shortStandaloneQuarterSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setShortStandaloneQuarterSymbols_, value.pointer); + objc.NSURL? URLForPublishingUbiquitousItemAtURL_expirationDate_error_( + objc.NSURL url, + ffi.Pointer> outDate, + ffi.Pointer> error) { + final _ret = _objc_msgSend_307( + this.pointer, + _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_, + url.pointer, + outDate, + error); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSDate? get gregorianStartDate { - final _ret = _objc_msgSend_183(this.pointer, _sel_gregorianStartDate); + objc.NSObject? get ubiquityIdentityToken { + final _ret = _objc_msgSend_66(this.pointer, _sel_ubiquityIdentityToken); return _ret.address == 0 ? null - : NSDate._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set gregorianStartDate(NSDate? value) { - return _objc_msgSend_800(this.pointer, _sel_setGregorianStartDate_, - value?.pointer ?? ffi.nullptr); + void getFileProviderServicesForItemAtURL_completionHandler_(objc.NSURL url, + ObjCBlock_ffiVoid_NSDictionary_NSError completionHandler) { + _objc_msgSend_308( + this.pointer, + _sel_getFileProviderServicesForItemAtURL_completionHandler_, + url.pointer, + completionHandler.pointer); } - bool get doesRelativeDateFormatting { - return _objc_msgSend_12(this.pointer, _sel_doesRelativeDateFormatting); + objc.NSURL? containerURLForSecurityApplicationGroupIdentifier_( + objc.NSString groupIdentifier) { + final _ret = _objc_msgSend_11( + this.pointer, + _sel_containerURLForSecurityApplicationGroupIdentifier_, + groupIdentifier.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - set doesRelativeDateFormatting(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setDoesRelativeDateFormatting_, value); + objc.NSURL get homeDirectoryForCurrentUser { + final _ret = + _objc_msgSend_9(this.pointer, _sel_homeDirectoryForCurrentUser); + return objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSObject initWithDateFormat_allowNaturalLanguage_( - NSString format, bool flag) { - final _ret = _objc_msgSend_30(this.pointer, - _sel_initWithDateFormat_allowNaturalLanguage_, format.pointer, flag); - return NSObject._(_ret, retain: true, release: true); + objc.NSURL get temporaryDirectory { + final _ret = _objc_msgSend_9(this.pointer, _sel_temporaryDirectory); + return objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - bool allowsNaturalLanguage() { - return _objc_msgSend_12(this.pointer, _sel_allowsNaturalLanguage); + objc.NSURL? homeDirectoryForUser_(objc.NSString userName) { + final _ret = _objc_msgSend_11( + this.pointer, _sel_homeDirectoryForUser_, userName.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } @override - NSDateFormatter init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSDateFormatter._(_ret, retain: true, release: true); + NSFileManager init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFileManager.castFromPointer(_ret, retain: true, release: true); } - static NSDateFormatter new1() { - final _ret = _objc_msgSend_2(_class_NSDateFormatter, _sel_new); - return NSDateFormatter._(_ret, retain: false, release: true); + static NSFileManager new1() { + final _ret = _objc_msgSend_40(_class_NSFileManager, _sel_new); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); } - static NSDateFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSFileManager allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSDateFormatter, _sel_allocWithZone_, zone); - return NSDateFormatter._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSFileManager, _sel_allocWithZone_, zone); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); } - static NSDateFormatter alloc() { - final _ret = _objc_msgSend_2(_class_NSDateFormatter, _sel_alloc); - return NSDateFormatter._(_ret, retain: false, release: true); + static NSFileManager alloc() { + final _ret = _objc_msgSend_40(_class_NSFileManager, _sel_alloc); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSDateFormatter, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFileManager, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSDateFormatter, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFileManager, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSDateFormatter, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSFileManager, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSDateFormatter, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSFileManager, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSDateFormatter, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFileManager, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSDateFormatter, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFileManager, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSDateFormatter, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFileManager, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSDateFormatter, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFileManager, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSDateFormatter, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSFileManager, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSDateFormatter = objc.getClass("NSDateFormatter"); - -class NSFormatter extends NSObject { - NSFormatter._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSFormatter] that points to the same underlying object as [other]. - static NSFormatter castFrom(T other) { - return NSFormatter._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSFormatter] that wraps the given raw object pointer. - static NSFormatter castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFormatter._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSFormatter]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSFormatter); - } - - NSString? stringForObjectValue_(NSObject? obj) { - final _ret = _objc_msgSend_747( - this.pointer, _sel_stringForObjectValue_, obj?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } +late final _class_NSFileManager = objc.getClass("NSFileManager"); +late final _sel_defaultManager = objc.registerName("defaultManager"); +final _objc_msgSend_269 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - NSAttributedString? attributedStringForObjectValue_withDefaultAttributes_( - NSObject obj, NSDictionary? attrs) { - final _ret = _objc_msgSend_748( - this.pointer, - _sel_attributedStringForObjectValue_withDefaultAttributes_, - obj.pointer, - attrs?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSAttributedString._(_ret, retain: true, release: true); - } +abstract class NSVolumeEnumerationOptions { + static const int NSVolumeEnumerationSkipHiddenVolumes = 2; + static const int NSVolumeEnumerationProduceFileReferenceURLs = 4; +} - NSString? editingStringForObjectValue_(NSObject obj) { - final _ret = _objc_msgSend_526( - this.pointer, _sel_editingStringForObjectValue_, obj.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } +late final _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_ = objc + .registerName("mountedVolumeURLsIncludingResourceValuesForKeys:options:"); +final _objc_msgSend_270 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); - bool getObjectValue_forString_errorDescription_( - ffi.Pointer> obj, - NSString string, - ffi.Pointer> error) { - return _objc_msgSend_749( - this.pointer, - _sel_getObjectValue_forString_errorDescription_, - obj, - string.pointer, - error); - } +abstract class NSFileManagerUnmountOptions { + static const int NSFileManagerUnmountAllPartitionsAndEjectDisk = 1; + static const int NSFileManagerUnmountWithoutUI = 2; +} - bool isPartialStringValid_newEditingString_errorDescription_( - NSString partialString, - ffi.Pointer> newString, - ffi.Pointer> error) { - return _objc_msgSend_750( - this.pointer, - _sel_isPartialStringValid_newEditingString_errorDescription_, - partialString.pointer, - newString, - error); - } +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); +final _ObjCBlock_ffiVoid_NSError_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSError_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - bool - isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_( - ffi.Pointer> partialStringPtr, - ffi.Pointer<_NSRange> proposedSelRangePtr, - NSString origString, - _NSRange origSelRange, - ffi.Pointer> error) { - return _objc_msgSend_751( - this.pointer, - _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_, - partialStringPtr, - proposedSelRangePtr, - origString.pointer, - origSelRange, - error); - } +void _ObjCBlock_ffiVoid_NSError_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSError_closureRegistry[block.ref.target.address]!(arg0); - @override - NSFormatter init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSFormatter._(_ret, retain: true, release: true); - } +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); - static NSFormatter new1() { - final _ret = _objc_msgSend_2(_class_NSFormatter, _sel_new); - return NSFormatter._(_ret, retain: false, release: true); + /// 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 NSFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSFormatter, _sel_allocWithZone_, zone); - return NSFormatter._(_ret, retain: false, 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_NSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - static NSFormatter alloc() { - final _ret = _objc_msgSend_2(_class_NSFormatter, _sel_alloc); - return NSFormatter._(_ret, 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.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSError_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSError.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSFormatter, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSError.listener(void Function(objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSError_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSError.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSFormatter, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } + void call(objc.NSError? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSFormatter, _sel_accessInstanceVariablesDirectly); - } +late final _sel_unmountVolumeAtURL_options_completionHandler_ = + objc.registerName("unmountVolumeAtURL:options:completionHandler:"); +final _objc_msgSend_271 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSFormatter, _sel_useStoredAccessor); - } +abstract class NSDirectoryEnumerationOptions { + static const int NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1; + static const int NSDirectoryEnumerationSkipsPackageDescendants = 2; + static const int NSDirectoryEnumerationSkipsHiddenFiles = 4; + static const int NSDirectoryEnumerationIncludesDirectoriesPostOrder = 8; + static const int NSDirectoryEnumerationProducesRelativePathURLs = 16; +} - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSFormatter, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } +late final _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_ = + objc.registerName( + "contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:"); +final _objc_msgSend_272 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSFormatter, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } +abstract class NSSearchPathDirectory { + static const int NSApplicationDirectory = 1; + static const int NSDemoApplicationDirectory = 2; + static const int NSDeveloperApplicationDirectory = 3; + static const int NSAdminApplicationDirectory = 4; + static const int NSLibraryDirectory = 5; + static const int NSDeveloperDirectory = 6; + static const int NSUserDirectory = 7; + static const int NSDocumentationDirectory = 8; + static const int NSDocumentDirectory = 9; + static const int NSCoreServiceDirectory = 10; + static const int NSAutosavedInformationDirectory = 11; + static const int NSDesktopDirectory = 12; + static const int NSCachesDirectory = 13; + static const int NSApplicationSupportDirectory = 14; + static const int NSDownloadsDirectory = 15; + static const int NSInputMethodsDirectory = 16; + static const int NSMoviesDirectory = 17; + static const int NSMusicDirectory = 18; + static const int NSPicturesDirectory = 19; + static const int NSPrinterDescriptionDirectory = 20; + static const int NSSharedPublicDirectory = 21; + static const int NSPreferencePanesDirectory = 22; + static const int NSApplicationScriptsDirectory = 23; + static const int NSItemReplacementDirectory = 99; + static const int NSAllApplicationsDirectory = 100; + static const int NSAllLibrariesDirectory = 101; + static const int NSTrashDirectory = 102; +} - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSFormatter, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } +abstract class NSSearchPathDomainMask { + static const int NSUserDomainMask = 1; + static const int NSLocalDomainMask = 2; + static const int NSNetworkDomainMask = 4; + static const int NSSystemDomainMask = 8; + static const int NSAllDomainsMask = 65535; +} - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSFormatter, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } +late final _sel_URLsForDirectory_inDomains_ = + objc.registerName("URLsForDirectory:inDomains:"); +final _objc_msgSend_273 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Int32)>>() + .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_274 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer, + ffi.Bool, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer, + bool, + ffi.Pointer>)>(); - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSFormatter, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } +abstract class NSURLRelationship { + static const int NSURLRelationshipContains = 0; + static const int NSURLRelationshipSame = 1; + static const int NSURLRelationshipOther = 2; } -late final _class_NSFormatter = objc.getClass("NSFormatter"); -late final _sel_stringForObjectValue_ = - objc.registerName("stringForObjectValue:"); -final _objc_msgSend_747 = objc.msgSendPointer +late final _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_ = + objc.registerName("getRelationship:ofDirectoryAtURL:toItemAtURL:error:"); +final _objc_msgSend_275 = 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_276 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + 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_277 = 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_278 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_setAttributes_ofItemAtPath_error_ = + objc.registerName("setAttributes:ofItemAtPath:error:"); +final _objc_msgSend_279 = 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_280 = 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_281 = 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)>(); -late final _sel_attributedStringForObjectValue_withDefaultAttributes_ = - objc.registerName("attributedStringForObjectValue:withDefaultAttributes:"); -final _objc_msgSend_748 = objc.msgSendPointer + 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_282 = 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)>(); -late final _sel_editingStringForObjectValue_ = - objc.registerName("editingStringForObjectValue:"); -late final _sel_getObjectValue_forString_errorDescription_ = - objc.registerName("getObjectValue:forString:errorDescription:"); -final _objc_msgSend_749 = objc.msgSendPointer + 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_283 = 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_isPartialStringValid_newEditingString_errorDescription_ = objc - .registerName("isPartialStringValid:newEditingString:errorDescription:"); -final _objc_msgSend_750 = objc.msgSendPointer +late final _sel_destinationOfSymbolicLinkAtPath_error_ = + objc.registerName("destinationOfSymbolicLinkAtPath:error:"); +final _objc_msgSend_284 = 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_285 = 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_751 = objc.msgSendPointer +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_286 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer<_NSRange>, ffi.Pointer, - _NSRange, ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer<_NSRange>, ffi.Pointer, - _NSRange, ffi.Pointer>)>(); +late final _sel_trashItemAtURL_resultingItemURL_error_ = + objc.registerName("trashItemAtURL:resultingItemURL:error:"); +final _objc_msgSend_287 = 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_288 = 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_289 = 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_290 = 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_291 = 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_292 = 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_293 = 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_294 = 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_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_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_296 = 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_297 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_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); +final _ObjCBlock_bool_NSURL_NSError_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_bool_NSURL_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_bool_NSURL_NSError_registerClosure( + bool Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_bool_NSURL_NSError_closureRegistryIndex; + _ObjCBlock_bool_NSURL_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -abstract class NSFormattingContext { - static const int NSFormattingContextUnknown = 0; - static const int NSFormattingContextDynamic = 1; - static const int NSFormattingContextStandalone = 2; - static const int NSFormattingContextListItem = 3; - static const int NSFormattingContextBeginningOfSentence = 4; - static const int NSFormattingContextMiddleOfSentence = 5; +bool _ObjCBlock_bool_NSURL_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_NSURL_NSError_closureRegistry[block.ref.target.address]!( + 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.newBlock( + _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.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_NSURL_NSError_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_NSURL_NSError_registerClosure( + (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_formattingContext = objc.registerName("formattingContext"); -final _objc_msgSend_752 = objc.msgSendPointer +late final _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_ = + objc.registerName( + "enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:"); +final _objc_msgSend_298 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setFormattingContext_ = - objc.registerName("setFormattingContext:"); -final _objc_msgSend_753 = objc.msgSendPointer + 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_299 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_getObjectValue_forString_range_error_ = - objc.registerName("getObjectValue:forString:range:error:"); -final _objc_msgSend_754 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_createFileAtPath_contents_attributes_ = + objc.registerName("createFileAtPath:contents:attributes:"); +final _objc_msgSend_300 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, ffi.Pointer, - ffi.Pointer<_NSRange>, + 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_301 = 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_302 = 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)>(); + +abstract class NSFileManagerItemReplacementOptions { + static const int NSFileManagerItemReplacementUsingNewMetadataOnly = 1; + static const int NSFileManagerItemReplacementWithoutDeletingBackupItem = 2; +} + +late final _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_ = + objc.registerName( + "replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:"); +final _objc_msgSend_303 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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_304 = 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<_NSRange>, ffi.Pointer>)>(); -late final _sel_stringFromDate_ = objc.registerName("stringFromDate:"); -final _objc_msgSend_755 = objc.msgSendPointer +late final _sel_isUbiquitousItemAtURL_ = + objc.registerName("isUbiquitousItemAtURL:"); +final _objc_msgSend_305 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, + bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_dateFromString_ = objc.registerName("dateFromString:"); - -abstract class NSDateFormatterStyle { - static const int NSDateFormatterNoStyle = 0; - static const int NSDateFormatterShortStyle = 1; - static const int NSDateFormatterMediumStyle = 2; - static const int NSDateFormatterLongStyle = 3; - static const int NSDateFormatterFullStyle = 4; -} - -late final _sel_localizedStringFromDate_dateStyle_timeStyle_ = - objc.registerName("localizedStringFromDate:dateStyle:timeStyle:"); -final _objc_msgSend_756 = objc.msgSendPointer +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_306 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>() + ffi.Pointer)>>() .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_757 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_ = objc + .registerName("URLForPublishingUbiquitousItemAtURL:expirationDate:error:"); +final _objc_msgSend_307 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>() + ffi.Pointer>, + ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - 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); +final _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -abstract class NSDateFormatterBehavior { - static const int NSDateFormatterBehaviorDefault = 0; - static const int NSDateFormatterBehavior10_0 = 1000; - static const int NSDateFormatterBehavior10_4 = 1040; +void _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[ + block.ref.target.address]!(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.newBlock( + _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.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( + (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._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( + (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.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_defaultFormatterBehavior = - objc.registerName("defaultFormatterBehavior"); -final _objc_msgSend_758 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDefaultFormatterBehavior_ = - objc.registerName("setDefaultFormatterBehavior:"); -final _objc_msgSend_759 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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_760 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDateStyle_ = objc.registerName("setDateStyle:"); -final _objc_msgSend_761 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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:"); -final _objc_msgSend_762 = objc.msgSendPointer +late final _sel_getFileProviderServicesForItemAtURL_completionHandler_ = + objc.registerName("getFileProviderServicesForItemAtURL:completionHandler:"); +final _objc_msgSend_308 = 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)>(); -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:"); + 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:"); -class NSCalendar extends NSObject { - NSCalendar._(ffi.Pointer pointer, +class NSHTTPCookieStorage extends objc.NSObject { + NSHTTPCookieStorage._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSCalendar] that points to the same underlying object as [other]. - static NSCalendar castFrom(T other) { - return NSCalendar._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSHTTPCookieStorage] that points to the same underlying object as [other]. + NSHTTPCookieStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSCalendar] that wraps the given raw object pointer. - static NSCalendar castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCalendar._(other, retain: retain, release: release); - } + /// 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 [NSCalendar]. + /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSCalendar); + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSHTTPCookieStorage); } - static NSCalendar getCurrentCalendar() { - final _ret = _objc_msgSend_763(_class_NSCalendar, _sel_currentCalendar); - return NSCalendar._(_ret, retain: true, release: true); + static NSHTTPCookieStorage getSharedHTTPCookieStorage() { + final _ret = _objc_msgSend_309( + _class_NSHTTPCookieStorage, _sel_sharedHTTPCookieStorage); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - static NSCalendar getAutoupdatingCurrentCalendar() { - final _ret = - _objc_msgSend_763(_class_NSCalendar, _sel_autoupdatingCurrentCalendar); - return NSCalendar._(_ret, retain: true, release: true); + static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( + objc.NSString identifier) { + final _ret = _objc_msgSend_310( + _class_NSHTTPCookieStorage, + _sel_sharedCookieStorageForGroupContainerIdentifier_, + identifier.pointer); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - static NSCalendar? calendarWithIdentifier_( - NSString calendarIdentifierConstant) { - final _ret = _objc_msgSend_764(_class_NSCalendar, - _sel_calendarWithIdentifier_, calendarIdentifierConstant.pointer); + objc.NSArray? get cookies { + final _ret = _objc_msgSend_69(this.pointer, _sel_cookies); return _ret.address == 0 ? null - : NSCalendar._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - @override - NSCalendar init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSCalendar._(_ret, retain: true, release: true); + void setCookie_(NSHTTPCookie cookie) { + _objc_msgSend_315(this.pointer, _sel_setCookie_, cookie.pointer); } - NSObject? initWithCalendarIdentifier_(NSString ident) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithCalendarIdentifier_, ident.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + void deleteCookie_(NSHTTPCookie cookie) { + _objc_msgSend_315(this.pointer, _sel_deleteCookie_, cookie.pointer); } - NSString get calendarIdentifier { - final _ret = _objc_msgSend_21(this.pointer, _sel_calendarIdentifier); - return NSString._(_ret, retain: true, release: true); + void removeCookiesSinceDate_(objc.NSDate date) { + _objc_msgSend_246(this.pointer, _sel_removeCookiesSinceDate_, date.pointer); } - NSLocale? get locale { - final _ret = _objc_msgSend_765(this.pointer, _sel_locale); + objc.NSArray? cookiesForURL_(objc.NSURL URL) { + final _ret = + _objc_msgSend_316(this.pointer, _sel_cookiesForURL_, URL.pointer); return _ret.address == 0 ? null - : NSLocale._(_ret, retain: true, release: true); - } - - set locale(NSLocale? value) { - return _objc_msgSend_766( - this.pointer, _sel_setLocale_, value?.pointer ?? ffi.nullptr); - } - - NSTimeZone get timeZone { - final _ret = _objc_msgSend_179(this.pointer, _sel_timeZone); - return NSTimeZone._(_ret, retain: true, release: true); - } - - set timeZone(NSTimeZone value) { - return _objc_msgSend_180(this.pointer, _sel_setTimeZone_, value.pointer); - } - - int get firstWeekday { - return _objc_msgSend_10(this.pointer, _sel_firstWeekday); - } - - set firstWeekday(int value) { - return _objc_msgSend_516(this.pointer, _sel_setFirstWeekday_, value); - } - - int get minimumDaysInFirstWeek { - return _objc_msgSend_10(this.pointer, _sel_minimumDaysInFirstWeek); - } - - set minimumDaysInFirstWeek(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setMinimumDaysInFirstWeek_, value); - } - - NSArray get eraSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_eraSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get longEraSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_longEraSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get monthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_monthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get shortMonthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_shortMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get veryShortMonthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_veryShortMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get standaloneMonthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_standaloneMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get shortStandaloneMonthSymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_shortStandaloneMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get veryShortStandaloneMonthSymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_veryShortStandaloneMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get weekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_weekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get shortWeekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_shortWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get veryShortWeekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_veryShortWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get standaloneWeekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_standaloneWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get shortStandaloneWeekdaySymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_shortStandaloneWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get veryShortStandaloneWeekdaySymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_veryShortStandaloneWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get quarterSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_quarterSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get shortQuarterSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_shortQuarterSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get standaloneQuarterSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_standaloneQuarterSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get shortStandaloneQuarterSymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_shortStandaloneQuarterSymbols); - return NSArray._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get AMSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_AMSymbol); - return NSString._(_ret, retain: true, release: true); - } - - NSString get PMSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_PMSymbol); - return NSString._(_ret, retain: true, release: true); - } - - void minimumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { - objc.useMsgSendVariants - ? _objc_msgSend_767Stret( - stret, this.pointer, _sel_minimumRangeOfUnit_, unit) - : stret.ref = - _objc_msgSend_767(this.pointer, _sel_minimumRangeOfUnit_, unit); - } - - void maximumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { - objc.useMsgSendVariants - ? _objc_msgSend_767Stret( - stret, this.pointer, _sel_maximumRangeOfUnit_, unit) - : stret.ref = - _objc_msgSend_767(this.pointer, _sel_maximumRangeOfUnit_, unit); - } - - void rangeOfUnit_inUnit_forDate_( - ffi.Pointer<_NSRange> stret, int smaller, int larger, NSDate date) { - objc.useMsgSendVariants - ? _objc_msgSend_768Stret(stret, this.pointer, - _sel_rangeOfUnit_inUnit_forDate_, smaller, larger, date.pointer) - : stret.ref = _objc_msgSend_768(this.pointer, - _sel_rangeOfUnit_inUnit_forDate_, smaller, larger, date.pointer); - } - - int ordinalityOfUnit_inUnit_forDate_(int smaller, int larger, NSDate date) { - return _objc_msgSend_769(this.pointer, - _sel_ordinalityOfUnit_inUnit_forDate_, smaller, larger, date.pointer); - } - - bool rangeOfUnit_startDate_interval_forDate_( - int unit, - ffi.Pointer> datep, - ffi.Pointer tip, - NSDate date) { - return _objc_msgSend_770( + void setCookies_forURL_mainDocumentURL_( + objc.NSArray cookies, objc.NSURL? URL, objc.NSURL? mainDocumentURL) { + _objc_msgSend_317( this.pointer, - _sel_rangeOfUnit_startDate_interval_forDate_, - unit, - datep, - tip, - date.pointer); + _sel_setCookies_forURL_mainDocumentURL_, + cookies.pointer, + URL?.pointer ?? ffi.nullptr, + mainDocumentURL?.pointer ?? ffi.nullptr); } - NSDate? dateFromComponents_(NSDateComponents comps) { - final _ret = _objc_msgSend_778( - this.pointer, _sel_dateFromComponents_, comps.pointer); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); + int get cookieAcceptPolicy { + return _objc_msgSend_318(this.pointer, _sel_cookieAcceptPolicy); } - NSDateComponents components_fromDate_(int unitFlags, NSDate date) { - final _ret = _objc_msgSend_779( - this.pointer, _sel_components_fromDate_, unitFlags, date.pointer); - return NSDateComponents._(_ret, retain: true, release: true); + set cookieAcceptPolicy(int value) { + return _objc_msgSend_319(this.pointer, _sel_setCookieAcceptPolicy_, value); } - NSDate? dateByAddingComponents_toDate_options_( - NSDateComponents comps, NSDate date, int opts) { - final _ret = _objc_msgSend_780( - this.pointer, - _sel_dateByAddingComponents_toDate_options_, - comps.pointer, - date.pointer, - opts); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); + objc.NSArray sortedCookiesUsingDescriptors_(objc.NSArray sortOrder) { + final _ret = _objc_msgSend_67( + this.pointer, _sel_sortedCookiesUsingDescriptors_, sortOrder.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDateComponents components_fromDate_toDate_options_( - int unitFlags, NSDate startingDate, NSDate resultDate, int opts) { - final _ret = _objc_msgSend_781( - this.pointer, - _sel_components_fromDate_toDate_options_, - unitFlags, - startingDate.pointer, - resultDate.pointer, - opts); - return NSDateComponents._(_ret, retain: true, release: true); + void storeCookies_forTask_(objc.NSArray cookies, NSURLSessionTask task) { + _objc_msgSend_353(this.pointer, _sel_storeCookies_forTask_, cookies.pointer, + task.pointer); } - void getEra_year_month_day_fromDate_( - ffi.Pointer eraValuePointer, - ffi.Pointer yearValuePointer, - ffi.Pointer monthValuePointer, - ffi.Pointer dayValuePointer, - NSDate date) { - _objc_msgSend_782( - this.pointer, - _sel_getEra_year_month_day_fromDate_, - eraValuePointer, - yearValuePointer, - monthValuePointer, - dayValuePointer, - date.pointer); + void getCookiesForTask_completionHandler_( + NSURLSessionTask task, ObjCBlock_ffiVoid_NSArray completionHandler) { + _objc_msgSend_354(this.pointer, _sel_getCookiesForTask_completionHandler_, + task.pointer, completionHandler.pointer); } - void getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_( - ffi.Pointer eraValuePointer, - ffi.Pointer yearValuePointer, - ffi.Pointer weekValuePointer, - ffi.Pointer weekdayValuePointer, - NSDate date) { - _objc_msgSend_782( - this.pointer, - _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_, - eraValuePointer, - yearValuePointer, - weekValuePointer, - weekdayValuePointer, - date.pointer); + @override + NSHTTPCookieStorage init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - void getHour_minute_second_nanosecond_fromDate_( - ffi.Pointer hourValuePointer, - ffi.Pointer minuteValuePointer, - ffi.Pointer secondValuePointer, - ffi.Pointer nanosecondValuePointer, - NSDate date) { - _objc_msgSend_782( - this.pointer, - _sel_getHour_minute_second_nanosecond_fromDate_, - hourValuePointer, - minuteValuePointer, - secondValuePointer, - nanosecondValuePointer, - date.pointer); + static NSHTTPCookieStorage new1() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookieStorage, _sel_new); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); } - int component_fromDate_(int unit, NSDate date) { - return _objc_msgSend_783( - this.pointer, _sel_component_fromDate_, unit, date.pointer); + static NSHTTPCookieStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSHTTPCookieStorage, _sel_allocWithZone_, zone); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); } - 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_784( - this.pointer, - _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_, - eraValue, - yearValue, - monthValue, - dayValue, - hourValue, - minuteValue, - secondValue, - nanosecondValue); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); + static NSHTTPCookieStorage alloc() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookieStorage, _sel_alloc); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); } - 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_784( - this.pointer, - _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_, - eraValue, - yearValue, - weekValue, - weekdayValue, - hourValue, - minuteValue, - secondValue, - nanosecondValue); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSHTTPCookieStorage, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSDate startOfDayForDate_(NSDate date) { - final _ret = - _objc_msgSend_168(this.pointer, _sel_startOfDayForDate_, date.pointer); - return NSDate._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSHTTPCookieStorage, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSDateComponents componentsInTimeZone_fromDate_( - NSTimeZone timezone, NSDate date) { - final _ret = _objc_msgSend_785(this.pointer, - _sel_componentsInTimeZone_fromDate_, timezone.pointer, date.pointer); - return NSDateComponents._(_ret, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSHTTPCookieStorage, _sel_accessInstanceVariablesDirectly); } - int compareDate_toDate_toUnitGranularity_( - NSDate date1, NSDate date2, int unit) { - return _objc_msgSend_786( - this.pointer, - _sel_compareDate_toDate_toUnitGranularity_, - date1.pointer, - date2.pointer, - unit); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSHTTPCookieStorage, _sel_useStoredAccessor); } - bool isDate_equalToDate_toUnitGranularity_( - NSDate date1, NSDate date2, int unit) { - return _objc_msgSend_787( - this.pointer, - _sel_isDate_equalToDate_toUnitGranularity_, - date1.pointer, - date2.pointer, - unit); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSHTTPCookieStorage, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - bool isDate_inSameDayAsDate_(NSDate date1, NSDate date2) { - return _objc_msgSend_788(this.pointer, _sel_isDate_inSameDayAsDate_, - date1.pointer, date2.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSHTTPCookieStorage, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSHTTPCookieStorage, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - bool isDateInToday_(NSDate date) { - return _objc_msgSend_170(this.pointer, _sel_isDateInToday_, date.pointer); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSHTTPCookieStorage, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool isDateInYesterday_(NSDate date) { - return _objc_msgSend_170( - this.pointer, _sel_isDateInYesterday_, date.pointer); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSHTTPCookieStorage, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - bool isDateInTomorrow_(NSDate date) { - return _objc_msgSend_170( - this.pointer, _sel_isDateInTomorrow_, date.pointer); +late final _class_NSHTTPCookieStorage = objc.getClass("NSHTTPCookieStorage"); +late final _sel_sharedHTTPCookieStorage = + objc.registerName("sharedHTTPCookieStorage"); +final _objc_msgSend_309 = 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_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_cookies = objc.registerName("cookies"); + +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); } - bool isDateInWeekend_(NSDate date) { - return _objc_msgSend_170(this.pointer, _sel_isDateInWeekend_, date.pointer); + NSHTTPCookie? initWithProperties_(objc.NSDictionary properties) { + final _ret = _objc_msgSend_311( + this.pointer, _sel_initWithProperties_, properties.pointer); + return _ret.address == 0 + ? null + : NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } - bool rangeOfWeekendStartDate_interval_containingDate_( - ffi.Pointer> datep, - ffi.Pointer tip, - NSDate date) { - return _objc_msgSend_789( - this.pointer, - _sel_rangeOfWeekendStartDate_interval_containingDate_, - datep, - tip, - date.pointer); + static NSHTTPCookie? cookieWithProperties_(objc.NSDictionary properties) { + final _ret = _objc_msgSend_312( + _class_NSHTTPCookie, _sel_cookieWithProperties_, properties.pointer); + return _ret.address == 0 + ? null + : NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } - bool nextWeekendStartDate_interval_options_afterDate_( - ffi.Pointer> datep, - ffi.Pointer tip, - int options, - NSDate date) { - return _objc_msgSend_790( - this.pointer, - _sel_nextWeekendStartDate_interval_options_afterDate_, - datep, - tip, - options, - date.pointer); + static objc.NSDictionary requestHeaderFieldsWithCookies_( + objc.NSArray cookies) { + final _ret = _objc_msgSend_313(_class_NSHTTPCookie, + _sel_requestHeaderFieldsWithCookies_, cookies.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSDateComponents components_fromDateComponents_toDateComponents_options_( - int unitFlags, - NSDateComponents startingDateComp, - NSDateComponents resultDateComp, - int options) { - final _ret = _objc_msgSend_791( - this.pointer, - _sel_components_fromDateComponents_toDateComponents_options_, - unitFlags, - startingDateComp.pointer, - resultDateComp.pointer, - options); - return NSDateComponents._(_ret, retain: true, release: true); + static objc.NSArray cookiesWithResponseHeaderFields_forURL_( + objc.NSDictionary headerFields, objc.NSURL URL) { + final _ret = _objc_msgSend_314( + _class_NSHTTPCookie, + _sel_cookiesWithResponseHeaderFields_forURL_, + headerFields.pointer, + URL.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDate? dateByAddingUnit_value_toDate_options_( - int unit, int value, NSDate date, int options) { - final _ret = _objc_msgSend_792( - this.pointer, - _sel_dateByAddingUnit_value_toDate_options_, - unit, - value, - date.pointer, - options); + objc.NSDictionary? get properties { + final _ret = _objc_msgSend_65(this.pointer, _sel_properties); return _ret.address == 0 ? null - : NSDate._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - void enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_( - NSDate start, - NSDateComponents comps, - int opts, - ObjCBlock_ffiVoid_NSDate_bool_bool block) { - _objc_msgSend_793( - this.pointer, - _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_, - start.pointer, - comps.pointer, - opts, - block.pointer); + int get version { + return _objc_msgSend_29(this.pointer, _sel_version); } - NSDate? nextDateAfterDate_matchingComponents_options_( - NSDate date, NSDateComponents comps, int options) { - final _ret = _objc_msgSend_794( - this.pointer, - _sel_nextDateAfterDate_matchingComponents_options_, - date.pointer, - comps.pointer, - options); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString get value { + final _ret = _objc_msgSend_12(this.pointer, _sel_value); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSDate? get expiresDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_expiresDate); return _ret.address == 0 ? null - : NSDate._(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSDate? nextDateAfterDate_matchingUnit_value_options_( - NSDate date, int unit, int value, int options) { - final _ret = _objc_msgSend_795( - this.pointer, - _sel_nextDateAfterDate_matchingUnit_value_options_, - date.pointer, - unit, - value, - options); + bool get sessionOnly { + return _objc_msgSend_7(this.pointer, _sel_isSessionOnly); + } + + objc.NSString get domain { + final _ret = _objc_msgSend_12(this.pointer, _sel_domain); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString get path { + final _ret = _objc_msgSend_12(this.pointer, _sel_path); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool get secure { + return _objc_msgSend_7(this.pointer, _sel_isSecure); + } + + bool get HTTPOnly { + return _objc_msgSend_7(this.pointer, _sel_isHTTPOnly); + } + + objc.NSString? get comment { + final _ret = _objc_msgSend_13(this.pointer, _sel_comment); return _ret.address == 0 ? null - : NSDate._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSDate? nextDateAfterDate_matchingHour_minute_second_options_(NSDate date, - int hourValue, int minuteValue, int secondValue, int options) { - final _ret = _objc_msgSend_796( - this.pointer, - _sel_nextDateAfterDate_matchingHour_minute_second_options_, - date.pointer, - hourValue, - minuteValue, - secondValue, - options); + objc.NSURL? get commentURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_commentURL); return _ret.address == 0 ? null - : NSDate._(_ret, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSDate? dateBySettingUnit_value_ofDate_options_( - int unit, int v, NSDate date, int opts) { - final _ret = _objc_msgSend_792( - this.pointer, - _sel_dateBySettingUnit_value_ofDate_options_, - unit, - v, - date.pointer, - opts); + objc.NSArray? get portList { + final _ret = _objc_msgSend_69(this.pointer, _sel_portList); return _ret.address == 0 ? null - : NSDate._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDate? dateBySettingHour_minute_second_ofDate_options_( - int h, int m, int s, NSDate date, int opts) { - final _ret = _objc_msgSend_797( - this.pointer, - _sel_dateBySettingHour_minute_second_ofDate_options_, - h, - m, - s, - date.pointer, - opts); + objc.NSString? get sameSitePolicy { + final _ret = _objc_msgSend_13(this.pointer, _sel_sameSitePolicy); return _ret.address == 0 ? null - : NSDate._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool date_matchesComponents_(NSDate date, NSDateComponents components) { - return _objc_msgSend_798(this.pointer, _sel_date_matchesComponents_, - date.pointer, components.pointer); + @override + NSHTTPCookie init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } - static NSCalendar new1() { - final _ret = _objc_msgSend_2(_class_NSCalendar, _sel_new); - return NSCalendar._(_ret, retain: false, release: true); + static NSHTTPCookie new1() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookie, _sel_new); + return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } - static NSCalendar allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSCalendar, _sel_allocWithZone_, zone); - return NSCalendar._(_ret, retain: false, release: true); + static NSHTTPCookie allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSHTTPCookie, _sel_allocWithZone_, zone); + return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } - static NSCalendar alloc() { - final _ret = _objc_msgSend_2(_class_NSCalendar, _sel_alloc); - return NSCalendar._(_ret, retain: false, release: true); + static NSHTTPCookie alloc() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookie, _sel_alloc); + return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSCalendar, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSHTTPCookie, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSCalendar, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSHTTPCookie, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSCalendar, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSHTTPCookie, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSCalendar, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSHTTPCookie, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSCalendar, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSHTTPCookie, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSCalendar, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSHTTPCookie, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSCalendar, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSHTTPCookie, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSCalendar, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSHTTPCookie, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSCalendar, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSHTTPCookie, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSCalendar = objc.getClass("NSCalendar"); -late final _sel_currentCalendar = objc.registerName("currentCalendar"); -final _objc_msgSend_763 = objc.msgSendPointer +late final _class_NSHTTPCookie = objc.getClass("NSHTTPCookie"); +late final _sel_initWithProperties_ = objc.registerName("initWithProperties:"); +final _objc_msgSend_311 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + instancetype Function( + ffi.Pointer, + 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_764 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cookieWithProperties_ = + objc.registerName("cookieWithProperties:"); +final _objc_msgSend_312 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -37620,2538 +13980,2573 @@ final _objc_msgSend_764 = objc.msgSendPointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithCalendarIdentifier_ = - objc.registerName("initWithCalendarIdentifier:"); -final _objc_msgSend_765 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_766 = objc.msgSendPointer +late final _sel_requestHeaderFieldsWithCookies_ = + objc.registerName("requestHeaderFieldsWithCookies:"); +final _objc_msgSend_313 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_firstWeekday = objc.registerName("firstWeekday"); -late final _sel_setFirstWeekday_ = objc.registerName("setFirstWeekday:"); -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"); - -abstract class NSCalendarUnit { - static const int NSCalendarUnitEra = 2; - static const int NSCalendarUnitYear = 4; - static const int NSCalendarUnitMonth = 8; - static const int NSCalendarUnitDay = 16; - static const int NSCalendarUnitHour = 32; - static const int NSCalendarUnitMinute = 64; - static const int NSCalendarUnitSecond = 128; - static const int NSCalendarUnitWeekday = 512; - static const int NSCalendarUnitWeekdayOrdinal = 1024; - static const int NSCalendarUnitQuarter = 2048; - static const int NSCalendarUnitWeekOfMonth = 4096; - static const int NSCalendarUnitWeekOfYear = 8192; - static const int NSCalendarUnitYearForWeekOfYear = 16384; - static const int NSCalendarUnitNanosecond = 32768; - static const int NSCalendarUnitCalendar = 1048576; - static const int NSCalendarUnitTimeZone = 2097152; - static const int NSEraCalendarUnit = 2; - static const int NSYearCalendarUnit = 4; - static const int NSMonthCalendarUnit = 8; - static const int NSDayCalendarUnit = 16; - static const int NSHourCalendarUnit = 32; - static const int NSMinuteCalendarUnit = 64; - static const int NSSecondCalendarUnit = 128; - static const int NSWeekCalendarUnit = 256; - static const int NSWeekdayCalendarUnit = 512; - static const int NSWeekdayOrdinalCalendarUnit = 1024; - static const int NSQuarterCalendarUnit = 2048; - static const int NSWeekOfMonthCalendarUnit = 4096; - static const int NSWeekOfYearCalendarUnit = 8192; - static const int NSYearForWeekOfYearCalendarUnit = 16384; - static const int NSCalendarCalendarUnit = 1048576; - static const int NSTimeZoneCalendarUnit = 2097152; -} - -late final _sel_minimumRangeOfUnit_ = objc.registerName("minimumRangeOfUnit:"); -final _objc_msgSend_767 = objc.msgSendPointer +late final _sel_cookiesWithResponseHeaderFields_forURL_ = + objc.registerName("cookiesWithResponseHeaderFields:forURL:"); +final _objc_msgSend_314 = objc.msgSendPointer .cast< ffi.NativeFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, int)>(); -final _objc_msgSend_767Stret = objc.msgSendStretPointer + 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_315 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, - ffi.Int32)>>() + ffi.Pointer)>>() .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_768 = objc.msgSendPointer + 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_316 = objc.msgSendPointer .cast< ffi.NativeFunction< - _NSRange Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Int32, ffi.Pointer)>>() .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer)>(); -final _objc_msgSend_768Stret = objc.msgSendStretPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCookies_forURL_mainDocumentURL_ = + objc.registerName("setCookies:forURL:mainDocumentURL:"); +final _objc_msgSend_317 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Int32, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function( - ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, - int, - int, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -late final _sel_ordinalityOfUnit_inUnit_forDate_ = - objc.registerName("ordinalityOfUnit:inUnit:forDate:"); -final _objc_msgSend_769 = objc.msgSendPointer + +abstract class NSHTTPCookieAcceptPolicy { + static const int NSHTTPCookieAcceptPolicyAlways = 0; + static const int NSHTTPCookieAcceptPolicyNever = 1; + static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; +} + +late final _sel_cookieAcceptPolicy = objc.registerName("cookieAcceptPolicy"); +final _objc_msgSend_318 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer)>>() + ffi.Int32 Function(ffi.Pointer, + 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_770 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCookieAcceptPolicy_ = + objc.registerName("setCookieAcceptPolicy:"); +final _objc_msgSend_319 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>(); + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_sortedCookiesUsingDescriptors_ = + objc.registerName("sortedCookiesUsingDescriptors:"); -class NSDateComponents extends NSObject { - NSDateComponents._(ffi.Pointer pointer, +class NSURLSessionTask extends objc.NSObject { + NSURLSessionTask._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSDateComponents] that points to the same underlying object as [other]. - static NSDateComponents castFrom(T other) { - return NSDateComponents._(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.pointer, retain: true, release: true); - /// Returns a [NSDateComponents] that wraps the given raw object pointer. - static NSDateComponents castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDateComponents._(other, retain: retain, release: release); - } + /// 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 [NSDateComponents]. + /// Returns whether [obj] is an instance of [NSURLSessionTask]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSDateComponents); - } - - NSCalendar? get calendar { - final _ret = _objc_msgSend_771(this.pointer, _sel_calendar); - return _ret.address == 0 - ? null - : NSCalendar._(_ret, retain: true, release: true); + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionTask); } - set calendar(NSCalendar? value) { - return _objc_msgSend_772( - this.pointer, _sel_setCalendar_, value?.pointer ?? ffi.nullptr); + int get taskIdentifier { + return _objc_msgSend_29(this.pointer, _sel_taskIdentifier); } - NSTimeZone? get timeZone { - final _ret = _objc_msgSend_773(this.pointer, _sel_timeZone); + NSURLRequest? get originalRequest { + final _ret = _objc_msgSend_343(this.pointer, _sel_originalRequest); return _ret.address == 0 ? null - : NSTimeZone._(_ret, retain: true, release: true); - } - - set timeZone(NSTimeZone? value) { - return _objc_msgSend_774( - this.pointer, _sel_setTimeZone_, value?.pointer ?? ffi.nullptr); - } - - int get era { - return _objc_msgSend_83(this.pointer, _sel_era); - } - - set era(int value) { - return _objc_msgSend_635(this.pointer, _sel_setEra_, value); - } - - int get year { - return _objc_msgSend_83(this.pointer, _sel_year); - } - - set year(int value) { - return _objc_msgSend_635(this.pointer, _sel_setYear_, value); - } - - int get month { - return _objc_msgSend_83(this.pointer, _sel_month); - } - - set month(int value) { - return _objc_msgSend_635(this.pointer, _sel_setMonth_, value); - } - - int get day { - return _objc_msgSend_83(this.pointer, _sel_day); - } - - set day(int value) { - return _objc_msgSend_635(this.pointer, _sel_setDay_, value); - } - - int get hour { - return _objc_msgSend_83(this.pointer, _sel_hour); - } - - set hour(int value) { - return _objc_msgSend_635(this.pointer, _sel_setHour_, value); + : NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - int get minute { - return _objc_msgSend_83(this.pointer, _sel_minute); - } - - set minute(int value) { - return _objc_msgSend_635(this.pointer, _sel_setMinute_, value); + NSURLRequest? get currentRequest { + final _ret = _objc_msgSend_343(this.pointer, _sel_currentRequest); + return _ret.address == 0 + ? null + : NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - int get second { - return _objc_msgSend_83(this.pointer, _sel_second); + NSURLResponse? get response { + final _ret = _objc_msgSend_346(this.pointer, _sel_response); + return _ret.address == 0 + ? null + : NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - set second(int value) { - return _objc_msgSend_635(this.pointer, _sel_setSecond_, value); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get nanosecond { - return _objc_msgSend_83(this.pointer, _sel_nanosecond); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - set nanosecond(int value) { - return _objc_msgSend_635(this.pointer, _sel_setNanosecond_, value); + objc.NSProgress get progress { + final _ret = _objc_msgSend_347(this.pointer, _sel_progress); + return objc.NSProgress.castFromPointer(_ret, retain: true, release: true); } - int get weekday { - return _objc_msgSend_83(this.pointer, _sel_weekday); + objc.NSDate? get earliestBeginDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_earliestBeginDate); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - set weekday(int value) { - return _objc_msgSend_635(this.pointer, _sel_setWeekday_, value); + set earliestBeginDate(objc.NSDate? value) { + return _objc_msgSend_162(this.pointer, _sel_setEarliestBeginDate_, + value?.pointer ?? ffi.nullptr); } - int get weekdayOrdinal { - return _objc_msgSend_83(this.pointer, _sel_weekdayOrdinal); + int get countOfBytesClientExpectsToSend { + return _objc_msgSend_348( + this.pointer, _sel_countOfBytesClientExpectsToSend); } - set weekdayOrdinal(int value) { - return _objc_msgSend_635(this.pointer, _sel_setWeekdayOrdinal_, value); + set countOfBytesClientExpectsToSend(int value) { + return _objc_msgSend_349( + this.pointer, _sel_setCountOfBytesClientExpectsToSend_, value); } - int get quarter { - return _objc_msgSend_83(this.pointer, _sel_quarter); + int get countOfBytesClientExpectsToReceive { + return _objc_msgSend_348( + this.pointer, _sel_countOfBytesClientExpectsToReceive); } - set quarter(int value) { - return _objc_msgSend_635(this.pointer, _sel_setQuarter_, value); + set countOfBytesClientExpectsToReceive(int value) { + return _objc_msgSend_349( + this.pointer, _sel_setCountOfBytesClientExpectsToReceive_, value); } - int get weekOfMonth { - return _objc_msgSend_83(this.pointer, _sel_weekOfMonth); + int get countOfBytesSent { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesSent); } - set weekOfMonth(int value) { - return _objc_msgSend_635(this.pointer, _sel_setWeekOfMonth_, value); + int get countOfBytesReceived { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesReceived); } - int get weekOfYear { - return _objc_msgSend_83(this.pointer, _sel_weekOfYear); + int get countOfBytesExpectedToSend { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesExpectedToSend); } - set weekOfYear(int value) { - return _objc_msgSend_635(this.pointer, _sel_setWeekOfYear_, value); + int get countOfBytesExpectedToReceive { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesExpectedToReceive); } - int get yearForWeekOfYear { - return _objc_msgSend_83(this.pointer, _sel_yearForWeekOfYear); + objc.NSString? get taskDescription { + final _ret = _objc_msgSend_13(this.pointer, _sel_taskDescription); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set yearForWeekOfYear(int value) { - return _objc_msgSend_635(this.pointer, _sel_setYearForWeekOfYear_, value); + set taskDescription(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setTaskDescription_, value?.pointer ?? ffi.nullptr); } - bool get leapMonth { - return _objc_msgSend_12(this.pointer, _sel_isLeapMonth); + void cancel() { + _objc_msgSend_82(this.pointer, _sel_cancel); } - set leapMonth(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setLeapMonth_, value); + int get state { + return _objc_msgSend_350(this.pointer, _sel_state); } - NSDate? get date { - final _ret = _objc_msgSend_183(this.pointer, _sel_date); + objc.NSError? get error { + final _ret = _objc_msgSend_328(this.pointer, _sel_error); return _ret.address == 0 ? null - : NSDate._(_ret, retain: true, release: true); + : objc.NSError.castFromPointer(_ret, retain: true, release: true); } - int week() { - return _objc_msgSend_83(this.pointer, _sel_week); + void suspend() { + _objc_msgSend_82(this.pointer, _sel_suspend); } - void setWeek_(int v) { - _objc_msgSend_423(this.pointer, _sel_setWeek_, v); + void resume() { + _objc_msgSend_82(this.pointer, _sel_resume); } - void setValue_forComponent_(int value, int unit) { - _objc_msgSend_775(this.pointer, _sel_setValue_forComponent_, value, unit); + double get priority { + return objc.useMsgSendVariants + ? _objc_msgSend_351Fpret(this.pointer, _sel_priority) + : _objc_msgSend_351(this.pointer, _sel_priority); } - int valueForComponent_(int unit) { - return _objc_msgSend_776(this.pointer, _sel_valueForComponent_, unit); + set priority(double value) { + return _objc_msgSend_352(this.pointer, _sel_setPriority_, value); } - bool get validDate { - return _objc_msgSend_12(this.pointer, _sel_isValidDate); + bool get prefersIncrementalDelivery { + return _objc_msgSend_7(this.pointer, _sel_prefersIncrementalDelivery); } - bool isValidDateInCalendar_(NSCalendar calendar) { - return _objc_msgSend_777( - this.pointer, _sel_isValidDateInCalendar_, calendar.pointer); + set prefersIncrementalDelivery(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setPrefersIncrementalDelivery_, value); } @override - NSDateComponents init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSDateComponents._(_ret, retain: true, release: true); + NSURLSessionTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); } - static NSDateComponents new1() { - final _ret = _objc_msgSend_2(_class_NSDateComponents, _sel_new); - return NSDateComponents._(_ret, retain: false, release: true); + static NSURLSessionTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionTask, _sel_new); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } - static NSDateComponents allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSURLSessionTask allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSDateComponents, _sel_allocWithZone_, zone); - return NSDateComponents._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSURLSessionTask, _sel_allocWithZone_, zone); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } - static NSDateComponents alloc() { - final _ret = _objc_msgSend_2(_class_NSDateComponents, _sel_alloc); - return NSDateComponents._(_ret, retain: false, release: true); + static NSURLSessionTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionTask, _sel_alloc); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSDateComponents, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSDateComponents, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSDateComponents, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLSessionTask, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSDateComponents, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSURLSessionTask, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSDateComponents, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionTask, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSDateComponents, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSDateComponents, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSDateComponents, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSDateComponents, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLSessionTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSDateComponents = objc.getClass("NSDateComponents"); -late final _sel_calendar = objc.registerName("calendar"); -final _objc_msgSend_771 = 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_772 = 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_773 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_774 = 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:"); -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_week = objc.registerName("week"); -late final _sel_setWeek_ = objc.registerName("setWeek:"); -late final _sel_setValue_forComponent_ = - objc.registerName("setValue:forComponent:"); -final _objc_msgSend_775 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Long, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int, int)>(); -late final _sel_valueForComponent_ = objc.registerName("valueForComponent:"); -final _objc_msgSend_776 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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_777 = 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_778 = 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_779 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - -abstract class NSCalendarOptions { - static const int NSCalendarWrapComponents = 1; - static const int NSCalendarMatchStrictly = 2; - static const int NSCalendarSearchBackwards = 4; - static const int NSCalendarMatchPreviousTimePreservingSmallerUnits = 256; - static const int NSCalendarMatchNextTimePreservingSmallerUnits = 512; - static const int NSCalendarMatchNextTime = 1024; - static const int NSCalendarMatchFirst = 4096; - static const int NSCalendarMatchLast = 8192; -} - -late final _sel_dateByAddingComponents_toDate_options_ = - objc.registerName("dateByAddingComponents:toDate:options:"); -final _objc_msgSend_780 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .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_781 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .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_782 = 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_783 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_784 = 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:"); -final _objc_msgSend_785 = 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_compareDate_toDate_toUnitGranularity_ = - objc.registerName("compareDate:toDate:toUnitGranularity:"); -final _objc_msgSend_786 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .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_787 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_isDate_inSameDayAsDate_ = - objc.registerName("isDate:inSameDayAsDate:"); -final _objc_msgSend_788 = 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_789 = 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_790 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Int32, - 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_791 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .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_792 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Long, - ffi.Pointer, - ffi.Int32)>>() - .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); -final _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry = , bool, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( - void Function(ffi.Pointer, bool, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); +late final _class_NSURLSessionTask = objc.getClass("NSURLSessionTask"); +late final _sel_taskIdentifier = objc.registerName("taskIdentifier"); -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); +class NSURLRequest extends objc.NSObject { + NSURLRequest._(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_NSDate_bool_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSDate_bool_bool._(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); } - /// 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.newBlock( - _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 NSURLRequest requestWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_320( + _class_NSURLRequest, _sel_requestWithURL_, URL.pointer); + return NSURLRequest.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. - ObjCBlock_ffiVoid_NSDate_bool_bool.fromFunction( - void Function(NSDate?, bool, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSDate._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.Pointer? _dartFuncTrampoline; + static bool getSupportsSecureCoding() { + return _objc_msgSend_7(_class_NSURLRequest, _sel_supportsSecureCoding); + } - /// 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_NSDate_bool_bool.listener( - void Function(NSDate?, bool, ffi.Pointer) fn) - : this._(objc.newBlock( - (_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(), - _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSDate._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + _class_NSURLRequest, + _sel_requestWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } - void call(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); + NSURLRequest initWithURL_(objc.NSURL URL) { + final _ret = + _objc_msgSend_320(this.pointer, _sel_initWithURL_, URL.pointer); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + NSURLRequest initWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + this.pointer, + _sel_initWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + int get cachePolicy { + return _objc_msgSend_322(this.pointer, _sel_cachePolicy); + } + + double get timeoutInterval { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutInterval) + : _objc_msgSend_115(this.pointer, _sel_timeoutInterval); + } + + objc.NSURL? get mainDocumentURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_mainDocumentURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + int get networkServiceType { + return _objc_msgSend_323(this.pointer, _sel_networkServiceType); + } + + bool get allowsCellularAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsCellularAccess); + } + + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsExpensiveNetworkAccess); + } + + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsConstrainedNetworkAccess); + } + + bool get assumesHTTP3Capable { + return _objc_msgSend_7(this.pointer, _sel_assumesHTTP3Capable); + } + + int get attribution { + return _objc_msgSend_324(this.pointer, _sel_attribution); + } + + bool get requiresDNSSECValidation { + return _objc_msgSend_7(this.pointer, _sel_requiresDNSSECValidation); + } + + objc.NSString? get HTTPMethod { + final _ret = _objc_msgSend_13(this.pointer, _sel_HTTPMethod); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSDictionary? get allHTTPHeaderFields { + final _ret = _objc_msgSend_65(this.pointer, _sel_allHTTPHeaderFields); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString? valueForHTTPHeaderField_(objc.NSString field) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_valueForHTTPHeaderField_, field.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSData? get HTTPBody { + final _ret = _objc_msgSend_325(this.pointer, _sel_HTTPBody); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSInputStream? get HTTPBodyStream { + final _ret = _objc_msgSend_342(this.pointer, _sel_HTTPBodyStream); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); + } + + bool get HTTPShouldHandleCookies { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldHandleCookies); + } + + bool get HTTPShouldUsePipelining { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldUsePipelining); + } + + @override + NSURLRequest init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + static NSURLRequest new1() { + final _ret = _objc_msgSend_40(_class_NSURLRequest, _sel_new); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLRequest, _sel_allocWithZone_, zone); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLRequest alloc() { + final _ret = _objc_msgSend_40(_class_NSURLRequest, _sel_alloc); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLRequest, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLRequest, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLRequest, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLRequest, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLRequest, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLRequest, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLRequest, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } } -late final _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_ = - objc.registerName( - "enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:"); -final _objc_msgSend_793 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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:"); -final _objc_msgSend_794 = objc.msgSendPointer +late final _class_NSURLRequest = objc.getClass("NSURLRequest"); +late final _sel_requestWithURL_ = objc.registerName("requestWithURL:"); +final _objc_msgSend_320 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() + ffi.Pointer)>>() .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_795 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_supportsSecureCoding = + objc.registerName("supportsSecureCoding"); + +abstract class NSURLRequestCachePolicy { + static const int NSURLRequestUseProtocolCachePolicy = 0; + static const int NSURLRequestReloadIgnoringLocalCacheData = 1; + static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; + static const int NSURLRequestReloadIgnoringCacheData = 1; + static const int NSURLRequestReturnCacheDataElseLoad = 2; + static const int NSURLRequestReturnCacheDataDontLoad = 3; + static const int NSURLRequestReloadRevalidatingCacheData = 5; +} + +late final _sel_requestWithURL_cachePolicy_timeoutInterval_ = + objc.registerName("requestWithURL:cachePolicy:timeoutInterval:"); +final _objc_msgSend_321 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32, - ffi.Long, - ffi.Int32)>>() - .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_796 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Int32)>>() + ffi.Double)>>() .asFunction< - ffi.Pointer Function( + instancetype 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_797 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Pointer, - ffi.Int32)>>() - .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_798 = 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)>(); -final _objc_msgSend_799 = 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_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_800 = objc.msgSendPointer + 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_322 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() .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_801 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_timeoutInterval = objc.registerName("timeoutInterval"); +late final _sel_mainDocumentURL = objc.registerName("mainDocumentURL"); + +abstract class NSURLRequestNetworkServiceType { + static const int NSURLNetworkServiceTypeDefault = 0; + static const int NSURLNetworkServiceTypeVoIP = 1; + static const int NSURLNetworkServiceTypeVideo = 2; + static const int NSURLNetworkServiceTypeBackground = 3; + static const int NSURLNetworkServiceTypeVoice = 4; + static const int NSURLNetworkServiceTypeResponsiveData = 6; + static const int NSURLNetworkServiceTypeAVStreaming = 8; + static const int NSURLNetworkServiceTypeResponsiveAV = 9; + static const int NSURLNetworkServiceTypeCallSignaling = 11; +} + +late final _sel_networkServiceType = objc.registerName("networkServiceType"); +final _objc_msgSend_323 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() .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:"); -late final _sel_allowsNaturalLanguage = - objc.registerName("allowsNaturalLanguage"); + 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"); + +abstract class NSURLRequestAttribution { + static const int NSURLRequestAttributionDeveloper = 0; + static const int NSURLRequestAttributionUser = 1; +} -class NSNumberFormatter extends NSFormatter { - NSNumberFormatter._(ffi.Pointer pointer, +late final _sel_attribution = objc.registerName("attribution"); +final _objc_msgSend_324 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 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_325 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + +class NSInputStream extends NSStream { + NSInputStream._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSNumberFormatter] that points to the same underlying object as [other]. - static NSNumberFormatter castFrom(T other) { - return NSNumberFormatter._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSInputStream] that points to the same underlying object as [other]. + NSInputStream.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSNumberFormatter] that wraps the given raw object pointer. - static NSNumberFormatter castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNumberFormatter._(other, retain: retain, release: release); - } + /// Constructs a [NSInputStream] that wraps the given raw object pointer. + NSInputStream.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSNumberFormatter]. + /// Returns whether [obj] is an instance of [NSInputStream]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSNumberFormatter); + obj.pointer, _sel_isKindOfClass_, _class_NSInputStream); } - int get formattingContext { - return _objc_msgSend_752(this.pointer, _sel_formattingContext); + int read_maxLength_(ffi.Pointer buffer, int len) { + return _objc_msgSend_329(this.pointer, _sel_read_maxLength_, buffer, len); } - set formattingContext(int value) { - return _objc_msgSend_753(this.pointer, _sel_setFormattingContext_, value); + bool getBuffer_length_(ffi.Pointer> buffer, + ffi.Pointer len) { + return _objc_msgSend_339(this.pointer, _sel_getBuffer_length_, buffer, len); } - bool getObjectValue_forString_range_error_( - ffi.Pointer> obj, - NSString string, - ffi.Pointer<_NSRange> rangep, - ffi.Pointer> error) { - return _objc_msgSend_754( - this.pointer, - _sel_getObjectValue_forString_range_error_, - obj, - string.pointer, - rangep, - error); + bool get hasBytesAvailable { + return _objc_msgSend_7(this.pointer, _sel_hasBytesAvailable); } - NSString? stringFromNumber_(NSNumber number) { + NSInputStream initWithData_(objc.NSData data) { final _ret = - _objc_msgSend_802(this.pointer, _sel_stringFromNumber_, number.pointer); + _objc_msgSend_340(this.pointer, _sel_initWithData_, data.pointer); + return NSInputStream.castFromPointer(_ret, retain: true, release: true); + } + + NSInputStream? initWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_3(this.pointer, _sel_initWithURL_, url.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - NSNumber? numberFromString_(NSString string) { + NSInputStream? initWithFileAtPath_(objc.NSString path) { final _ret = - _objc_msgSend_803(this.pointer, _sel_numberFromString_, string.pointer); + _objc_msgSend_2(this.pointer, _sel_initWithFileAtPath_, path.pointer); return _ret.address == 0 ? null - : NSNumber._(_ret, retain: true, release: true); + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - static NSString localizedStringFromNumber_numberStyle_( - NSNumber num, int nstyle) { - final _ret = _objc_msgSend_804(_class_NSNumberFormatter, - _sel_localizedStringFromNumber_numberStyle_, num.pointer, nstyle); - return NSString._(_ret, retain: true, release: true); + static NSInputStream? inputStreamWithData_(objc.NSData data) { + final _ret = _objc_msgSend_341( + _class_NSInputStream, _sel_inputStreamWithData_, data.pointer); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - static int defaultFormatterBehavior() { - return _objc_msgSend_805( - _class_NSNumberFormatter, _sel_defaultFormatterBehavior); + static NSInputStream? inputStreamWithFileAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSInputStream, _sel_inputStreamWithFileAtPath_, path.pointer); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - static void setDefaultFormatterBehavior_(int behavior) { - _objc_msgSend_806( - _class_NSNumberFormatter, _sel_setDefaultFormatterBehavior_, behavior); + static NSInputStream? inputStreamWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_3( + _class_NSInputStream, _sel_inputStreamWithURL_, url.pointer); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - int get numberStyle { - return _objc_msgSend_807(this.pointer, _sel_numberStyle); + static void getStreamsToHostWithName_port_inputStream_outputStream_( + objc.NSString hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_333( + _class_NSInputStream, + _sel_getStreamsToHostWithName_port_inputStream_outputStream_, + hostname.pointer, + port, + inputStream, + outputStream); } - set numberStyle(int value) { - return _objc_msgSend_808(this.pointer, _sel_setNumberStyle_, value); + static void getStreamsToHost_port_inputStream_outputStream_( + NSHost host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_337( + _class_NSInputStream, + _sel_getStreamsToHost_port_inputStream_outputStream_, + host.pointer, + port, + inputStream, + outputStream); } - NSLocale get locale { - final _ret = _objc_msgSend_197(this.pointer, _sel_locale); - return NSLocale._(_ret, retain: true, release: true); + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_338( + _class_NSInputStream, + _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, + bufferSize, + inputStream, + outputStream); } - set locale(NSLocale value) { - return _objc_msgSend_762(this.pointer, _sel_setLocale_, value.pointer); + @override + NSInputStream init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSInputStream.castFromPointer(_ret, retain: true, release: true); } - bool get generatesDecimalNumbers { - return _objc_msgSend_12(this.pointer, _sel_generatesDecimalNumbers); + static NSInputStream new1() { + final _ret = _objc_msgSend_40(_class_NSInputStream, _sel_new); + return NSInputStream.castFromPointer(_ret, retain: false, release: true); } - set generatesDecimalNumbers(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setGeneratesDecimalNumbers_, value); + static NSInputStream allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSInputStream, _sel_allocWithZone_, zone); + return NSInputStream.castFromPointer(_ret, retain: false, release: true); } - int get formatterBehavior { - return _objc_msgSend_805(this.pointer, _sel_formatterBehavior); + static NSInputStream alloc() { + final _ret = _objc_msgSend_40(_class_NSInputStream, _sel_alloc); + return NSInputStream.castFromPointer(_ret, retain: false, release: true); } - set formatterBehavior(int value) { - return _objc_msgSend_809(this.pointer, _sel_setFormatterBehavior_, value); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSInputStream, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSString get negativeFormat { - final _ret = _objc_msgSend_21(this.pointer, _sel_negativeFormat); - return NSString._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSInputStream, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set negativeFormat(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setNegativeFormat_, value.pointer); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSInputStream, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSInputStream, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSInputStream, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSInputStream, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSInputStream, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSInputStream, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSInputStream, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSInputStream = objc.getClass("NSInputStream"); + +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); + } + + void open() { + _objc_msgSend_82(this.pointer, _sel_open); + } + + void close() { + _objc_msgSend_82(this.pointer, _sel_close); + } + + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get textAttributesForNegativeValues { + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); + } + + objc.NSObject? propertyForKey_(objc.NSString key) { final _ret = - _objc_msgSend_390(this.pointer, _sel_textAttributesForNegativeValues); + _objc_msgSend_2(this.pointer, _sel_propertyForKey_, key.pointer); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set textAttributesForNegativeValues(NSDictionary? value) { - return _objc_msgSend_634( - this.pointer, - _sel_setTextAttributesForNegativeValues_, - value?.pointer ?? ffi.nullptr); + bool setProperty_forKey_(objc.NSObject? property, objc.NSString key) { + return _objc_msgSend_326(this.pointer, _sel_setProperty_forKey_, + property?.pointer ?? ffi.nullptr, key.pointer); + } + + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - NSString get positiveFormat { - final _ret = _objc_msgSend_21(this.pointer, _sel_positiveFormat); - return NSString._(_ret, retain: true, release: true); + void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_removeFromRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - set positiveFormat(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setPositiveFormat_, value.pointer); + int get streamStatus { + return _objc_msgSend_327(this.pointer, _sel_streamStatus); + } + + objc.NSError? get streamError { + final _ret = _objc_msgSend_328(this.pointer, _sel_streamError); + return _ret.address == 0 + ? null + : objc.NSError.castFromPointer(_ret, retain: true, release: true); + } + + static void getStreamsToHostWithName_port_inputStream_outputStream_( + objc.NSString hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_333( + _class_NSStream, + _sel_getStreamsToHostWithName_port_inputStream_outputStream_, + hostname.pointer, + port, + inputStream, + outputStream); + } + + static void getStreamsToHost_port_inputStream_outputStream_( + NSHost host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_337( + _class_NSStream, + _sel_getStreamsToHost_port_inputStream_outputStream_, + host.pointer, + port, + inputStream, + outputStream); + } + + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_338( + _class_NSStream, + _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, + bufferSize, + inputStream, + outputStream); + } + + @override + NSStream init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSStream.castFromPointer(_ret, retain: true, release: true); + } + + static NSStream new1() { + final _ret = _objc_msgSend_40(_class_NSStream, _sel_new); + return NSStream.castFromPointer(_ret, retain: false, release: true); + } + + static NSStream allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSStream, _sel_allocWithZone_, zone); + return NSStream.castFromPointer(_ret, retain: false, release: true); + } + + static NSStream alloc() { + final _ret = _objc_msgSend_40(_class_NSStream, _sel_alloc); + return NSStream.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSStream, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSStream, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSStream, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSStream, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSStream, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSStream, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSStream, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSStream, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get textAttributesForPositiveValues { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_390(this.pointer, _sel_textAttributesForPositiveValues); + _objc_msgSend_40(_class_NSStream, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSStream = objc.getClass("NSStream"); +late final _sel_open = objc.registerName("open"); +late final _sel_close = objc.registerName("close"); +late final _sel_propertyForKey_ = objc.registerName("propertyForKey:"); +late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); +final _objc_msgSend_326 = 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)>(); + +abstract class NSStreamStatus { + static const int NSStreamStatusNotOpen = 0; + static const int NSStreamStatusOpening = 1; + static const int NSStreamStatusOpen = 2; + static const int NSStreamStatusReading = 3; + static const int NSStreamStatusWriting = 4; + static const int NSStreamStatusAtEnd = 5; + static const int NSStreamStatusClosed = 6; + static const int NSStreamStatusError = 7; +} + +late final _sel_streamStatus = objc.registerName("streamStatus"); +final _objc_msgSend_327 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_streamError = objc.registerName("streamError"); +final _objc_msgSend_328 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + +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); + } + + int write_maxLength_(ffi.Pointer buffer, int len) { + return _objc_msgSend_329(this.pointer, _sel_write_maxLength_, buffer, len); + } + + bool get hasSpaceAvailable { + return _objc_msgSend_7(this.pointer, _sel_hasSpaceAvailable); + } + + NSOutputStream initToMemory() { + final _ret = _objc_msgSend_40(this.pointer, _sel_initToMemory); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); + } + + NSOutputStream initToBuffer_capacity_( + ffi.Pointer buffer, int capacity) { + final _ret = _objc_msgSend_330( + this.pointer, _sel_initToBuffer_capacity_, buffer, capacity); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); + } + + NSOutputStream? initWithURL_append_(objc.NSURL url, bool shouldAppend) { + final _ret = _objc_msgSend_331( + this.pointer, _sel_initWithURL_append_, url.pointer, shouldAppend); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - set textAttributesForPositiveValues(NSDictionary? value) { - return _objc_msgSend_634( - this.pointer, - _sel_setTextAttributesForPositiveValues_, - value?.pointer ?? ffi.nullptr); + NSOutputStream? initToFileAtPath_append_( + objc.NSString path, bool shouldAppend) { + final _ret = _objc_msgSend_332(this.pointer, _sel_initToFileAtPath_append_, + path.pointer, shouldAppend); + return _ret.address == 0 + ? null + : NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - bool get allowsFloats { - return _objc_msgSend_12(this.pointer, _sel_allowsFloats); + static NSOutputStream outputStreamToMemory() { + final _ret = + _objc_msgSend_40(_class_NSOutputStream, _sel_outputStreamToMemory); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - set allowsFloats(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setAllowsFloats_, value); + static NSOutputStream outputStreamToBuffer_capacity_( + ffi.Pointer buffer, int capacity) { + final _ret = _objc_msgSend_330(_class_NSOutputStream, + _sel_outputStreamToBuffer_capacity_, buffer, capacity); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - NSString get decimalSeparator { - final _ret = _objc_msgSend_21(this.pointer, _sel_decimalSeparator); - return NSString._(_ret, retain: true, release: true); + static NSOutputStream outputStreamToFileAtPath_append_( + objc.NSString path, bool shouldAppend) { + final _ret = _objc_msgSend_164(_class_NSOutputStream, + _sel_outputStreamToFileAtPath_append_, path.pointer, shouldAppend); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - set decimalSeparator(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setDecimalSeparator_, value.pointer); + static NSOutputStream? outputStreamWithURL_append_( + objc.NSURL url, bool shouldAppend) { + final _ret = _objc_msgSend_331(_class_NSOutputStream, + _sel_outputStreamWithURL_append_, url.pointer, shouldAppend); + return _ret.address == 0 + ? null + : NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - bool get alwaysShowsDecimalSeparator { - return _objc_msgSend_12(this.pointer, _sel_alwaysShowsDecimalSeparator); + static void getStreamsToHostWithName_port_inputStream_outputStream_( + objc.NSString hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_333( + _class_NSOutputStream, + _sel_getStreamsToHostWithName_port_inputStream_outputStream_, + hostname.pointer, + port, + inputStream, + outputStream); } - set alwaysShowsDecimalSeparator(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAlwaysShowsDecimalSeparator_, value); + static void getStreamsToHost_port_inputStream_outputStream_( + NSHost host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_337( + _class_NSOutputStream, + _sel_getStreamsToHost_port_inputStream_outputStream_, + host.pointer, + port, + inputStream, + outputStream); } - NSString get currencyDecimalSeparator { - final _ret = _objc_msgSend_21(this.pointer, _sel_currencyDecimalSeparator); - return NSString._(_ret, retain: true, release: true); + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_338( + _class_NSOutputStream, + _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, + bufferSize, + inputStream, + outputStream); } - set currencyDecimalSeparator(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setCurrencyDecimalSeparator_, value.pointer); + @override + NSOutputStream init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - bool get usesGroupingSeparator { - return _objc_msgSend_12(this.pointer, _sel_usesGroupingSeparator); + static NSOutputStream new1() { + final _ret = _objc_msgSend_40(_class_NSOutputStream, _sel_new); + return NSOutputStream.castFromPointer(_ret, retain: false, release: true); } - set usesGroupingSeparator(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setUsesGroupingSeparator_, value); + static NSOutputStream allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSOutputStream, _sel_allocWithZone_, zone); + return NSOutputStream.castFromPointer(_ret, retain: false, release: true); + } + + static NSOutputStream alloc() { + final _ret = _objc_msgSend_40(_class_NSOutputStream, _sel_alloc); + return NSOutputStream.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOutputStream, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOutputStream, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSOutputStream, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSOutputStream, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOutputStream, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOutputStream, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSString get groupingSeparator { - final _ret = _objc_msgSend_21(this.pointer, _sel_groupingSeparator); - return NSString._(_ret, retain: true, release: true); - } + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOutputStream, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOutputStream, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSOutputStream, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSOutputStream = objc.getClass("NSOutputStream"); +late final _sel_write_maxLength_ = objc.registerName("write:maxLength:"); +final _objc_msgSend_329 = 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_hasSpaceAvailable = objc.registerName("hasSpaceAvailable"); +late final _sel_initToMemory = objc.registerName("initToMemory"); +late final _sel_initToBuffer_capacity_ = + objc.registerName("initToBuffer:capacity:"); +final _objc_msgSend_330 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_initWithURL_append_ = objc.registerName("initWithURL:append:"); +final _objc_msgSend_331 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initToFileAtPath_append_ = + objc.registerName("initToFileAtPath:append:"); +final _objc_msgSend_332 = 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_333 = 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>)>(); + +class NSHost extends objc.NSObject { + NSHost._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - set groupingSeparator(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setGroupingSeparator_, value.pointer); - } + /// Constructs a [NSHost] that points to the same underlying object as [other]. + NSHost.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSString? get zeroSymbol { - final _ret = _objc_msgSend_44(this.pointer, _sel_zeroSymbol); - return _ret.address == 0 - ? null - : NSString._(_ret, 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); - set zeroSymbol(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setZeroSymbol_, value?.pointer ?? ffi.nullptr); + /// Returns whether [obj] is an instance of [NSHost]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSHost); } - NSDictionary? get textAttributesForZero { - final _ret = _objc_msgSend_390(this.pointer, _sel_textAttributesForZero); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + static NSHost currentHost() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_currentHost); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - set textAttributesForZero(NSDictionary? value) { - return _objc_msgSend_634(this.pointer, _sel_setTextAttributesForZero_, - value?.pointer ?? ffi.nullptr); + static NSHost hostWithName_(objc.NSString? name) { + final _ret = _objc_msgSend_334( + _class_NSHost, _sel_hostWithName_, name?.pointer ?? ffi.nullptr); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - NSString get nilSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_nilSymbol); - return NSString._(_ret, retain: true, release: true); + static NSHost hostWithAddress_(objc.NSString address) { + final _ret = + _objc_msgSend_35(_class_NSHost, _sel_hostWithAddress_, address.pointer); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - set nilSymbol(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setNilSymbol_, value.pointer); + bool isEqualToHost_(NSHost aHost) { + return _objc_msgSend_335(this.pointer, _sel_isEqualToHost_, aHost.pointer); } - NSDictionary? get textAttributesForNil { - final _ret = _objc_msgSend_390(this.pointer, _sel_textAttributesForNil); + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - set textAttributesForNil(NSDictionary? value) { - return _objc_msgSend_634(this.pointer, _sel_setTextAttributesForNil_, - value?.pointer ?? ffi.nullptr); - } - - NSString get notANumberSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_notANumberSymbol); - return NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set notANumberSymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setNotANumberSymbol_, value.pointer); + objc.NSArray get names { + final _ret = _objc_msgSend_6(this.pointer, _sel_names); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get textAttributesForNotANumber { - final _ret = - _objc_msgSend_390(this.pointer, _sel_textAttributesForNotANumber); + objc.NSString? get address { + final _ret = _objc_msgSend_13(this.pointer, _sel_address); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - set textAttributesForNotANumber(NSDictionary? value) { - return _objc_msgSend_634(this.pointer, _sel_setTextAttributesForNotANumber_, - value?.pointer ?? ffi.nullptr); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString get positiveInfinitySymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_positiveInfinitySymbol); - return NSString._(_ret, retain: true, release: true); + objc.NSArray get addresses { + final _ret = _objc_msgSend_6(this.pointer, _sel_addresses); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set positiveInfinitySymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setPositiveInfinitySymbol_, value.pointer); - } - - NSDictionary? get textAttributesForPositiveInfinity { - final _ret = - _objc_msgSend_390(this.pointer, _sel_textAttributesForPositiveInfinity); + objc.NSString? get localizedName { + final _ret = _objc_msgSend_13(this.pointer, _sel_localizedName); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - set textAttributesForPositiveInfinity(NSDictionary? value) { - return _objc_msgSend_634( - this.pointer, - _sel_setTextAttributesForPositiveInfinity_, - value?.pointer ?? ffi.nullptr); - } - - NSString get negativeInfinitySymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_negativeInfinitySymbol); - return NSString._(_ret, retain: true, release: true); - } - - set negativeInfinitySymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setNegativeInfinitySymbol_, value.pointer); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get textAttributesForNegativeInfinity { - final _ret = - _objc_msgSend_390(this.pointer, _sel_textAttributesForNegativeInfinity); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + static void setHostCacheEnabled_(bool flag) { + _objc_msgSend_336(_class_NSHost, _sel_setHostCacheEnabled_, flag); } - set textAttributesForNegativeInfinity(NSDictionary? value) { - return _objc_msgSend_634( - this.pointer, - _sel_setTextAttributesForNegativeInfinity_, - value?.pointer ?? ffi.nullptr); + static bool isHostCacheEnabled() { + return _objc_msgSend_7(_class_NSHost, _sel_isHostCacheEnabled); } - NSString get positivePrefix { - final _ret = _objc_msgSend_21(this.pointer, _sel_positivePrefix); - return NSString._(_ret, retain: true, release: true); + static void flushHostCache() { + _objc_msgSend_82(_class_NSHost, _sel_flushHostCache); } - set positivePrefix(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setPositivePrefix_, value.pointer); + @override + NSHost init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - NSString get positiveSuffix { - final _ret = _objc_msgSend_21(this.pointer, _sel_positiveSuffix); - return NSString._(_ret, retain: true, release: true); + static NSHost new1() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_new); + return NSHost.castFromPointer(_ret, retain: false, release: true); } - set positiveSuffix(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setPositiveSuffix_, value.pointer); + static NSHost allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSHost, _sel_allocWithZone_, zone); + return NSHost.castFromPointer(_ret, retain: false, release: true); } - NSString get negativePrefix { - final _ret = _objc_msgSend_21(this.pointer, _sel_negativePrefix); - return NSString._(_ret, retain: true, release: true); + static NSHost alloc() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_alloc); + return NSHost.castFromPointer(_ret, retain: false, release: true); } - set negativePrefix(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setNegativePrefix_, value.pointer); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSHost, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSString get negativeSuffix { - final _ret = _objc_msgSend_21(this.pointer, _sel_negativeSuffix); - return NSString._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSHost, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set negativeSuffix(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setNegativeSuffix_, value.pointer); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSHost, _sel_accessInstanceVariablesDirectly); } - NSString get currencyCode { - final _ret = _objc_msgSend_21(this.pointer, _sel_currencyCode); - return NSString._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSHost, _sel_useStoredAccessor); } - set currencyCode(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setCurrencyCode_, value.pointer); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSHost, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSString get currencySymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_currencySymbol); - return NSString._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51( + _class_NSHost, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set currencySymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setCurrencySymbol_, value.pointer); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSHost, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSString get internationalCurrencySymbol { + static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = - _objc_msgSend_21(this.pointer, _sel_internationalCurrencySymbol); - return NSString._(_ret, retain: true, release: true); - } - - set internationalCurrencySymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setInternationalCurrencySymbol_, value.pointer); - } - - NSString get percentSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_percentSymbol); - return NSString._(_ret, retain: true, release: true); - } - - set percentSymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setPercentSymbol_, value.pointer); - } - - NSString get perMillSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_perMillSymbol); - return NSString._(_ret, retain: true, release: true); + _objc_msgSend_6(_class_NSHost, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set perMillSymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setPerMillSymbol_, value.pointer); - } - - NSString get minusSign { - final _ret = _objc_msgSend_21(this.pointer, _sel_minusSign); - return NSString._(_ret, retain: true, release: true); - } - - set minusSign(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setMinusSign_, value.pointer); - } - - NSString get plusSign { - final _ret = _objc_msgSend_21(this.pointer, _sel_plusSign); - return NSString._(_ret, retain: true, release: true); - } - - set plusSign(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setPlusSign_, value.pointer); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSString get exponentSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_exponentSymbol); - return NSString._(_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:"); +final _objc_msgSend_334 = 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_335 = 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_336 = 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_337 = 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_338 = 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_read_maxLength_ = objc.registerName("read:maxLength:"); +late final _sel_getBuffer_length_ = objc.registerName("getBuffer:length:"); +final _objc_msgSend_339 = 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_340 = 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_341 = 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:"); +late final _sel_HTTPBodyStream = objc.registerName("HTTPBodyStream"); +final _objc_msgSend_342 = 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_343 = 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"); - set exponentSymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setExponentSymbol_, value.pointer); - } +class NSURLResponse extends objc.NSObject { + NSURLResponse._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - int get groupingSize { - return _objc_msgSend_10(this.pointer, _sel_groupingSize); - } + /// Constructs a [NSURLResponse] that points to the same underlying object as [other]. + NSURLResponse.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - set groupingSize(int value) { - return _objc_msgSend_516(this.pointer, _sel_setGroupingSize_, value); - } + /// 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); - int get secondaryGroupingSize { - return _objc_msgSend_10(this.pointer, _sel_secondaryGroupingSize); + /// Returns whether [obj] is an instance of [NSURLResponse]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLResponse); } - set secondaryGroupingSize(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setSecondaryGroupingSize_, value); + NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( + objc.NSURL URL, + objc.NSString? MIMEType, + int length, + objc.NSString? name) { + final _ret = _objc_msgSend_344( + 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); } - NSNumber? get multiplier { - final _ret = _objc_msgSend_215(this.pointer, _sel_multiplier); + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); return _ret.address == 0 ? null - : NSNumber._(_ret, retain: true, release: true); - } - - set multiplier(NSNumber? value) { - return _objc_msgSend_670( - this.pointer, _sel_setMultiplier_, value?.pointer ?? ffi.nullptr); - } - - int get formatWidth { - return _objc_msgSend_10(this.pointer, _sel_formatWidth); - } - - set formatWidth(int value) { - return _objc_msgSend_516(this.pointer, _sel_setFormatWidth_, value); - } - - NSString get paddingCharacter { - final _ret = _objc_msgSend_21(this.pointer, _sel_paddingCharacter); - return NSString._(_ret, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - set paddingCharacter(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setPaddingCharacter_, value.pointer); - } - - int get paddingPosition { - return _objc_msgSend_810(this.pointer, _sel_paddingPosition); - } - - set paddingPosition(int value) { - return _objc_msgSend_811(this.pointer, _sel_setPaddingPosition_, value); - } - - int get roundingMode { - return _objc_msgSend_812(this.pointer, _sel_roundingMode); - } - - set roundingMode(int value) { - return _objc_msgSend_813(this.pointer, _sel_setRoundingMode_, value); + objc.NSString? get MIMEType { + final _ret = _objc_msgSend_13(this.pointer, _sel_MIMEType); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSNumber get roundingIncrement { - final _ret = _objc_msgSend_814(this.pointer, _sel_roundingIncrement); - return NSNumber._(_ret, retain: true, release: true); + int get expectedContentLength { + return _objc_msgSend_345(this.pointer, _sel_expectedContentLength); } - set roundingIncrement(NSNumber value) { - return _objc_msgSend_815( - this.pointer, _sel_setRoundingIncrement_, value.pointer); + objc.NSString? get textEncodingName { + final _ret = _objc_msgSend_13(this.pointer, _sel_textEncodingName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get minimumIntegerDigits { - return _objc_msgSend_10(this.pointer, _sel_minimumIntegerDigits); + objc.NSString? get suggestedFilename { + final _ret = _objc_msgSend_13(this.pointer, _sel_suggestedFilename); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set minimumIntegerDigits(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setMinimumIntegerDigits_, value); + @override + NSURLResponse init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - int get maximumIntegerDigits { - return _objc_msgSend_10(this.pointer, _sel_maximumIntegerDigits); + static NSURLResponse new1() { + final _ret = _objc_msgSend_40(_class_NSURLResponse, _sel_new); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - set maximumIntegerDigits(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setMaximumIntegerDigits_, value); + static NSURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLResponse, _sel_allocWithZone_, zone); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - int get minimumFractionDigits { - return _objc_msgSend_10(this.pointer, _sel_minimumFractionDigits); + static NSURLResponse alloc() { + final _ret = _objc_msgSend_40(_class_NSURLResponse, _sel_alloc); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - set minimumFractionDigits(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setMinimumFractionDigits_, value); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - int get maximumFractionDigits { - return _objc_msgSend_10(this.pointer, _sel_maximumFractionDigits); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set maximumFractionDigits(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setMaximumFractionDigits_, value); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLResponse, _sel_accessInstanceVariablesDirectly); } - NSNumber? get minimum { - final _ret = _objc_msgSend_215(this.pointer, _sel_minimum); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLResponse, _sel_useStoredAccessor); } - set minimum(NSNumber? value) { - return _objc_msgSend_670( - this.pointer, _sel_setMinimum_, value?.pointer ?? ffi.nullptr); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLResponse, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSNumber? get maximum { - final _ret = _objc_msgSend_215(this.pointer, _sel_maximum); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLResponse, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set maximum(NSNumber? value) { - return _objc_msgSend_670( - this.pointer, _sel_setMaximum_, value?.pointer ?? ffi.nullptr); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLResponse, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSString get currencyGroupingSeparator { - final _ret = _objc_msgSend_21(this.pointer, _sel_currencyGroupingSeparator); - return NSString._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLResponse, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set currencyGroupingSeparator(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setCurrencyGroupingSeparator_, value.pointer); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLResponse, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - bool get lenient { - return _objc_msgSend_12(this.pointer, _sel_isLenient); - } +late final _class_NSURLResponse = objc.getClass("NSURLResponse"); +late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_ = + objc.registerName( + "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); +final _objc_msgSend_344 = 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_345 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_textEncodingName = objc.registerName("textEncodingName"); +late final _sel_suggestedFilename = objc.registerName("suggestedFilename"); +late final _sel_response = objc.registerName("response"); +final _objc_msgSend_346 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_progress = objc.registerName("progress"); +final _objc_msgSend_347 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .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"); +final _objc_msgSend_348 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int64 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCountOfBytesClientExpectsToSend_ = + objc.registerName("setCountOfBytesClientExpectsToSend:"); +final _objc_msgSend_349 = 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_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:"); +late final _sel_cancel = objc.registerName("cancel"); - set lenient(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setLenient_, value); - } +abstract class NSURLSessionTaskState { + static const int NSURLSessionTaskStateRunning = 0; + static const int NSURLSessionTaskStateSuspended = 1; + static const int NSURLSessionTaskStateCanceling = 2; + static const int NSURLSessionTaskStateCompleted = 3; +} - bool get usesSignificantDigits { - return _objc_msgSend_12(this.pointer, _sel_usesSignificantDigits); - } +late final _sel_state = objc.registerName("state"); +final _objc_msgSend_350 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 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_resume = objc.registerName("resume"); +late final _sel_priority = objc.registerName("priority"); +final _objc_msgSend_351 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_351Fpret = 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_352 = 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:"); +late final _sel_storeCookies_forTask_ = + objc.registerName("storeCookies:forTask:"); +final _objc_msgSend_353 = 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); +final _ObjCBlock_ffiVoid_NSArray_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSArray_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSArray_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - set usesSignificantDigits(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setUsesSignificantDigits_, value); - } +void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSArray_closureRegistry[block.ref.target.address]!(arg0); - int get minimumSignificantDigits { - return _objc_msgSend_10(this.pointer, _sel_minimumSignificantDigits); - } +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); - set minimumSignificantDigits(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setMinimumSignificantDigits_, value); + /// 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); } - int get maximumSignificantDigits { - return _objc_msgSend_10(this.pointer, _sel_maximumSignificantDigits); - } + /// 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.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - set maximumSignificantDigits(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setMaximumSignificantDigits_, 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. + ObjCBlock_ffiVoid_NSArray.fromFunction(void Function(objc.NSArray?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSArray.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - bool get partialStringValidationEnabled { - return _objc_msgSend_12( - this.pointer, _sel_isPartialStringValidationEnabled); - } + /// 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._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSArray.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - set partialStringValidationEnabled(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setPartialStringValidationEnabled_, value); - } + 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); +} - bool get hasThousandSeparators { - return _objc_msgSend_12(this.pointer, _sel_hasThousandSeparators); - } +late final _sel_getCookiesForTask_completionHandler_ = + objc.registerName("getCookiesForTask:completionHandler:"); +final _objc_msgSend_354 = 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)>(); - set hasThousandSeparators(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setHasThousandSeparators_, value); - } +class NSIndexPath extends objc.NSObject { + NSIndexPath._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSString get thousandSeparator { - final _ret = _objc_msgSend_21(this.pointer, _sel_thousandSeparator); - return NSString._(_ret, retain: true, release: true); - } + /// Constructs a [NSIndexPath] that points to the same underlying object as [other]. + NSIndexPath.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - set thousandSeparator(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setThousandSeparator_, value.pointer); - } + /// 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 get localizesFormat { - return _objc_msgSend_12(this.pointer, _sel_localizesFormat); + /// Returns whether [obj] is an instance of [NSIndexPath]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSIndexPath); } - set localizesFormat(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setLocalizesFormat_, value); + static NSIndexPath indexPathWithIndex_(int index) { + final _ret = + _objc_msgSend_355(_class_NSIndexPath, _sel_indexPathWithIndex_, index); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - NSString get format { - final _ret = _objc_msgSend_21(this.pointer, _sel_format); - return NSString._(_ret, retain: true, release: true); + static NSIndexPath indexPathWithIndexes_length_( + ffi.Pointer indexes, int length) { + final _ret = _objc_msgSend_356( + _class_NSIndexPath, _sel_indexPathWithIndexes_length_, indexes, length); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - set format(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setFormat_, value.pointer); + NSIndexPath initWithIndexes_length_( + ffi.Pointer indexes, int length) { + final _ret = _objc_msgSend_356( + this.pointer, _sel_initWithIndexes_length_, indexes, length); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString get attributedStringForZero { - final _ret = _objc_msgSend_735(this.pointer, _sel_attributedStringForZero); - return NSAttributedString._(_ret, retain: true, release: true); + NSIndexPath initWithIndex_(int index) { + final _ret = _objc_msgSend_355(this.pointer, _sel_initWithIndex_, index); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - set attributedStringForZero(NSAttributedString value) { - return _objc_msgSend_816( - this.pointer, _sel_setAttributedStringForZero_, value.pointer); + NSIndexPath indexPathByAddingIndex_(int index) { + final _ret = + _objc_msgSend_357(this.pointer, _sel_indexPathByAddingIndex_, index); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - NSAttributedString get attributedStringForNil { - final _ret = _objc_msgSend_735(this.pointer, _sel_attributedStringForNil); - return NSAttributedString._(_ret, retain: true, release: true); + NSIndexPath indexPathByRemovingLastIndex() { + final _ret = + _objc_msgSend_358(this.pointer, _sel_indexPathByRemovingLastIndex); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - set attributedStringForNil(NSAttributedString value) { - return _objc_msgSend_816( - this.pointer, _sel_setAttributedStringForNil_, value.pointer); + int indexAtPosition_(int position) { + return _objc_msgSend_359(this.pointer, _sel_indexAtPosition_, position); } - NSAttributedString get attributedStringForNotANumber { - final _ret = - _objc_msgSend_735(this.pointer, _sel_attributedStringForNotANumber); - return NSAttributedString._(_ret, retain: true, release: true); + int get length { + return _objc_msgSend_29(this.pointer, _sel_length); } - set attributedStringForNotANumber(NSAttributedString value) { - return _objc_msgSend_816( - this.pointer, _sel_setAttributedStringForNotANumber_, value.pointer); + void getIndexes_range_( + ffi.Pointer indexes, _NSRange positionRange) { + _objc_msgSend_360( + this.pointer, _sel_getIndexes_range_, indexes, positionRange); } - NSDecimalNumberHandler get roundingBehavior { - final _ret = _objc_msgSend_817(this.pointer, _sel_roundingBehavior); - return NSDecimalNumberHandler._(_ret, retain: true, release: true); + int compare_(NSIndexPath otherObject) { + return _objc_msgSend_361(this.pointer, _sel_compare_, otherObject.pointer); } - set roundingBehavior(NSDecimalNumberHandler value) { - return _objc_msgSend_819( - this.pointer, _sel_setRoundingBehavior_, value.pointer); + void getIndexes_(ffi.Pointer indexes) { + _objc_msgSend_362(this.pointer, _sel_getIndexes_, indexes); } @override - NSNumberFormatter init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSNumberFormatter._(_ret, retain: true, release: true); + NSIndexPath init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - static NSNumberFormatter new1() { - final _ret = _objc_msgSend_2(_class_NSNumberFormatter, _sel_new); - return NSNumberFormatter._(_ret, retain: false, release: true); + static NSIndexPath new1() { + final _ret = _objc_msgSend_40(_class_NSIndexPath, _sel_new); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } - static NSNumberFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSIndexPath allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSNumberFormatter, _sel_allocWithZone_, zone); - return NSNumberFormatter._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSIndexPath, _sel_allocWithZone_, zone); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } - static NSNumberFormatter alloc() { - final _ret = _objc_msgSend_2(_class_NSNumberFormatter, _sel_alloc); - return NSNumberFormatter._(_ret, retain: false, release: true); + static NSIndexPath alloc() { + final _ret = _objc_msgSend_40(_class_NSIndexPath, _sel_alloc); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSNumberFormatter, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSIndexPath, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSNumberFormatter, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSIndexPath, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSNumberFormatter, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSIndexPath, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSNumberFormatter, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSIndexPath, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSNumberFormatter, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSIndexPath, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSNumberFormatter, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSIndexPath, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSNumberFormatter, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSIndexPath, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSNumberFormatter, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSIndexPath, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSNumberFormatter, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSIndexPath, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSNumberFormatter = objc.getClass("NSNumberFormatter"); -late final _sel_stringFromNumber_ = objc.registerName("stringFromNumber:"); -final _objc_msgSend_802 = 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_803 = objc.msgSendPointer +late final _class_NSIndexPath = objc.getClass("NSIndexPath"); +late final _sel_indexPathWithIndex_ = objc.registerName("indexPathWithIndex:"); +final _objc_msgSend_355 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSNumberFormatterStyle { - static const int NSNumberFormatterNoStyle = 0; - static const int NSNumberFormatterDecimalStyle = 1; - static const int NSNumberFormatterCurrencyStyle = 2; - static const int NSNumberFormatterPercentStyle = 3; - static const int NSNumberFormatterScientificStyle = 4; - static const int NSNumberFormatterSpellOutStyle = 5; - static const int NSNumberFormatterOrdinalStyle = 6; - static const int NSNumberFormatterCurrencyISOCodeStyle = 8; - static const int NSNumberFormatterCurrencyPluralStyle = 9; - static const int NSNumberFormatterCurrencyAccountingStyle = 10; -} - -late final _sel_localizedStringFromNumber_numberStyle_ = - objc.registerName("localizedStringFromNumber:numberStyle:"); -final _objc_msgSend_804 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_indexPathWithIndexes_length_ = + objc.registerName("indexPathWithIndexes:length:"); +final _objc_msgSend_356 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() + ffi.Pointer, + ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, int)>(); - -abstract class NSNumberFormatterBehavior { - static const int NSNumberFormatterBehaviorDefault = 0; - static const int NSNumberFormatterBehavior10_0 = 1000; - static const int NSNumberFormatterBehavior10_4 = 1040; -} - -final _objc_msgSend_805 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_806 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_numberStyle = objc.registerName("numberStyle"); -final _objc_msgSend_807 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setNumberStyle_ = objc.registerName("setNumberStyle:"); -final _objc_msgSend_808 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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_809 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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:"); -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_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_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_setCurrencyCode_ = objc.registerName("setCurrencyCode:"); -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:"); - -abstract class NSNumberFormatterPadPosition { - static const int NSNumberFormatterPadBeforePrefix = 0; - static const int NSNumberFormatterPadAfterPrefix = 1; - static const int NSNumberFormatterPadBeforeSuffix = 2; - static const int NSNumberFormatterPadAfterSuffix = 3; -} - -late final _sel_paddingPosition = objc.registerName("paddingPosition"); -final _objc_msgSend_810 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setPaddingPosition_ = objc.registerName("setPaddingPosition:"); -final _objc_msgSend_811 = objc.msgSendPointer +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_357 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - void Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int)>(); - -abstract class NSNumberFormatterRoundingMode { - static const int NSNumberFormatterRoundCeiling = 0; - static const int NSNumberFormatterRoundFloor = 1; - static const int NSNumberFormatterRoundDown = 2; - static const int NSNumberFormatterRoundUp = 3; - static const int NSNumberFormatterRoundHalfEven = 4; - static const int NSNumberFormatterRoundHalfDown = 5; - static const int NSNumberFormatterRoundHalfUp = 6; -} - -late final _sel_roundingMode = objc.registerName("roundingMode"); -final _objc_msgSend_812 = objc.msgSendPointer +late final _sel_indexPathByRemovingLastIndex = + objc.registerName("indexPathByRemovingLastIndex"); +final _objc_msgSend_358 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setRoundingMode_ = objc.registerName("setRoundingMode:"); -final _objc_msgSend_813 = objc.msgSendPointer +late final _sel_indexAtPosition_ = objc.registerName("indexAtPosition:"); +final _objc_msgSend_359 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - void Function(ffi.Pointer, + int Function(ffi.Pointer, ffi.Pointer, int)>(); -late final _sel_roundingIncrement = objc.registerName("roundingIncrement"); -final _objc_msgSend_814 = objc.msgSendPointer +late final _sel_getIndexes_range_ = objc.registerName("getIndexes:range:"); +final _objc_msgSend_360 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setRoundingIncrement_ = - objc.registerName("setRoundingIncrement:"); -final _objc_msgSend_815 = objc.msgSendPointer + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_compare_ = objc.registerName("compare:"); +final _objc_msgSend_361 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Int32 Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, + int 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_816 = objc.msgSendPointer +late final _sel_getIndexes_ = objc.registerName("getIndexes:"); +final _objc_msgSend_362 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -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:"); + ffi.Pointer, ffi.Pointer)>(); -class NSDecimalNumberHandler extends NSObject { - NSDecimalNumberHandler._(ffi.Pointer pointer, +class NSInflectionRule extends objc.NSObject { + NSInflectionRule._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSDecimalNumberHandler] that points to the same underlying object as [other]. - static NSDecimalNumberHandler castFrom( - T other) { - return NSDecimalNumberHandler._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSInflectionRule] that points to the same underlying object as [other]. + NSInflectionRule.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSDecimalNumberHandler] that wraps the given raw object pointer. - static NSDecimalNumberHandler castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSDecimalNumberHandler._(other, retain: retain, release: release); - } + /// Constructs a [NSInflectionRule] that wraps the given raw object pointer. + NSInflectionRule.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSDecimalNumberHandler]. + /// Returns whether [obj] is an instance of [NSInflectionRule]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSDecimalNumberHandler); + obj.pointer, _sel_isKindOfClass_, _class_NSInflectionRule); } - static NSDecimalNumberHandler getDefaultDecimalNumberHandler() { - final _ret = _objc_msgSend_817( - _class_NSDecimalNumberHandler, _sel_defaultDecimalNumberHandler); - return NSDecimalNumberHandler._(_ret, retain: true, release: true); + @override + objc.NSObject init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSDecimalNumberHandler - initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( - int roundingMode, - int scale, - bool exact, - bool overflow, - bool underflow, - bool divideByZero) { - final _ret = _objc_msgSend_818( - this.pointer, - _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, - roundingMode, - scale, - exact, - overflow, - underflow, - divideByZero); - return NSDecimalNumberHandler._(_ret, retain: true, release: true); + static NSInflectionRule getAutomaticRule() { + final _ret = _objc_msgSend_363(_class_NSInflectionRule, _sel_automaticRule); + return NSInflectionRule.castFromPointer(_ret, retain: true, release: true); } - static NSDecimalNumberHandler - decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( - int roundingMode, - int scale, - bool exact, - bool overflow, - bool underflow, - bool divideByZero) { - final _ret = _objc_msgSend_818( - _class_NSDecimalNumberHandler, - _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, - roundingMode, - scale, - exact, - overflow, - underflow, - divideByZero); - return NSDecimalNumberHandler._(_ret, retain: true, release: true); + static bool canInflectLanguage_(objc.NSString language) { + return _objc_msgSend_51( + _class_NSInflectionRule, _sel_canInflectLanguage_, language.pointer); } - @override - NSDecimalNumberHandler init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSDecimalNumberHandler._(_ret, retain: true, release: true); + static bool getCanInflectPreferredLocalization() { + return _objc_msgSend_7( + _class_NSInflectionRule, _sel_canInflectPreferredLocalization); } - static NSDecimalNumberHandler new1() { - final _ret = _objc_msgSend_2(_class_NSDecimalNumberHandler, _sel_new); - return NSDecimalNumberHandler._(_ret, retain: false, release: true); + static NSInflectionRule new1() { + final _ret = _objc_msgSend_40(_class_NSInflectionRule, _sel_new); + return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } - static NSDecimalNumberHandler allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSDecimalNumberHandler, _sel_allocWithZone_, zone); - return NSDecimalNumberHandler._(_ret, retain: false, release: true); + static NSInflectionRule allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSInflectionRule, _sel_allocWithZone_, zone); + return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } - static NSDecimalNumberHandler alloc() { - final _ret = _objc_msgSend_2(_class_NSDecimalNumberHandler, _sel_alloc); - return NSDecimalNumberHandler._(_ret, retain: false, release: true); + static NSInflectionRule alloc() { + final _ret = _objc_msgSend_40(_class_NSInflectionRule, _sel_alloc); + return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSDecimalNumberHandler, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSInflectionRule, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSDecimalNumberHandler, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSInflectionRule, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSDecimalNumberHandler, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSInflectionRule, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSDecimalNumberHandler, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSInflectionRule, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSDecimalNumberHandler, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSInflectionRule, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSDecimalNumberHandler, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSInflectionRule, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSDecimalNumberHandler, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSInflectionRule, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSDecimalNumberHandler, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSInflectionRule, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSDecimalNumberHandler, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSInflectionRule, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSDecimalNumberHandler = - objc.getClass("NSDecimalNumberHandler"); -late final _sel_defaultDecimalNumberHandler = - objc.registerName("defaultDecimalNumberHandler"); -final _objc_msgSend_817 = objc.msgSendPointer +late final _class_NSInflectionRule = objc.getClass("NSInflectionRule"); +late final _sel_automaticRule = objc.registerName("automaticRule"); +final _objc_msgSend_363 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -40159,1239 +16554,1465 @@ final _objc_msgSend_817 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); +late final _sel_canInflectLanguage_ = objc.registerName("canInflectLanguage:"); +late final _sel_canInflectPreferredLocalization = + objc.registerName("canInflectPreferredLocalization"); -abstract class NSRoundingMode { - static const int NSRoundPlain = 0; - static const int NSRoundDown = 1; - static const int NSRoundUp = 2; - static const int NSRoundBankers = 3; -} +class NSOrderedSet extends objc.NSObject { + NSOrderedSet._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -late final _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = - objc.registerName( - "initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); -final _objc_msgSend_818 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_819 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + /// Constructs a [NSOrderedSet] that points to the same underlying object as [other]. + NSOrderedSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class NSScanner extends NSObject { - NSScanner._(ffi.Pointer pointer, + /// Constructs a [NSOrderedSet] that wraps the given raw object pointer. + NSOrderedSet.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [NSScanner] that points to the same underlying object as [other]. - static NSScanner castFrom(T other) { - return NSScanner._(other.pointer, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSOrderedSet]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSOrderedSet); } - /// Returns a [NSScanner] that wraps the given raw object pointer. - static NSScanner castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSScanner._(other, retain: retain, release: release); + int get count { + return _objc_msgSend_29(this.pointer, _sel_count); } - /// Returns whether [obj] is an instance of [NSScanner]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSScanner); + objc.NSObject objectAtIndex_(int idx) { + final _ret = _objc_msgSend_355(this.pointer, _sel_objectAtIndex_, idx); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSString get string { - final _ret = _objc_msgSend_21(this.pointer, _sel_string); - return NSString._(_ret, retain: true, release: true); + int indexOfObject_(objc.NSObject object) { + return _objc_msgSend_364(this.pointer, _sel_indexOfObject_, object.pointer); } - int get scanLocation { - return _objc_msgSend_10(this.pointer, _sel_scanLocation); + @override + NSOrderedSet init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - set scanLocation(int value) { - return _objc_msgSend_516(this.pointer, _sel_setScanLocation_, value); + NSOrderedSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - NSCharacterSet? get charactersToBeSkipped { - final _ret = _objc_msgSend_820(this.pointer, _sel_charactersToBeSkipped); + NSOrderedSet? initWithCoder_(objc.NSCoder coder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); return _ret.address == 0 ? null - : NSCharacterSet._(_ret, retain: true, release: true); + : NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - set charactersToBeSkipped(NSCharacterSet? value) { - return _objc_msgSend_821(this.pointer, _sel_setCharactersToBeSkipped_, - value?.pointer ?? ffi.nullptr); + void getObjects_range_( + ffi.Pointer> objects, _NSRange range) { + _objc_msgSend_366(this.pointer, _sel_getObjects_range_, objects, range); } - bool get caseSensitive { - return _objc_msgSend_12(this.pointer, _sel_caseSensitive); + objc.NSArray objectsAtIndexes_(objc.NSIndexSet indexes) { + final _ret = _objc_msgSend_367( + this.pointer, _sel_objectsAtIndexes_, indexes.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set caseSensitive(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setCaseSensitive_, value); + objc.NSObject? get firstObject { + final _ret = _objc_msgSend_66(this.pointer, _sel_firstObject); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSObject? get locale { - final _ret = _objc_msgSend_17(this.pointer, _sel_locale); + objc.NSObject? get lastObject { + final _ret = _objc_msgSend_66(this.pointer, _sel_lastObject); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set locale(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setLocale_, value?.pointer ?? ffi.nullptr); + bool isEqualToOrderedSet_(NSOrderedSet other) { + return _objc_msgSend_368( + this.pointer, _sel_isEqualToOrderedSet_, other.pointer); + } + + bool containsObject_(objc.NSObject object) { + return _objc_msgSend_0(this.pointer, _sel_containsObject_, object.pointer); + } + + bool intersectsOrderedSet_(NSOrderedSet other) { + return _objc_msgSend_368( + this.pointer, _sel_intersectsOrderedSet_, other.pointer); + } + + bool intersectsSet_(objc.NSSet set) { + return _objc_msgSend_369(this.pointer, _sel_intersectsSet_, set.pointer); + } + + bool isSubsetOfOrderedSet_(NSOrderedSet other) { + return _objc_msgSend_368( + this.pointer, _sel_isSubsetOfOrderedSet_, other.pointer); + } + + bool isSubsetOfSet_(objc.NSSet set) { + return _objc_msgSend_369(this.pointer, _sel_isSubsetOfSet_, set.pointer); } - NSScanner initWithString_(NSString string) { + objc.NSObject objectAtIndexedSubscript_(int idx) { final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithString_, string.pointer); - return NSScanner._(_ret, retain: true, release: true); + _objc_msgSend_355(this.pointer, _sel_objectAtIndexedSubscript_, idx); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool scanInt_(ffi.Pointer result) { - return _objc_msgSend_822(this.pointer, _sel_scanInt_, result); + objc.NSEnumerator objectEnumerator() { + final _ret = _objc_msgSend_370(this.pointer, _sel_objectEnumerator); + return objc.NSEnumerator.castFromPointer(_ret, retain: true, release: true); } - bool scanInteger_(ffi.Pointer result) { - return _objc_msgSend_823(this.pointer, _sel_scanInteger_, result); + objc.NSEnumerator reverseObjectEnumerator() { + final _ret = _objc_msgSend_370(this.pointer, _sel_reverseObjectEnumerator); + return objc.NSEnumerator.castFromPointer(_ret, retain: true, release: true); } - bool scanLongLong_(ffi.Pointer result) { - return _objc_msgSend_824(this.pointer, _sel_scanLongLong_, result); + NSOrderedSet get reversedOrderedSet { + final _ret = _objc_msgSend_371(this.pointer, _sel_reversedOrderedSet); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - bool scanUnsignedLongLong_(ffi.Pointer result) { - return _objc_msgSend_825(this.pointer, _sel_scanUnsignedLongLong_, result); + objc.NSArray get array { + final _ret = _objc_msgSend_6(this.pointer, _sel_array); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool scanFloat_(ffi.Pointer result) { - return _objc_msgSend_826(this.pointer, _sel_scanFloat_, result); + objc.NSSet get set1 { + final _ret = _objc_msgSend_372(this.pointer, _sel_set); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - bool scanDouble_(ffi.Pointer result) { - return _objc_msgSend_827(this.pointer, _sel_scanDouble_, result); + void enumerateObjectsUsingBlock_( + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_373( + this.pointer, _sel_enumerateObjectsUsingBlock_, block.pointer); } - bool scanHexInt_(ffi.Pointer result) { - return _objc_msgSend_828(this.pointer, _sel_scanHexInt_, result); + void enumerateObjectsWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_374(this.pointer, + _sel_enumerateObjectsWithOptions_usingBlock_, opts, block.pointer); } - bool scanHexLongLong_(ffi.Pointer result) { - return _objc_msgSend_825(this.pointer, _sel_scanHexLongLong_, result); + void enumerateObjectsAtIndexes_options_usingBlock_(objc.NSIndexSet s, + int opts, ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_375( + this.pointer, + _sel_enumerateObjectsAtIndexes_options_usingBlock_, + s.pointer, + opts, + block.pointer); } - bool scanHexFloat_(ffi.Pointer result) { - return _objc_msgSend_826(this.pointer, _sel_scanHexFloat_, result); + int indexOfObjectPassingTest_( + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_376( + this.pointer, _sel_indexOfObjectPassingTest_, predicate.pointer); } - bool scanHexDouble_(ffi.Pointer result) { - return _objc_msgSend_827(this.pointer, _sel_scanHexDouble_, result); + int indexOfObjectWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_377(this.pointer, + _sel_indexOfObjectWithOptions_passingTest_, opts, predicate.pointer); } - bool scanString_intoString_( - NSString string, ffi.Pointer> result) { - return _objc_msgSend_829( - this.pointer, _sel_scanString_intoString_, string.pointer, result); + int indexOfObjectAtIndexes_options_passingTest_(objc.NSIndexSet s, int opts, + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_378( + this.pointer, + _sel_indexOfObjectAtIndexes_options_passingTest_, + s.pointer, + opts, + predicate.pointer); } - bool scanCharactersFromSet_intoString_( - NSCharacterSet set, ffi.Pointer> result) { - return _objc_msgSend_830(this.pointer, - _sel_scanCharactersFromSet_intoString_, set.pointer, result); + objc.NSIndexSet indexesOfObjectsPassingTest_( + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_379( + this.pointer, _sel_indexesOfObjectsPassingTest_, predicate.pointer); + return objc.NSIndexSet.castFromPointer(_ret, retain: true, release: true); } - bool scanUpToString_intoString_( - NSString string, ffi.Pointer> result) { - return _objc_msgSend_829( - this.pointer, _sel_scanUpToString_intoString_, string.pointer, result); + objc.NSIndexSet indexesOfObjectsWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_380(this.pointer, + _sel_indexesOfObjectsWithOptions_passingTest_, opts, predicate.pointer); + return objc.NSIndexSet.castFromPointer(_ret, retain: true, release: true); } - bool scanUpToCharactersFromSet_intoString_( - NSCharacterSet set, ffi.Pointer> result) { - return _objc_msgSend_830(this.pointer, - _sel_scanUpToCharactersFromSet_intoString_, set.pointer, result); + objc.NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_( + objc.NSIndexSet s, + int opts, + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_381( + this.pointer, + _sel_indexesOfObjectsAtIndexes_options_passingTest_, + s.pointer, + opts, + predicate.pointer); + return objc.NSIndexSet.castFromPointer(_ret, retain: true, release: true); } - bool get atEnd { - return _objc_msgSend_12(this.pointer, _sel_isAtEnd); + int indexOfObject_inSortedRange_options_usingComparator_( + objc.NSObject object, + _NSRange range, + int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmp) { + return _objc_msgSend_382( + this.pointer, + _sel_indexOfObject_inSortedRange_options_usingComparator_, + object.pointer, + range, + opts, + cmp.pointer); } - static NSScanner scannerWithString_(NSString string) { - final _ret = _objc_msgSend_31( - _class_NSScanner, _sel_scannerWithString_, string.pointer); - return NSScanner._(_ret, retain: true, release: true); + objc.NSArray sortedArrayUsingComparator_( + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_383( + this.pointer, _sel_sortedArrayUsingComparator_, cmptr.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject localizedScannerWithString_(NSString string) { - final _ret = _objc_msgSend_31( - _class_NSScanner, _sel_localizedScannerWithString_, string.pointer); - return NSObject._(_ret, retain: true, release: true); + objc.NSArray sortedArrayWithOptions_usingComparator_(int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_384(this.pointer, + _sel_sortedArrayWithOptions_usingComparator_, opts, cmptr.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool scanDecimal_(ffi.Pointer dcm) { - return _objc_msgSend_831(this.pointer, _sel_scanDecimal_, dcm); + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSScanner init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSScanner._(_ret, retain: true, release: true); + objc.NSString descriptionWithLocale_(objc.NSObject? locale) { + final _ret = _objc_msgSend_385(this.pointer, _sel_descriptionWithLocale_, + locale?.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSScanner new1() { - final _ret = _objc_msgSend_2(_class_NSScanner, _sel_new); - return NSScanner._(_ret, retain: false, release: true); + objc.NSString descriptionWithLocale_indent_( + objc.NSObject? locale, int level) { + final _ret = _objc_msgSend_386( + this.pointer, + _sel_descriptionWithLocale_indent_, + locale?.pointer ?? ffi.nullptr, + level); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSScanner allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSScanner, _sel_allocWithZone_, zone); - return NSScanner._(_ret, retain: false, release: true); + static NSOrderedSet orderedSet() { + final _ret = _objc_msgSend_40(_class_NSOrderedSet, _sel_orderedSet); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSScanner alloc() { - final _ret = _objc_msgSend_2(_class_NSScanner, _sel_alloc); - return NSScanner._(_ret, retain: false, release: true); + static NSOrderedSet orderedSetWithObject_(objc.NSObject object) { + final _ret = _objc_msgSend_387( + _class_NSOrderedSet, _sel_orderedSetWithObject_, object.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSScanner, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + static NSOrderedSet orderedSetWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365( + _class_NSOrderedSet, _sel_orderedSetWithObjects_count_, objects, cnt); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSScanner, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + static NSOrderedSet orderedSetWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387( + _class_NSOrderedSet, _sel_orderedSetWithObjects_, firstObj.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSScanner, _sel_accessInstanceVariablesDirectly); + static NSOrderedSet orderedSetWithOrderedSet_(NSOrderedSet set) { + final _ret = _objc_msgSend_388( + _class_NSOrderedSet, _sel_orderedSetWithOrderedSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSScanner, _sel_useStoredAccessor); + static NSOrderedSet orderedSetWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389( + _class_NSOrderedSet, + _sel_orderedSetWithOrderedSet_range_copyItems_, + set.pointer, + range, + flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSScanner, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + static NSOrderedSet orderedSetWithArray_(objc.NSArray array) { + final _ret = _objc_msgSend_390( + _class_NSOrderedSet, _sel_orderedSetWithArray_, array.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSScanner, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + static NSOrderedSet orderedSetWithArray_range_copyItems_( + objc.NSArray array, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(_class_NSOrderedSet, + _sel_orderedSetWithArray_range_copyItems_, array.pointer, range, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSScanner, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + static NSOrderedSet orderedSetWithSet_(objc.NSSet set) { + final _ret = _objc_msgSend_392( + _class_NSOrderedSet, _sel_orderedSetWithSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSScanner, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static NSOrderedSet orderedSetWithSet_copyItems_(objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393(_class_NSOrderedSet, + _sel_orderedSetWithSet_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static NSObject classForKeyedUnarchiver() { + NSOrderedSet initWithObject_(objc.NSObject object) { final _ret = - _objc_msgSend_2(_class_NSScanner, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_387(this.pointer, _sel_initWithObject_, object.pointer); + return NSOrderedSet.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_820 = 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_821 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_caseSensitive = objc.registerName("caseSensitive"); -late final _sel_setCaseSensitive_ = objc.registerName("setCaseSensitive:"); -late final _sel_scanInt_ = objc.registerName("scanInt:"); -final _objc_msgSend_822 = 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_823 = 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_824 = 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_825 = 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_826 = 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_827 = 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_828 = 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_829 = 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_830 = 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:"); + NSOrderedSet initWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); + } -final class NSDecimal extends ffi.Opaque {} + NSOrderedSet initWithOrderedSet_(NSOrderedSet set) { + final _ret = + _objc_msgSend_388(this.pointer, _sel_initWithOrderedSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); + } -late final _sel_scanDecimal_ = objc.registerName("scanDecimal:"); -final _objc_msgSend_831 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + NSOrderedSet initWithOrderedSet_copyItems_(NSOrderedSet set, bool flag) { + final _ret = _objc_msgSend_394( + this.pointer, _sel_initWithOrderedSet_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); + } -class NSException extends NSObject { - NSException._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + NSOrderedSet initWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389(this.pointer, + _sel_initWithOrderedSet_range_copyItems_, set.pointer, range, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); + } - /// Returns a [NSException] that points to the same underlying object as [other]. - static NSException castFrom(T other) { - return NSException._(other.pointer, retain: true, release: true); + NSOrderedSet initWithArray_(objc.NSArray array) { + final _ret = + _objc_msgSend_390(this.pointer, _sel_initWithArray_, array.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSException] that wraps the given raw object pointer. - static NSException castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSException._(other, retain: retain, release: release); + NSOrderedSet initWithArray_copyItems_(objc.NSArray set, bool flag) { + final _ret = _objc_msgSend_395( + this.pointer, _sel_initWithArray_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - /// Returns whether [obj] is an instance of [NSException]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSException); + NSOrderedSet initWithArray_range_copyItems_( + objc.NSArray set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(this.pointer, + _sel_initWithArray_range_copyItems_, set.pointer, range, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static NSException exceptionWithName_reason_userInfo_( - NSString name, NSString? reason, NSDictionary? userInfo) { - final _ret = _objc_msgSend_832( - _class_NSException, - _sel_exceptionWithName_reason_userInfo_, - name.pointer, - reason?.pointer ?? ffi.nullptr, - userInfo?.pointer ?? ffi.nullptr); - return NSException._(_ret, retain: true, release: true); + NSOrderedSet initWithSet_(objc.NSSet set) { + final _ret = + _objc_msgSend_392(this.pointer, _sel_initWithSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); + } + + NSOrderedSet initWithSet_copyItems_(objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393( + this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - NSException initWithName_reason_userInfo_( - NSString aName, NSString? aReason, NSDictionary? aUserInfo) { - final _ret = _objc_msgSend_833( + objc.NSObject differenceFromOrderedSet_withOptions_usingEquivalenceTest_( + NSOrderedSet other, + int options, + ObjCBlock_bool_objcObjCObject_objcObjCObject block) { + final _ret = _objc_msgSend_396( this.pointer, - _sel_initWithName_reason_userInfo_, - aName.pointer, - aReason?.pointer ?? ffi.nullptr, - aUserInfo?.pointer ?? ffi.nullptr); - return NSException._(_ret, retain: true, release: true); + _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_, + other.pointer, + options, + block.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSString get name { - final _ret = _objc_msgSend_21(this.pointer, _sel_name); - return NSString._(_ret, retain: true, release: true); + objc.NSObject differenceFromOrderedSet_withOptions_( + NSOrderedSet other, int options) { + final _ret = _objc_msgSend_397(this.pointer, + _sel_differenceFromOrderedSet_withOptions_, other.pointer, options); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSString? get reason { - final _ret = _objc_msgSend_44(this.pointer, _sel_reason); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + objc.NSObject differenceFromOrderedSet_(NSOrderedSet other) { + final _ret = _objc_msgSend_388( + this.pointer, _sel_differenceFromOrderedSet_, other.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get userInfo { - final _ret = _objc_msgSend_390(this.pointer, _sel_userInfo); + NSOrderedSet? orderedSetByApplyingDifference_(objc.NSObject difference) { + final _ret = _objc_msgSend_398( + this.pointer, _sel_orderedSetByApplyingDifference_, difference.pointer); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : NSOrderedSet.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject valueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_35(this.pointer, _sel_valueForKey_, key.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSArray get callStackReturnAddresses { - final _ret = _objc_msgSend_85(this.pointer, _sel_callStackReturnAddresses); - return NSArray._(_ret, retain: true, release: true); + void setValue_forKey_(objc.NSObject? value, objc.NSString key) { + _objc_msgSend_399(this.pointer, _sel_setValue_forKey_, + value?.pointer ?? ffi.nullptr, key.pointer); } - NSArray get callStackSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_callStackSymbols); - return NSArray._(_ret, retain: true, release: true); + void addObserver_forKeyPath_options_context_(objc.NSObject observer, + objc.NSString keyPath, int options, ffi.Pointer context) { + _objc_msgSend_400( + this.pointer, + _sel_addObserver_forKeyPath_options_context_, + observer.pointer, + keyPath.pointer, + options, + context); } - void raise() { - _objc_msgSend_1(this.pointer, _sel_raise); + void removeObserver_forKeyPath_context_(objc.NSObject observer, + objc.NSString keyPath, ffi.Pointer context) { + _objc_msgSend_401(this.pointer, _sel_removeObserver_forKeyPath_context_, + observer.pointer, keyPath.pointer, context); } - static void raise_format_(NSString name, NSString format) { - _objc_msgSend_551( - _class_NSException, _sel_raise_format_, name.pointer, format.pointer); + void removeObserver_forKeyPath_( + objc.NSObject observer, objc.NSString keyPath) { + _objc_msgSend_402(this.pointer, _sel_removeObserver_forKeyPath_, + observer.pointer, keyPath.pointer); } - static void raise_format_arguments_( - NSString name, NSString format, ffi.Pointer<__va_list_tag> argList) { - _objc_msgSend_834(_class_NSException, _sel_raise_format_arguments_, - name.pointer, format.pointer, argList); + objc.NSArray sortedArrayUsingDescriptors_(objc.NSArray sortDescriptors) { + final _ret = _objc_msgSend_67(this.pointer, + _sel_sortedArrayUsingDescriptors_, sortDescriptors.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - @override - NSException init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSException._(_ret, retain: true, release: true); + NSOrderedSet filteredOrderedSetUsingPredicate_(NSPredicate p) { + final _ret = _objc_msgSend_412( + this.pointer, _sel_filteredOrderedSetUsingPredicate_, p.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSException new1() { - final _ret = _objc_msgSend_2(_class_NSException, _sel_new); - return NSException._(_ret, retain: false, release: true); + static NSOrderedSet new1() { + final _ret = _objc_msgSend_40(_class_NSOrderedSet, _sel_new); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static NSException allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSException, _sel_allocWithZone_, zone); - return NSException._(_ret, retain: false, release: true); + static NSOrderedSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSOrderedSet, _sel_allocWithZone_, zone); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static NSException alloc() { - final _ret = _objc_msgSend_2(_class_NSException, _sel_alloc); - return NSException._(_ret, retain: false, release: true); + static NSOrderedSet alloc() { + final _ret = _objc_msgSend_40(_class_NSOrderedSet, _sel_alloc); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSException, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOrderedSet, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSException, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOrderedSet, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSException, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSOrderedSet, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSException, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSOrderedSet, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSException, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOrderedSet, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSException, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOrderedSet, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSException, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOrderedSet, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSException, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOrderedSet, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSException, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSOrderedSet, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSOrderedSet = objc.getClass("NSOrderedSet"); +late final _sel_count = objc.registerName("count"); +late final _sel_objectAtIndex_ = objc.registerName("objectAtIndex:"); +late final _sel_indexOfObject_ = objc.registerName("indexOfObject:"); +final _objc_msgSend_364 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithObjects_count_ = + objc.registerName("initWithObjects:count:"); +final _objc_msgSend_365 = 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_getObjects_range_ = objc.registerName("getObjects:range:"); +final _objc_msgSend_366 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + _NSRange)>(); +late final _sel_objectsAtIndexes_ = objc.registerName("objectsAtIndexes:"); +final _objc_msgSend_367 = 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_firstObject = objc.registerName("firstObject"); +late final _sel_lastObject = objc.registerName("lastObject"); +late final _sel_isEqualToOrderedSet_ = + objc.registerName("isEqualToOrderedSet:"); +final _objc_msgSend_368 = 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_containsObject_ = objc.registerName("containsObject:"); +late final _sel_intersectsOrderedSet_ = + objc.registerName("intersectsOrderedSet:"); +late final _sel_intersectsSet_ = objc.registerName("intersectsSet:"); +final _objc_msgSend_369 = 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_isSubsetOfOrderedSet_ = + objc.registerName("isSubsetOfOrderedSet:"); +late final _sel_isSubsetOfSet_ = objc.registerName("isSubsetOfSet:"); +late final _sel_objectAtIndexedSubscript_ = + objc.registerName("objectAtIndexedSubscript:"); +late final _sel_objectEnumerator = objc.registerName("objectEnumerator"); +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_reverseObjectEnumerator = + objc.registerName("reverseObjectEnumerator"); +late final _sel_reversedOrderedSet = objc.registerName("reversedOrderedSet"); +final _objc_msgSend_371 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_array = objc.registerName("array"); +late final _sel_set = objc.registerName("set"); +final _objc_msgSend_372 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_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); +final _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + void Function(ffi.Pointer, int, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = + fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.fromFunction( + void Function(objc.NSObject, int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.listener( + void Function(objc.NSObject, int, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(objc.NSObject arg0, int 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, arg1, arg2); +} + +late final _sel_enumerateObjectsUsingBlock_ = + objc.registerName("enumerateObjectsUsingBlock:"); +final _objc_msgSend_373 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSEnumerationOptions { + static const int NSEnumerationConcurrent = 1; + static const int NSEnumerationReverse = 2; +} + +late final _sel_enumerateObjectsWithOptions_usingBlock_ = + objc.registerName("enumerateObjectsWithOptions:usingBlock:"); +final _objc_msgSend_374 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_enumerateObjectsAtIndexes_options_usingBlock_ = + objc.registerName("enumerateObjectsAtIndexes:options:usingBlock:"); +final _objc_msgSend_375 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() + .asFunction< + bool Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + bool Function(ffi.Pointer, int, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool + extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_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_bool_objcObjCObject_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_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_objcObjCObject_ffiUnsignedLong_bool.fromFunction( + bool Function(objc.NSObject, int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(objc.NSObject arg0, int arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.UnsignedLong arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()(pointer, arg0.pointer, arg1, arg2); } -late final _class_NSException = objc.getClass("NSException"); -late final _sel_exceptionWithName_reason_userInfo_ = - objc.registerName("exceptionWithName:reason:userInfo:"); -final _objc_msgSend_832 = objc.msgSendPointer +late final _sel_indexOfObjectPassingTest_ = + objc.registerName("indexOfObjectPassingTest:"); +final _objc_msgSend_376 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexOfObjectWithOptions_passingTest_ = + objc.registerName("indexOfObjectWithOptions:passingTest:"); +final _objc_msgSend_377 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + int 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_833 = objc.msgSendPointer + int, + ffi.Pointer)>(); +late final _sel_indexOfObjectAtIndexes_options_passingTest_ = + objc.registerName("indexOfObjectAtIndexes:options:passingTest:"); +final _objc_msgSend_378 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32, + ffi.Pointer)>>() .asFunction< - instancetype Function( + int Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_reason = objc.registerName("reason"); -late final _sel_raise = objc.registerName("raise"); -late final _sel_raise_format_ = objc.registerName("raise:format:"); -late final _sel_raise_format_arguments_ = - objc.registerName("raise:format:arguments:"); -final _objc_msgSend_834 = objc.msgSendPointer + int, + ffi.Pointer)>(); +late final _sel_indexesOfObjectsPassingTest_ = + objc.registerName("indexesOfObjectsPassingTest:"); +final _objc_msgSend_379 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexesOfObjectsWithOptions_passingTest_ = + objc.registerName("indexesOfObjectsWithOptions:passingTest:"); +final _objc_msgSend_380 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexesOfObjectsAtIndexes_options_passingTest_ = + objc.registerName("indexesOfObjectsAtIndexes:options:passingTest:"); +final _objc_msgSend_381 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>() + ffi.Int32, + ffi.Pointer)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); - -class NSFileHandle extends NSObject { - NSFileHandle._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSFileHandle] that points to the same underlying object as [other]. - static NSFileHandle castFrom(T other) { - return NSFileHandle._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSFileHandle] that wraps the given raw object pointer. - static NSFileHandle castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileHandle._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSFileHandle]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSFileHandle); - } - - NSData get availableData { - final _ret = _objc_msgSend_43(this.pointer, _sel_availableData); - return NSData._(_ret, retain: true, release: true); - } - - NSFileHandle initWithFileDescriptor_closeOnDealloc_(int fd, bool closeopt) { - final _ret = _objc_msgSend_835(this.pointer, - _sel_initWithFileDescriptor_closeOnDealloc_, fd, closeopt); - return NSFileHandle._(_ret, retain: true, release: true); - } - - NSFileHandle? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, retain: true, release: true); - } - - NSData? readDataToEndOfFileAndReturnError_( - ffi.Pointer> error) { - final _ret = _objc_msgSend_836( - this.pointer, _sel_readDataToEndOfFileAndReturnError_, error); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSData? readDataUpToLength_error_( - int length, ffi.Pointer> error) { - final _ret = _objc_msgSend_837( - this.pointer, _sel_readDataUpToLength_error_, length, error); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - bool writeData_error_( - NSData data, ffi.Pointer> error) { - return _objc_msgSend_838( - this.pointer, _sel_writeData_error_, data.pointer, error); - } - - bool getOffset_error_(ffi.Pointer offsetInFile, - ffi.Pointer> error) { - return _objc_msgSend_839( - this.pointer, _sel_getOffset_error_, offsetInFile, error); - } - - bool seekToEndReturningOffset_error_( - ffi.Pointer offsetInFile, - ffi.Pointer> error) { - return _objc_msgSend_839(this.pointer, _sel_seekToEndReturningOffset_error_, - offsetInFile, error); - } - - bool seekToOffset_error_( - int offset, ffi.Pointer> error) { - return _objc_msgSend_840( - this.pointer, _sel_seekToOffset_error_, offset, error); - } - - bool truncateAtOffset_error_( - int offset, ffi.Pointer> error) { - return _objc_msgSend_840( - this.pointer, _sel_truncateAtOffset_error_, offset, error); - } - - bool synchronizeAndReturnError_( - ffi.Pointer> error) { - return _objc_msgSend_255( - this.pointer, _sel_synchronizeAndReturnError_, error); - } - - bool closeAndReturnError_(ffi.Pointer> error) { - return _objc_msgSend_255(this.pointer, _sel_closeAndReturnError_, error); - } - - static NSFileHandle getFileHandleWithStandardInput() { - final _ret = _objc_msgSend_841( - _class_NSFileHandle, _sel_fileHandleWithStandardInput); - return NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle getFileHandleWithStandardOutput() { - final _ret = _objc_msgSend_841( - _class_NSFileHandle, _sel_fileHandleWithStandardOutput); - return NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle getFileHandleWithStandardError() { - final _ret = _objc_msgSend_841( - _class_NSFileHandle, _sel_fileHandleWithStandardError); - return NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle getFileHandleWithNullDevice() { - final _ret = - _objc_msgSend_841(_class_NSFileHandle, _sel_fileHandleWithNullDevice); - return NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle? fileHandleForReadingAtPath_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSFileHandle, _sel_fileHandleForReadingAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle? fileHandleForWritingAtPath_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSFileHandle, _sel_fileHandleForWritingAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle? fileHandleForUpdatingAtPath_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSFileHandle, _sel_fileHandleForUpdatingAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle? fileHandleForReadingFromURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_842(_class_NSFileHandle, - _sel_fileHandleForReadingFromURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle? fileHandleForWritingToURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_842(_class_NSFileHandle, - _sel_fileHandleForWritingToURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle? fileHandleForUpdatingURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_842(_class_NSFileHandle, - _sel_fileHandleForUpdatingURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, retain: true, release: true); - } - - void readInBackgroundAndNotifyForModes_(NSArray? modes) { - _objc_msgSend_843(this.pointer, _sel_readInBackgroundAndNotifyForModes_, - modes?.pointer ?? ffi.nullptr); - } - - void readInBackgroundAndNotify() { - _objc_msgSend_1(this.pointer, _sel_readInBackgroundAndNotify); - } - - void readToEndOfFileInBackgroundAndNotifyForModes_(NSArray? modes) { - _objc_msgSend_843( - this.pointer, - _sel_readToEndOfFileInBackgroundAndNotifyForModes_, - modes?.pointer ?? ffi.nullptr); - } - - void readToEndOfFileInBackgroundAndNotify() { - _objc_msgSend_1(this.pointer, _sel_readToEndOfFileInBackgroundAndNotify); - } - - void acceptConnectionInBackgroundAndNotifyForModes_(NSArray? modes) { - _objc_msgSend_843( - this.pointer, - _sel_acceptConnectionInBackgroundAndNotifyForModes_, - modes?.pointer ?? ffi.nullptr); - } - - void acceptConnectionInBackgroundAndNotify() { - _objc_msgSend_1(this.pointer, _sel_acceptConnectionInBackgroundAndNotify); - } - - void waitForDataInBackgroundAndNotifyForModes_(NSArray? modes) { - _objc_msgSend_843( - this.pointer, - _sel_waitForDataInBackgroundAndNotifyForModes_, - modes?.pointer ?? ffi.nullptr); - } - - void waitForDataInBackgroundAndNotify() { - _objc_msgSend_1(this.pointer, _sel_waitForDataInBackgroundAndNotify); - } - - ObjCBlock_ffiVoid_NSFileHandle? get readabilityHandler { - final _ret = _objc_msgSend_844(this.pointer, _sel_readabilityHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_NSFileHandle._(_ret, retain: true, release: true); - } - - set readabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { - return _objc_msgSend_845(this.pointer, _sel_setReadabilityHandler_, - value?.pointer ?? ffi.nullptr); - } - - ObjCBlock_ffiVoid_NSFileHandle? get writeabilityHandler { - final _ret = _objc_msgSend_844(this.pointer, _sel_writeabilityHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_NSFileHandle._(_ret, retain: true, release: true); - } - - set writeabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { - return _objc_msgSend_845(this.pointer, _sel_setWriteabilityHandler_, - value?.pointer ?? ffi.nullptr); - } - - NSFileHandle initWithFileDescriptor_(int fd) { - final _ret = - _objc_msgSend_846(this.pointer, _sel_initWithFileDescriptor_, fd); - return NSFileHandle._(_ret, retain: true, release: true); - } - - int get fileDescriptor { - return _objc_msgSend_237(this.pointer, _sel_fileDescriptor); - } - - NSData readDataToEndOfFile() { - final _ret = _objc_msgSend_43(this.pointer, _sel_readDataToEndOfFile); - return NSData._(_ret, retain: true, release: true); - } - - NSData readDataOfLength_(int length) { - final _ret = - _objc_msgSend_847(this.pointer, _sel_readDataOfLength_, length); - return NSData._(_ret, retain: true, release: true); - } - - void writeData_(NSData data) { - _objc_msgSend_285(this.pointer, _sel_writeData_, data.pointer); - } - - int get offsetInFile { - return _objc_msgSend_164(this.pointer, _sel_offsetInFile); - } - - int seekToEndOfFile() { - return _objc_msgSend_164(this.pointer, _sel_seekToEndOfFile); - } - - void seekToFileOffset_(int offset) { - _objc_msgSend_848(this.pointer, _sel_seekToFileOffset_, offset); - } - - void truncateFileAtOffset_(int offset) { - _objc_msgSend_848(this.pointer, _sel_truncateFileAtOffset_, offset); - } - - void synchronizeFile() { - _objc_msgSend_1(this.pointer, _sel_synchronizeFile); - } - - void closeFile() { - _objc_msgSend_1(this.pointer, _sel_closeFile); - } - - @override - NSFileHandle init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle new1() { - final _ret = _objc_msgSend_2(_class_NSFileHandle, _sel_new); - return NSFileHandle._(_ret, retain: false, release: true); - } - - static NSFileHandle allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSFileHandle, _sel_allocWithZone_, zone); - return NSFileHandle._(_ret, retain: false, release: true); - } - - static NSFileHandle alloc() { - final _ret = _objc_msgSend_2(_class_NSFileHandle, _sel_alloc); - return NSFileHandle._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSFileHandle, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } + int, + ffi.Pointer)>(); +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_registerClosure( + int Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistryIndex; + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry[ + id] = fn; + return ffi.Pointer.fromAddress(id); +} - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSFileHandle, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry[ + block.ref.target.address]!(arg0, arg1); - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSFileHandle, _sel_accessInstanceVariablesDirectly); - } +class ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject + extends objc.ObjCBlockBase { + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSFileHandle, _sel_useStoredAccessor); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) { + return ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._(pointer, + retain: retain, release: release); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSFileHandle, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_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_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline, + 0) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSFileHandle, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } + /// 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_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunction( + int Function(objc.NSObject, objc.NSObject) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline, 0) + .cast(), + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), objc.NSObject.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSFileHandle, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } + int call(objc.NSObject arg0, objc.NSObject arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer); +} - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSFileHandle, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } +late final _sel_indexOfObject_inSortedRange_options_usingComparator_ = + objc.registerName("indexOfObject:inSortedRange:options:usingComparator:"); +final _objc_msgSend_382 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +late final _sel_sortedArrayUsingComparator_ = + objc.registerName("sortedArrayUsingComparator:"); +final _objc_msgSend_383 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSFileHandle, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } +abstract class NSSortOptions { + static const int NSSortConcurrent = 1; + static const int NSSortStable = 16; } -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_835 = objc.msgSendPointer +late final _sel_sortedArrayWithOptions_usingComparator_ = + objc.registerName("sortedArrayWithOptions:usingComparator:"); +final _objc_msgSend_384 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Int, ffi.Bool)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int, bool)>(); -late final _sel_readDataToEndOfFileAndReturnError_ = - objc.registerName("readDataToEndOfFileAndReturnError:"); -final _objc_msgSend_836 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_descriptionWithLocale_ = + objc.registerName("descriptionWithLocale:"); +final _objc_msgSend_385 = 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_descriptionWithLocale_indent_ = + objc.registerName("descriptionWithLocale:indent:"); +final _objc_msgSend_386 = 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>)>(); -late final _sel_readDataUpToLength_error_ = - objc.registerName("readDataUpToLength:error:"); -final _objc_msgSend_837 = objc.msgSendPointer + ffi.Pointer, + int)>(); +late final _sel_orderedSet = objc.registerName("orderedSet"); +late final _sel_orderedSetWithObject_ = + objc.registerName("orderedSetWithObject:"); +final _objc_msgSend_387 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - 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_838 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithObjects_count_ = + objc.registerName("orderedSetWithObjects:count:"); +late final _sel_orderedSetWithObjects_ = + objc.registerName("orderedSetWithObjects:"); +late final _sel_orderedSetWithOrderedSet_ = + objc.registerName("orderedSetWithOrderedSet:"); +final _objc_msgSend_388 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithOrderedSet_range_copyItems_ = + objc.registerName("orderedSetWithOrderedSet:range:copyItems:"); +final _objc_msgSend_389 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>() + _NSRange, + ffi.Bool)>>() .asFunction< - bool Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); -late final _sel_getOffset_error_ = objc.registerName("getOffset:error:"); -final _objc_msgSend_839 = objc.msgSendPointer + _NSRange, + bool)>(); +late final _sel_orderedSetWithArray_ = + objc.registerName("orderedSetWithArray:"); +final _objc_msgSend_390 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + instancetype Function( ffi.Pointer, 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_840 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithArray_range_copyItems_ = + objc.registerName("orderedSetWithArray:range:copyItems:"); +final _objc_msgSend_391 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLongLong, - ffi.Pointer>)>>() + ffi.Pointer, + _NSRange, + ffi.Bool)>>() .asFunction< - bool Function( + instancetype 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_841 = objc.msgSendPointer + ffi.Pointer, + _NSRange, + bool)>(); +late final _sel_orderedSetWithSet_ = objc.registerName("orderedSetWithSet:"); +final _objc_msgSend_392 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + instancetype Function( + ffi.Pointer, + 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_842 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithSet_copyItems_ = + objc.registerName("orderedSetWithSet:copyItems:"); +final _objc_msgSend_393 = 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>)>(); -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_843 = objc.msgSendPointer + bool)>(); +late final _sel_initWithObject_ = objc.registerName("initWithObject:"); +late final _sel_initWithObjects_ = objc.registerName("initWithObjects:"); +late final _sel_initWithOrderedSet_ = objc.registerName("initWithOrderedSet:"); +late final _sel_initWithOrderedSet_copyItems_ = + objc.registerName("initWithOrderedSet:copyItems:"); +final _objc_msgSend_394 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Bool)>>() .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) => + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initWithOrderedSet_range_copyItems_ = + objc.registerName("initWithOrderedSet:range:copyItems:"); +late final _sel_initWithArray_ = objc.registerName("initWithArray:"); +late final _sel_initWithArray_copyItems_ = + objc.registerName("initWithArray:copyItems:"); +final _objc_msgSend_395 = 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_initWithArray_range_copyItems_ = + objc.registerName("initWithArray:range:copyItems:"); +late final _sel_initWithSet_ = objc.registerName("initWithSet:"); +late final _sel_initWithSet_copyItems_ = + objc.registerName("initWithSet:copyItems:"); + +abstract class NSOrderedCollectionDifferenceCalculationOptions { + static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = + 1; + static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = + 2; + static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; +} + +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[id] = fn; + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_objcObjCObject_registerClosure( + bool Function( + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[block.ref.target.address]!( - arg0); +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock_ffiVoid_NSFileHandle extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSFileHandle._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) +class ObjCBlock_bool_objcObjCObject_objcObjCObject extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_objcObjCObject._( + 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( + static ObjCBlock_bool_objcObjCObject_objcObjCObject castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSFileHandle._(pointer, + return ObjCBlock_bool_objcObjCObject_objcObjCObject._(pointer, retain: retain, release: release); } @@ -41400,16 +18021,20 @@ class ObjCBlock_ffiVoid_NSFileHandle extends objc.ObjCBlockBase { /// This block must be invoked by native 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( + ObjCBlock_bool_objcObjCObject_objcObjCObject.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> ptr) : this._(objc.newBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline) + _ObjCBlock_bool_objcObjCObject_objcObjCObject_fnPtrTrampoline, + false) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; @@ -41419,307 +18044,76 @@ class ObjCBlock_ffiVoid_NSFileHandle extends objc.ObjCBlockBase { /// This block must be invoked by native 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) + ObjCBlock_bool_objcObjCObject_objcObjCObject.fromFunction( + bool Function(objc.NSObject, objc.NSObject) fn) : this._(objc.newBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline, false) .cast(), - _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( - (ffi.Pointer arg0) => - fn(NSFileHandle._(arg0, retain: true, release: true))))); + _ObjCBlock_bool_objcObjCObject_objcObjCObject_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), objc.NSObject.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_NSFileHandle.listener(void Function(NSFileHandle) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( - (ffi.Pointer arg0) => - fn(NSFileHandle._(arg0, retain: true, 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); + bool call(objc.NSObject arg0, objc.NSObject 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_readabilityHandler = objc.registerName("readabilityHandler"); -final _objc_msgSend_844 = 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_845 = 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_846 = 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"); -late final _sel_readDataToEndOfFile = objc.registerName("readDataToEndOfFile"); -late final _sel_readDataOfLength_ = objc.registerName("readDataOfLength:"); -final _objc_msgSend_847 = 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_offsetInFile = objc.registerName("offsetInFile"); -late final _sel_seekToEndOfFile = objc.registerName("seekToEndOfFile"); -late final _sel_seekToFileOffset_ = objc.registerName("seekToFileOffset:"); -final _objc_msgSend_848 = objc.msgSendPointer +late final _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_ = + objc.registerName( + "differenceFromOrderedSet:withOptions:usingEquivalenceTest:"); +final _objc_msgSend_396 = 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"); - -class NSHTTPCookieStorage extends NSObject { - NSHTTPCookieStorage._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSHTTPCookieStorage] that points to the same underlying object as [other]. - static NSHTTPCookieStorage castFrom(T other) { - return NSHTTPCookieStorage._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSHTTPCookieStorage] that wraps the given raw object pointer. - static NSHTTPCookieStorage castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookieStorage._(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); - } - - static NSHTTPCookieStorage getSharedHTTPCookieStorage() { - final _ret = _objc_msgSend_849( - _class_NSHTTPCookieStorage, _sel_sharedHTTPCookieStorage); - return NSHTTPCookieStorage._(_ret, retain: true, release: true); - } - - static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( - NSString identifier) { - final _ret = _objc_msgSend_850( - _class_NSHTTPCookieStorage, - _sel_sharedCookieStorageForGroupContainerIdentifier_, - identifier.pointer); - return NSHTTPCookieStorage._(_ret, retain: true, release: true); - } - - NSArray? get cookies { - final _ret = _objc_msgSend_84(this.pointer, _sel_cookies); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - void setCookie_(NSHTTPCookie cookie) { - _objc_msgSend_854(this.pointer, _sel_setCookie_, cookie.pointer); - } - - void deleteCookie_(NSHTTPCookie cookie) { - _objc_msgSend_854(this.pointer, _sel_deleteCookie_, cookie.pointer); - } - - void removeCookiesSinceDate_(NSDate date) { - _objc_msgSend_540(this.pointer, _sel_removeCookiesSinceDate_, date.pointer); - } - - NSArray? cookiesForURL_(NSURL URL) { - final _ret = - _objc_msgSend_133(this.pointer, _sel_cookiesForURL_, URL.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - void setCookies_forURL_mainDocumentURL_( - NSArray cookies, NSURL? URL, NSURL? mainDocumentURL) { - _objc_msgSend_855( - this.pointer, - _sel_setCookies_forURL_mainDocumentURL_, - cookies.pointer, - URL?.pointer ?? ffi.nullptr, - mainDocumentURL?.pointer ?? ffi.nullptr); - } - - int get cookieAcceptPolicy { - return _objc_msgSend_856(this.pointer, _sel_cookieAcceptPolicy); - } - - set cookieAcceptPolicy(int value) { - return _objc_msgSend_857(this.pointer, _sel_setCookieAcceptPolicy_, value); - } - - NSArray sortedCookiesUsingDescriptors_(NSArray sortOrder) { - final _ret = _objc_msgSend_68( - this.pointer, _sel_sortedCookiesUsingDescriptors_, sortOrder.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - void storeCookies_forTask_(NSArray cookies, NSURLSessionTask task) { - _objc_msgSend_882(this.pointer, _sel_storeCookies_forTask_, cookies.pointer, - task.pointer); - } - - void getCookiesForTask_completionHandler_( - NSURLSessionTask task, ObjCBlock_ffiVoid_NSArray completionHandler) { - _objc_msgSend_883(this.pointer, _sel_getCookiesForTask_completionHandler_, - task.pointer, completionHandler.pointer); - } - - @override - NSHTTPCookieStorage init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSHTTPCookieStorage._(_ret, retain: true, release: true); - } - - static NSHTTPCookieStorage new1() { - final _ret = _objc_msgSend_2(_class_NSHTTPCookieStorage, _sel_new); - return NSHTTPCookieStorage._(_ret, retain: false, release: true); - } - - static NSHTTPCookieStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSHTTPCookieStorage, _sel_allocWithZone_, zone); - return NSHTTPCookieStorage._(_ret, retain: false, release: true); - } - - static NSHTTPCookieStorage alloc() { - final _ret = _objc_msgSend_2(_class_NSHTTPCookieStorage, _sel_alloc); - return NSHTTPCookieStorage._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSHTTPCookieStorage, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSHTTPCookieStorage, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSHTTPCookieStorage, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSHTTPCookieStorage, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSHTTPCookieStorage, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSHTTPCookieStorage, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSHTTPCookieStorage, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSHTTPCookieStorage, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSHTTPCookieStorage, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSHTTPCookieStorage = objc.getClass("NSHTTPCookieStorage"); -late final _sel_sharedHTTPCookieStorage = - objc.registerName("sharedHTTPCookieStorage"); -final _objc_msgSend_849 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_differenceFromOrderedSet_withOptions_ = + objc.registerName("differenceFromOrderedSet:withOptions:"); +final _objc_msgSend_397 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_sharedCookieStorageForGroupContainerIdentifier_ = - objc.registerName("sharedCookieStorageForGroupContainerIdentifier:"); -final _objc_msgSend_850 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_differenceFromOrderedSet_ = + objc.registerName("differenceFromOrderedSet:"); +late final _sel_orderedSetByApplyingDifference_ = + objc.registerName("orderedSetByApplyingDifference:"); +final _objc_msgSend_398 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -41729,236 +18123,282 @@ final _objc_msgSend_850 = objc.msgSendPointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_cookies = objc.registerName("cookies"); +late final _sel_valueForKey_ = objc.registerName("valueForKey:"); +late final _sel_setValue_forKey_ = objc.registerName("setValue:forKey:"); +final _objc_msgSend_399 = 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)>(); -class NSHTTPCookie extends NSObject { - NSHTTPCookie._(ffi.Pointer pointer, +abstract class NSKeyValueObservingOptions { + static const int NSKeyValueObservingOptionNew = 1; + static const int NSKeyValueObservingOptionOld = 2; + static const int NSKeyValueObservingOptionInitial = 4; + static const int NSKeyValueObservingOptionPrior = 8; +} + +late final _sel_addObserver_forKeyPath_options_context_ = + objc.registerName("addObserver:forKeyPath:options:context:"); +final _objc_msgSend_400 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_removeObserver_forKeyPath_context_ = + objc.registerName("removeObserver:forKeyPath:context:"); +final _objc_msgSend_401 = 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_removeObserver_forKeyPath_ = + objc.registerName("removeObserver:forKeyPath:"); +final _objc_msgSend_402 = 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_sortedArrayUsingDescriptors_ = + objc.registerName("sortedArrayUsingDescriptors:"); + +class NSPredicate extends objc.NSObject { + NSPredicate._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSHTTPCookie] that points to the same underlying object as [other]. - static NSHTTPCookie castFrom(T other) { - return NSHTTPCookie._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSPredicate] that points to the same underlying object as [other]. + NSPredicate.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSHTTPCookie] that wraps the given raw object pointer. - static NSHTTPCookie castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookie._(other, retain: retain, release: release); - } + /// Constructs a [NSPredicate] that wraps the given raw object pointer. + NSPredicate.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSHTTPCookie]. + /// Returns whether [obj] is an instance of [NSPredicate]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSHTTPCookie); - } - - NSHTTPCookie? initWithProperties_(NSDictionary properties) { - final _ret = _objc_msgSend_851( - this.pointer, _sel_initWithProperties_, properties.pointer); - return _ret.address == 0 - ? null - : NSHTTPCookie._(_ret, retain: true, release: true); - } - - static NSHTTPCookie? cookieWithProperties_(NSDictionary properties) { - final _ret = _objc_msgSend_852( - _class_NSHTTPCookie, _sel_cookieWithProperties_, properties.pointer); - return _ret.address == 0 - ? null - : NSHTTPCookie._(_ret, retain: true, release: true); - } - - static NSDictionary requestHeaderFieldsWithCookies_(NSArray cookies) { - final _ret = _objc_msgSend_508(_class_NSHTTPCookie, - _sel_requestHeaderFieldsWithCookies_, cookies.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } - - static NSArray cookiesWithResponseHeaderFields_forURL_( - NSDictionary headerFields, NSURL URL) { - final _ret = _objc_msgSend_853( - _class_NSHTTPCookie, - _sel_cookiesWithResponseHeaderFields_forURL_, - headerFields.pointer, - URL.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSDictionary? get properties { - final _ret = _objc_msgSend_390(this.pointer, _sel_properties); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + obj.pointer, _sel_isKindOfClass_, _class_NSPredicate); } - int get version { - return _objc_msgSend_10(this.pointer, _sel_version); + static NSPredicate predicateWithFormat_argumentArray_( + objc.NSString predicateFormat, objc.NSArray? arguments) { + final _ret = _objc_msgSend_403( + _class_NSPredicate, + _sel_predicateWithFormat_argumentArray_, + predicateFormat.pointer, + arguments?.pointer ?? ffi.nullptr); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - NSString get name { - final _ret = _objc_msgSend_21(this.pointer, _sel_name); - return NSString._(_ret, retain: true, release: true); + static NSPredicate predicateWithFormat_(objc.NSString predicateFormat) { + final _ret = _objc_msgSend_404( + _class_NSPredicate, _sel_predicateWithFormat_, predicateFormat.pointer); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - NSString get value { - final _ret = _objc_msgSend_21(this.pointer, _sel_value); - return NSString._(_ret, retain: true, release: true); + static NSPredicate predicateWithFormat_arguments_( + objc.NSString predicateFormat, ffi.Pointer<__va_list_tag> argList) { + final _ret = _objc_msgSend_405(_class_NSPredicate, + _sel_predicateWithFormat_arguments_, predicateFormat.pointer, argList); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - NSDate? get expiresDate { - final _ret = _objc_msgSend_183(this.pointer, _sel_expiresDate); + static NSPredicate? predicateFromMetadataQueryString_( + objc.NSString queryString) { + final _ret = _objc_msgSend_406(_class_NSPredicate, + _sel_predicateFromMetadataQueryString_, queryString.pointer); return _ret.address == 0 ? null - : NSDate._(_ret, retain: true, release: true); - } - - bool get sessionOnly { - return _objc_msgSend_12(this.pointer, _sel_isSessionOnly); - } - - NSString get domain { - final _ret = _objc_msgSend_21(this.pointer, _sel_domain); - return NSString._(_ret, retain: true, release: true); + : NSPredicate.castFromPointer(_ret, retain: true, release: true); } - NSString get path { - final _ret = _objc_msgSend_21(this.pointer, _sel_path); - return NSString._(_ret, retain: true, release: true); + static NSPredicate predicateWithValue_(bool value) { + final _ret = + _objc_msgSend_407(_class_NSPredicate, _sel_predicateWithValue_, value); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - bool get secure { - return _objc_msgSend_12(this.pointer, _sel_isSecure); + static NSPredicate predicateWithBlock_( + ObjCBlock_bool_objcObjCObject_NSDictionary block) { + final _ret = _objc_msgSend_408( + _class_NSPredicate, _sel_predicateWithBlock_, block.pointer); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - bool get HTTPOnly { - return _objc_msgSend_12(this.pointer, _sel_isHTTPOnly); + objc.NSString get predicateFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_predicateFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get comment { - final _ret = _objc_msgSend_44(this.pointer, _sel_comment); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + NSPredicate predicateWithSubstitutionVariables_(objc.NSDictionary variables) { + final _ret = _objc_msgSend_409(this.pointer, + _sel_predicateWithSubstitutionVariables_, variables.pointer); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - NSURL? get commentURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_commentURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + bool evaluateWithObject_(objc.NSObject? object) { + return _objc_msgSend_410( + this.pointer, _sel_evaluateWithObject_, object?.pointer ?? ffi.nullptr); } - NSArray? get portList { - final _ret = _objc_msgSend_84(this.pointer, _sel_portList); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + bool evaluateWithObject_substitutionVariables_( + objc.NSObject? object, objc.NSDictionary? bindings) { + return _objc_msgSend_411( + this.pointer, + _sel_evaluateWithObject_substitutionVariables_, + object?.pointer ?? ffi.nullptr, + bindings?.pointer ?? ffi.nullptr); } - NSString? get sameSitePolicy { - final _ret = _objc_msgSend_44(this.pointer, _sel_sameSitePolicy); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + void allowEvaluation() { + _objc_msgSend_82(this.pointer, _sel_allowEvaluation); } @override - NSHTTPCookie init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSHTTPCookie._(_ret, retain: true, release: true); + NSPredicate init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - static NSHTTPCookie new1() { - final _ret = _objc_msgSend_2(_class_NSHTTPCookie, _sel_new); - return NSHTTPCookie._(_ret, retain: false, release: true); + static NSPredicate new1() { + final _ret = _objc_msgSend_40(_class_NSPredicate, _sel_new); + return NSPredicate.castFromPointer(_ret, retain: false, release: true); } - static NSHTTPCookie allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSPredicate allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSHTTPCookie, _sel_allocWithZone_, zone); - return NSHTTPCookie._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSPredicate, _sel_allocWithZone_, zone); + return NSPredicate.castFromPointer(_ret, retain: false, release: true); } - static NSHTTPCookie alloc() { - final _ret = _objc_msgSend_2(_class_NSHTTPCookie, _sel_alloc); - return NSHTTPCookie._(_ret, retain: false, release: true); + static NSPredicate alloc() { + final _ret = _objc_msgSend_40(_class_NSPredicate, _sel_alloc); + return NSPredicate.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSHTTPCookie, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPredicate, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSHTTPCookie, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPredicate, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSHTTPCookie, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSPredicate, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSHTTPCookie, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSPredicate, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSHTTPCookie, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPredicate, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSHTTPCookie, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPredicate, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSHTTPCookie, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPredicate, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSHTTPCookie, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPredicate, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSHTTPCookie, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSPredicate, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSHTTPCookie = objc.getClass("NSHTTPCookie"); -late final _sel_initWithProperties_ = objc.registerName("initWithProperties:"); -final _objc_msgSend_851 = objc.msgSendPointer +late final _class_NSPredicate = objc.getClass("NSPredicate"); +late final _sel_predicateWithFormat_argumentArray_ = + objc.registerName("predicateWithFormat:argumentArray:"); +final _objc_msgSend_403 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, 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_852 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_predicateWithFormat_ = + objc.registerName("predicateWithFormat:"); +final _objc_msgSend_404 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -41968,1111 +18408,1142 @@ final _objc_msgSend_852 = objc.msgSendPointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_requestHeaderFieldsWithCookies_ = - objc.registerName("requestHeaderFieldsWithCookies:"); -late final _sel_cookiesWithResponseHeaderFields_forURL_ = - objc.registerName("cookiesWithResponseHeaderFields:forURL:"); -final _objc_msgSend_853 = objc.msgSendPointer +late final _sel_predicateWithFormat_arguments_ = + objc.registerName("predicateWithFormat:arguments:"); +final _objc_msgSend_405 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer<__va_list_tag>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_properties = objc.registerName("properties"); -late final _sel_value = objc.registerName("value"); -late final _sel_expiresDate = objc.registerName("expiresDate"); -late final _sel_isSessionOnly = objc.registerName("isSessionOnly"); -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_854 = objc.msgSendPointer + ffi.Pointer<__va_list_tag>)>(); +late final _sel_predicateFromMetadataQueryString_ = + objc.registerName("predicateFromMetadataQueryString:"); +final _objc_msgSend_406 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, + ffi.Pointer 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:"); -late final _sel_setCookies_forURL_mainDocumentURL_ = - objc.registerName("setCookies:forURL:mainDocumentURL:"); -final _objc_msgSend_855 = objc.msgSendPointer +late final _sel_predicateWithValue_ = objc.registerName("predicateWithValue:"); +final _objc_msgSend_407 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, bool)>(); +bool _ObjCBlock_bool_objcObjCObject_NSDictionary_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); +final _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_NSDictionary_registerClosure( + bool Function( + ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_objcObjCObject_NSDictionary_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_bool_objcObjCObject_NSDictionary extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_NSDictionary._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_bool_objcObjCObject_NSDictionary castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_NSDictionary._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_NSDictionary.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_NSDictionary_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_objcObjCObject_NSDictionary.fromFunction( + bool Function(objc.NSObject?, objc.NSDictionary?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_NSDictionary_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_objcObjCObject_NSDictionary_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.NSObject.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : objc.NSDictionary.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(objc.NSObject? arg0, objc.NSDictionary? 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 ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr); +} + +late final _sel_predicateWithBlock_ = objc.registerName("predicateWithBlock:"); +final _objc_msgSend_408 = 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_predicateFormat = objc.registerName("predicateFormat"); +late final _sel_predicateWithSubstitutionVariables_ = + objc.registerName("predicateWithSubstitutionVariables:"); +final _objc_msgSend_409 = 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_evaluateWithObject_ = objc.registerName("evaluateWithObject:"); +final _objc_msgSend_410 = 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_evaluateWithObject_substitutionVariables_ = + objc.registerName("evaluateWithObject:substitutionVariables:"); +final _objc_msgSend_411 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSHTTPCookieAcceptPolicy { - static const int NSHTTPCookieAcceptPolicyAlways = 0; - static const int NSHTTPCookieAcceptPolicyNever = 1; - static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; -} - -late final _sel_cookieAcceptPolicy = objc.registerName("cookieAcceptPolicy"); -final _objc_msgSend_856 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setCookieAcceptPolicy_ = - objc.registerName("setCookieAcceptPolicy:"); -final _objc_msgSend_857 = objc.msgSendPointer +late final _sel_allowEvaluation = objc.registerName("allowEvaluation"); +late final _sel_filteredOrderedSetUsingPredicate_ = + objc.registerName("filteredOrderedSetUsingPredicate:"); +final _objc_msgSend_412 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_sortedCookiesUsingDescriptors_ = - objc.registerName("sortedCookiesUsingDescriptors:"); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -class NSURLSessionTask extends NSObject { - NSURLSessionTask._(ffi.Pointer pointer, +class NSMutableOrderedSet extends NSOrderedSet { + NSMutableOrderedSet._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLSessionTask] that points to the same underlying object as [other]. - static NSURLSessionTask castFrom(T other) { - return NSURLSessionTask._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSMutableOrderedSet] that points to the same underlying object as [other]. + NSMutableOrderedSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. - static NSURLSessionTask castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTask._(other, retain: retain, release: release); - } + /// Constructs a [NSMutableOrderedSet] that wraps the given raw object pointer. + NSMutableOrderedSet.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSURLSessionTask]. + /// Returns whether [obj] is an instance of [NSMutableOrderedSet]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionTask); - } - - int get taskIdentifier { - return _objc_msgSend_10(this.pointer, _sel_taskIdentifier); - } - - NSURLRequest? get originalRequest { - final _ret = _objc_msgSend_876(this.pointer, _sel_originalRequest); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, retain: true, release: true); - } - - NSURLRequest? get currentRequest { - final _ret = _objc_msgSend_876(this.pointer, _sel_currentRequest); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, retain: true, release: true); - } - - NSURLResponse? get response { - final _ret = _objc_msgSend_878(this.pointer, _sel_response); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, retain: true, release: true); - } - - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); - } - - NSProgress get progress { - final _ret = _objc_msgSend_879(this.pointer, _sel_progress); - return NSProgress._(_ret, retain: true, release: true); - } - - NSDate? get earliestBeginDate { - final _ret = _objc_msgSend_183(this.pointer, _sel_earliestBeginDate); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - set earliestBeginDate(NSDate? value) { - return _objc_msgSend_800(this.pointer, _sel_setEarliestBeginDate_, - value?.pointer ?? ffi.nullptr); - } - - int get countOfBytesClientExpectsToSend { - return _objc_msgSend_666( - this.pointer, _sel_countOfBytesClientExpectsToSend); - } - - set countOfBytesClientExpectsToSend(int value) { - return _objc_msgSend_667( - this.pointer, _sel_setCountOfBytesClientExpectsToSend_, value); - } - - int get countOfBytesClientExpectsToReceive { - return _objc_msgSend_666( - this.pointer, _sel_countOfBytesClientExpectsToReceive); - } - - set countOfBytesClientExpectsToReceive(int value) { - return _objc_msgSend_667( - this.pointer, _sel_setCountOfBytesClientExpectsToReceive_, value); - } - - int get countOfBytesSent { - return _objc_msgSend_666(this.pointer, _sel_countOfBytesSent); + obj.pointer, _sel_isKindOfClass_, _class_NSMutableOrderedSet); } - int get countOfBytesReceived { - return _objc_msgSend_666(this.pointer, _sel_countOfBytesReceived); + void insertObject_atIndex_(objc.NSObject object, int idx) { + _objc_msgSend_413( + this.pointer, _sel_insertObject_atIndex_, object.pointer, idx); } - int get countOfBytesExpectedToSend { - return _objc_msgSend_666(this.pointer, _sel_countOfBytesExpectedToSend); + void removeObjectAtIndex_(int idx) { + _objc_msgSend_414(this.pointer, _sel_removeObjectAtIndex_, idx); } - int get countOfBytesExpectedToReceive { - return _objc_msgSend_666(this.pointer, _sel_countOfBytesExpectedToReceive); + void replaceObjectAtIndex_withObject_(int idx, objc.NSObject object) { + _objc_msgSend_415(this.pointer, _sel_replaceObjectAtIndex_withObject_, idx, + object.pointer); } - NSString? get taskDescription { - final _ret = _objc_msgSend_44(this.pointer, _sel_taskDescription); + @override + NSMutableOrderedSet? initWithCoder_(objc.NSCoder coder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - set taskDescription(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setTaskDescription_, value?.pointer ?? ffi.nullptr); + @override + NSMutableOrderedSet init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - void cancel() { - _objc_msgSend_1(this.pointer, _sel_cancel); + NSMutableOrderedSet initWithCapacity_(int numItems) { + final _ret = + _objc_msgSend_355(this.pointer, _sel_initWithCapacity_, numItems); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - int get state { - return _objc_msgSend_880(this.pointer, _sel_state); + void addObject_(objc.NSObject object) { + _objc_msgSend_49(this.pointer, _sel_addObject_, object.pointer); } - NSError? get error { - final _ret = _objc_msgSend_322(this.pointer, _sel_error); - return _ret.address == 0 - ? null - : NSError._(_ret, retain: true, release: true); + void addObjects_count_( + ffi.Pointer> objects, int count) { + _objc_msgSend_416(this.pointer, _sel_addObjects_count_, objects, count); } - void suspend() { - _objc_msgSend_1(this.pointer, _sel_suspend); + void addObjectsFromArray_(objc.NSArray array) { + _objc_msgSend_242(this.pointer, _sel_addObjectsFromArray_, array.pointer); } - void resume() { - _objc_msgSend_1(this.pointer, _sel_resume); + void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { + _objc_msgSend_417(this.pointer, + _sel_exchangeObjectAtIndex_withObjectAtIndex_, idx1, idx2); } - double get priority { - return objc.useMsgSendVariants - ? _objc_msgSend_239Fpret(this.pointer, _sel_priority) - : _objc_msgSend_239(this.pointer, _sel_priority); + void moveObjectsAtIndexes_toIndex_(objc.NSIndexSet indexes, int idx) { + _objc_msgSend_418( + this.pointer, _sel_moveObjectsAtIndexes_toIndex_, indexes.pointer, idx); } - set priority(double value) { - return _objc_msgSend_881(this.pointer, _sel_setPriority_, value); + void insertObjects_atIndexes_(objc.NSArray objects, objc.NSIndexSet indexes) { + _objc_msgSend_419(this.pointer, _sel_insertObjects_atIndexes_, + objects.pointer, indexes.pointer); } - bool get prefersIncrementalDelivery { - return _objc_msgSend_12(this.pointer, _sel_prefersIncrementalDelivery); + void setObject_atIndex_(objc.NSObject obj, int idx) { + _objc_msgSend_413(this.pointer, _sel_setObject_atIndex_, obj.pointer, idx); } - set prefersIncrementalDelivery(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setPrefersIncrementalDelivery_, value); + void setObject_atIndexedSubscript_(objc.NSObject obj, int idx) { + _objc_msgSend_413( + this.pointer, _sel_setObject_atIndexedSubscript_, obj.pointer, idx); } - @override - NSURLSessionTask init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionTask._(_ret, retain: true, release: true); + void replaceObjectsInRange_withObjects_count_(_NSRange range, + ffi.Pointer> objects, int count) { + _objc_msgSend_420(this.pointer, + _sel_replaceObjectsInRange_withObjects_count_, range, objects, count); } - static NSURLSessionTask new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionTask, _sel_new); - return NSURLSessionTask._(_ret, retain: false, release: true); + void replaceObjectsAtIndexes_withObjects_( + objc.NSIndexSet indexes, objc.NSArray objects) { + _objc_msgSend_421(this.pointer, _sel_replaceObjectsAtIndexes_withObjects_, + indexes.pointer, objects.pointer); } - static NSURLSessionTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSURLSessionTask, _sel_allocWithZone_, zone); - return NSURLSessionTask._(_ret, retain: false, release: true); + void removeObjectsInRange_(_NSRange range) { + _objc_msgSend_81(this.pointer, _sel_removeObjectsInRange_, range); } - static NSURLSessionTask alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSessionTask, _sel_alloc); - return NSURLSessionTask._(_ret, retain: false, release: true); + void removeObjectsAtIndexes_(objc.NSIndexSet indexes) { + _objc_msgSend_422( + this.pointer, _sel_removeObjectsAtIndexes_, indexes.pointer); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionTask, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + void removeAllObjects() { + _objc_msgSend_82(this.pointer, _sel_removeAllObjects); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + void removeObject_(objc.NSObject object) { + _objc_msgSend_49(this.pointer, _sel_removeObject_, object.pointer); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSessionTask, _sel_accessInstanceVariablesDirectly); + void removeObjectsInArray_(objc.NSArray array) { + _objc_msgSend_242(this.pointer, _sel_removeObjectsInArray_, array.pointer); } - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLSessionTask, _sel_useStoredAccessor); + void intersectOrderedSet_(NSOrderedSet other) { + _objc_msgSend_423(this.pointer, _sel_intersectOrderedSet_, other.pointer); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionTask, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + void minusOrderedSet_(NSOrderedSet other) { + _objc_msgSend_423(this.pointer, _sel_minusOrderedSet_, other.pointer); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + void unionOrderedSet_(NSOrderedSet other) { + _objc_msgSend_423(this.pointer, _sel_unionOrderedSet_, other.pointer); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionTask, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + void intersectSet_(objc.NSSet other) { + _objc_msgSend_424(this.pointer, _sel_intersectSet_, other.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSessionTask, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + void minusSet_(objc.NSSet other) { + _objc_msgSend_424(this.pointer, _sel_minusSet_, other.pointer); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSURLSessionTask, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + void unionSet_(objc.NSSet other) { + _objc_msgSend_424(this.pointer, _sel_unionSet_, other.pointer); } -} - -late final _class_NSURLSessionTask = objc.getClass("NSURLSessionTask"); -late final _sel_taskIdentifier = objc.registerName("taskIdentifier"); -class NSURLRequest extends NSObject { - NSURLRequest._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + void sortUsingComparator_( + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_425(this.pointer, _sel_sortUsingComparator_, cmptr.pointer); + } - /// Returns a [NSURLRequest] that points to the same underlying object as [other]. - static NSURLRequest castFrom(T other) { - return NSURLRequest._(other.pointer, retain: true, release: true); + void sortWithOptions_usingComparator_(int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_426(this.pointer, _sel_sortWithOptions_usingComparator_, opts, + cmptr.pointer); } - /// Returns a [NSURLRequest] that wraps the given raw object pointer. - static NSURLRequest castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLRequest._(other, retain: retain, release: release); + void sortRange_options_usingComparator_(_NSRange range, int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_427(this.pointer, _sel_sortRange_options_usingComparator_, + range, opts, cmptr.pointer); } - /// Returns whether [obj] is an instance of [NSURLRequest]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLRequest); + static NSMutableOrderedSet orderedSetWithCapacity_(int numItems) { + final _ret = _objc_msgSend_355( + _class_NSMutableOrderedSet, _sel_orderedSetWithCapacity_, numItems); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSURLRequest requestWithURL_(NSURL URL) { - final _ret = _objc_msgSend_262( - _class_NSURLRequest, _sel_requestWithURL_, URL.pointer); - return NSURLRequest._(_ret, retain: true, release: true); + void applyDifference_(objc.NSObject difference) { + _objc_msgSend_49(this.pointer, _sel_applyDifference_, difference.pointer); } - static bool getSupportsSecureCoding() { - return _objc_msgSend_12(_class_NSURLRequest, _sel_supportsSecureCoding); + void sortUsingDescriptors_(objc.NSArray sortDescriptors) { + _objc_msgSend_242( + this.pointer, _sel_sortUsingDescriptors_, sortDescriptors.pointer); } - static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( - NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _objc_msgSend_858( - _class_NSURLRequest, - _sel_requestWithURL_cachePolicy_timeoutInterval_, - URL.pointer, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, retain: true, release: true); + void filterUsingPredicate_(NSPredicate p) { + _objc_msgSend_428(this.pointer, _sel_filterUsingPredicate_, p.pointer); } - NSURLRequest initWithURL_(NSURL URL) { - final _ret = - _objc_msgSend_262(this.pointer, _sel_initWithURL_, URL.pointer); - return NSURLRequest._(_ret, retain: true, release: true); + @override + NSMutableOrderedSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - NSURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _objc_msgSend_858( - this.pointer, - _sel_initWithURL_cachePolicy_timeoutInterval_, - URL.pointer, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, retain: true, release: true); + static NSMutableOrderedSet orderedSet() { + final _ret = _objc_msgSend_40(_class_NSMutableOrderedSet, _sel_orderedSet); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - NSURL? get URL { - final _ret = _objc_msgSend_45(this.pointer, _sel_URL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + static NSMutableOrderedSet orderedSetWithObject_(objc.NSObject object) { + final _ret = _objc_msgSend_387( + _class_NSMutableOrderedSet, _sel_orderedSetWithObject_, object.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - int get cachePolicy { - return _objc_msgSend_859(this.pointer, _sel_cachePolicy); + static NSMutableOrderedSet orderedSetWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365(_class_NSMutableOrderedSet, + _sel_orderedSetWithObjects_count_, objects, cnt); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - double get timeoutInterval { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_timeoutInterval) - : _objc_msgSend_165(this.pointer, _sel_timeoutInterval); + static NSMutableOrderedSet orderedSetWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387(_class_NSMutableOrderedSet, + _sel_orderedSetWithObjects_, firstObj.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - NSURL? get mainDocumentURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_mainDocumentURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + static NSMutableOrderedSet orderedSetWithOrderedSet_(NSOrderedSet set) { + final _ret = _objc_msgSend_388(_class_NSMutableOrderedSet, + _sel_orderedSetWithOrderedSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - int get networkServiceType { - return _objc_msgSend_860(this.pointer, _sel_networkServiceType); + static NSMutableOrderedSet orderedSetWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389( + _class_NSMutableOrderedSet, + _sel_orderedSetWithOrderedSet_range_copyItems_, + set.pointer, + range, + flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - bool get allowsCellularAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsCellularAccess); + static NSMutableOrderedSet orderedSetWithArray_(objc.NSArray array) { + final _ret = _objc_msgSend_390( + _class_NSMutableOrderedSet, _sel_orderedSetWithArray_, array.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - bool get allowsExpensiveNetworkAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsExpensiveNetworkAccess); + static NSMutableOrderedSet orderedSetWithArray_range_copyItems_( + objc.NSArray array, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(_class_NSMutableOrderedSet, + _sel_orderedSetWithArray_range_copyItems_, array.pointer, range, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - bool get allowsConstrainedNetworkAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsConstrainedNetworkAccess); + static NSMutableOrderedSet orderedSetWithSet_(objc.NSSet set) { + final _ret = _objc_msgSend_392( + _class_NSMutableOrderedSet, _sel_orderedSetWithSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - bool get assumesHTTP3Capable { - return _objc_msgSend_12(this.pointer, _sel_assumesHTTP3Capable); + static NSMutableOrderedSet orderedSetWithSet_copyItems_( + objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393(_class_NSMutableOrderedSet, + _sel_orderedSetWithSet_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - int get attribution { - return _objc_msgSend_861(this.pointer, _sel_attribution); + @override + NSMutableOrderedSet initWithObject_(objc.NSObject object) { + final _ret = + _objc_msgSend_387(this.pointer, _sel_initWithObject_, object.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - bool get requiresDNSSECValidation { - return _objc_msgSend_12(this.pointer, _sel_requiresDNSSECValidation); + @override + NSMutableOrderedSet initWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - NSString? get HTTPMethod { - final _ret = _objc_msgSend_44(this.pointer, _sel_HTTPMethod); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + @override + NSMutableOrderedSet initWithOrderedSet_(NSOrderedSet set) { + final _ret = + _objc_msgSend_388(this.pointer, _sel_initWithOrderedSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - NSDictionary? get allHTTPHeaderFields { - final _ret = _objc_msgSend_390(this.pointer, _sel_allHTTPHeaderFields); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + @override + NSMutableOrderedSet initWithOrderedSet_copyItems_( + NSOrderedSet set, bool flag) { + final _ret = _objc_msgSend_394( + this.pointer, _sel_initWithOrderedSet_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - NSString? valueForHTTPHeaderField_(NSString field) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_valueForHTTPHeaderField_, field.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + @override + NSMutableOrderedSet initWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389(this.pointer, + _sel_initWithOrderedSet_range_copyItems_, set.pointer, range, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - NSData? get HTTPBody { - final _ret = _objc_msgSend_286(this.pointer, _sel_HTTPBody); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); + @override + NSMutableOrderedSet initWithArray_(objc.NSArray array) { + final _ret = + _objc_msgSend_390(this.pointer, _sel_initWithArray_, array.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - NSInputStream? get HTTPBodyStream { - final _ret = _objc_msgSend_875(this.pointer, _sel_HTTPBodyStream); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, retain: true, release: true); + @override + NSMutableOrderedSet initWithArray_copyItems_(objc.NSArray set, bool flag) { + final _ret = _objc_msgSend_395( + this.pointer, _sel_initWithArray_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - bool get HTTPShouldHandleCookies { - return _objc_msgSend_12(this.pointer, _sel_HTTPShouldHandleCookies); + @override + NSMutableOrderedSet initWithArray_range_copyItems_( + objc.NSArray set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(this.pointer, + _sel_initWithArray_range_copyItems_, set.pointer, range, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - bool get HTTPShouldUsePipelining { - return _objc_msgSend_12(this.pointer, _sel_HTTPShouldUsePipelining); + @override + NSMutableOrderedSet initWithSet_(objc.NSSet set) { + final _ret = + _objc_msgSend_392(this.pointer, _sel_initWithSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } @override - NSURLRequest init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLRequest._(_ret, retain: true, release: true); + NSMutableOrderedSet initWithSet_copyItems_(objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393( + this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static NSURLRequest new1() { - final _ret = _objc_msgSend_2(_class_NSURLRequest, _sel_new); - return NSURLRequest._(_ret, retain: false, release: true); + static NSMutableOrderedSet new1() { + final _ret = _objc_msgSend_40(_class_NSMutableOrderedSet, _sel_new); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static NSURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSMutableOrderedSet allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSURLRequest, _sel_allocWithZone_, zone); - return NSURLRequest._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSMutableOrderedSet, _sel_allocWithZone_, zone); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static NSURLRequest alloc() { - final _ret = _objc_msgSend_2(_class_NSURLRequest, _sel_alloc); - return NSURLRequest._(_ret, retain: false, release: true); + static NSMutableOrderedSet alloc() { + final _ret = _objc_msgSend_40(_class_NSMutableOrderedSet, _sel_alloc); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLRequest, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMutableOrderedSet, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLRequest, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMutableOrderedSet, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLRequest, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSMutableOrderedSet, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLRequest, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSMutableOrderedSet, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLRequest, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMutableOrderedSet, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLRequest, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMutableOrderedSet, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLRequest, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMutableOrderedSet, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLRequest, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMutableOrderedSet, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSURLRequest, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMutableOrderedSet, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSURLRequest = objc.getClass("NSURLRequest"); -late final _sel_requestWithURL_ = objc.registerName("requestWithURL:"); -late final _sel_supportsSecureCoding = - objc.registerName("supportsSecureCoding"); - -abstract class NSURLRequestCachePolicy { - static const int NSURLRequestUseProtocolCachePolicy = 0; - static const int NSURLRequestReloadIgnoringLocalCacheData = 1; - static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; - static const int NSURLRequestReloadIgnoringCacheData = 1; - static const int NSURLRequestReturnCacheDataElseLoad = 2; - static const int NSURLRequestReturnCacheDataDontLoad = 3; - static const int NSURLRequestReloadRevalidatingCacheData = 5; -} - -late final _sel_requestWithURL_cachePolicy_timeoutInterval_ = - objc.registerName("requestWithURL:cachePolicy:timeoutInterval:"); -final _objc_msgSend_858 = objc.msgSendPointer +late final _class_NSMutableOrderedSet = objc.getClass("NSMutableOrderedSet"); +late final _sel_insertObject_atIndex_ = + objc.registerName("insertObject:atIndex:"); +final _objc_msgSend_413 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Double)>>() + ffi.UnsignedLong)>>() .asFunction< - instancetype Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + int)>(); +late final _sel_removeObjectAtIndex_ = + objc.registerName("removeObjectAtIndex:"); +final _objc_msgSend_414 = 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_replaceObjectAtIndex_withObject_ = + objc.registerName("replaceObjectAtIndex:withObject:"); +final _objc_msgSend_415 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function( + 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_859 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_initWithCapacity_ = objc.registerName("initWithCapacity:"); +late final _sel_addObject_ = objc.registerName("addObject:"); +late final _sel_addObjects_count_ = objc.registerName("addObjects:count:"); +final _objc_msgSend_416 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.UnsignedLong)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_timeoutInterval = objc.registerName("timeoutInterval"); -late final _sel_mainDocumentURL = objc.registerName("mainDocumentURL"); - -abstract class NSURLRequestNetworkServiceType { - static const int NSURLNetworkServiceTypeDefault = 0; - static const int NSURLNetworkServiceTypeVoIP = 1; - static const int NSURLNetworkServiceTypeVideo = 2; - static const int NSURLNetworkServiceTypeBackground = 3; - static const int NSURLNetworkServiceTypeVoice = 4; - static const int NSURLNetworkServiceTypeResponsiveData = 6; - static const int NSURLNetworkServiceTypeAVStreaming = 8; - static const int NSURLNetworkServiceTypeResponsiveAV = 9; - static const int NSURLNetworkServiceTypeCallSignaling = 11; -} - -late final _sel_networkServiceType = objc.registerName("networkServiceType"); -final _objc_msgSend_860 = objc.msgSendPointer + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + int)>(); +late final _sel_addObjectsFromArray_ = + objc.registerName("addObjectsFromArray:"); +late final _sel_exchangeObjectAtIndex_withObjectAtIndex_ = + objc.registerName("exchangeObjectAtIndex:withObjectAtIndex:"); +final _objc_msgSend_417 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() .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"); - -abstract class NSURLRequestAttribution { - static const int NSURLRequestAttributionDeveloper = 0; - static const int NSURLRequestAttributionUser = 1; -} - -late final _sel_attribution = objc.registerName("attribution"); -final _objc_msgSend_861 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_moveObjectsAtIndexes_toIndex_ = + objc.registerName("moveObjectsAtIndexes:toIndex:"); +final _objc_msgSend_418 = 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_insertObjects_atIndexes_ = + objc.registerName("insertObjects:atIndexes:"); +final _objc_msgSend_419 = 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_setObject_atIndex_ = objc.registerName("setObject:atIndex:"); +late final _sel_setObject_atIndexedSubscript_ = + objc.registerName("setObject:atIndexedSubscript:"); +late final _sel_replaceObjectsInRange_withObjects_count_ = + objc.registerName("replaceObjectsInRange:withObjects:count:"); +final _objc_msgSend_420 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer>, + int)>(); +late final _sel_replaceObjectsAtIndexes_withObjects_ = + objc.registerName("replaceObjectsAtIndexes:withObjects:"); +final _objc_msgSend_421 = 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_removeObjectsInRange_ = + objc.registerName("removeObjectsInRange:"); +late final _sel_removeObjectsAtIndexes_ = + objc.registerName("removeObjectsAtIndexes:"); +final _objc_msgSend_422 = 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_removeAllObjects = objc.registerName("removeAllObjects"); +late final _sel_removeObject_ = objc.registerName("removeObject:"); +late final _sel_removeObjectsInArray_ = + objc.registerName("removeObjectsInArray:"); +late final _sel_intersectOrderedSet_ = + objc.registerName("intersectOrderedSet:"); +final _objc_msgSend_423 = 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_minusOrderedSet_ = objc.registerName("minusOrderedSet:"); +late final _sel_unionOrderedSet_ = objc.registerName("unionOrderedSet:"); +late final _sel_intersectSet_ = objc.registerName("intersectSet:"); +final _objc_msgSend_424 = 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_minusSet_ = objc.registerName("minusSet:"); +late final _sel_unionSet_ = objc.registerName("unionSet:"); +late final _sel_sortUsingComparator_ = + objc.registerName("sortUsingComparator:"); +final _objc_msgSend_425 = 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_sortWithOptions_usingComparator_ = + objc.registerName("sortWithOptions:usingComparator:"); +final _objc_msgSend_426 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_sortRange_options_usingComparator_ = + objc.registerName("sortRange:options:usingComparator:"); +final _objc_msgSend_427 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +late final _sel_orderedSetWithCapacity_ = + objc.registerName("orderedSetWithCapacity:"); +late final _sel_applyDifference_ = objc.registerName("applyDifference:"); +late final _sel_sortUsingDescriptors_ = + objc.registerName("sortUsingDescriptors:"); +late final _sel_filterUsingPredicate_ = + objc.registerName("filterUsingPredicate:"); +final _objc_msgSend_428 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + 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"); + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -class NSInputStream extends NSStream { - NSInputStream._(ffi.Pointer pointer, +class NSMorphology extends objc.NSObject { + NSMorphology._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSInputStream] that points to the same underlying object as [other]. - static NSInputStream castFrom(T other) { - return NSInputStream._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSMorphology] that points to the same underlying object as [other]. + NSMorphology.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSInputStream] that wraps the given raw object pointer. - static NSInputStream castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInputStream._(other, retain: retain, release: release); - } + /// 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 [NSInputStream]. + /// Returns whether [obj] is an instance of [NSMorphology]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSInputStream); - } - - int read_maxLength_(ffi.Pointer buffer, int len) { - return _objc_msgSend_864(this.pointer, _sel_read_maxLength_, buffer, len); - } - - bool getBuffer_length_(ffi.Pointer> buffer, - ffi.Pointer len) { - return _objc_msgSend_873(this.pointer, _sel_getBuffer_length_, buffer, len); - } - - bool get hasBytesAvailable { - return _objc_msgSend_12(this.pointer, _sel_hasBytesAvailable); - } - - NSInputStream initWithData_(NSData data) { - final _ret = - _objc_msgSend_279(this.pointer, _sel_initWithData_, data.pointer); - return NSInputStream._(_ret, retain: true, release: true); - } - - NSInputStream? initWithURL_(NSURL url) { - final _ret = - _objc_msgSend_277(this.pointer, _sel_initWithURL_, url.pointer); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, retain: true, release: true); - } - - NSInputStream? initWithFileAtPath_(NSString path) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_initWithFileAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, retain: true, release: true); - } - - static NSInputStream? inputStreamWithData_(NSData data) { - final _ret = _objc_msgSend_874( - _class_NSInputStream, _sel_inputStreamWithData_, data.pointer); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, retain: true, release: true); - } - - static NSInputStream? inputStreamWithFileAtPath_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSInputStream, _sel_inputStreamWithFileAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, retain: true, release: true); - } - - static NSInputStream? inputStreamWithURL_(NSURL url) { - final _ret = _objc_msgSend_277( - _class_NSInputStream, _sel_inputStreamWithURL_, url.pointer); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, retain: true, release: true); - } - - static void getStreamsToHostWithName_port_inputStream_outputStream_( - NSString hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_867( - _class_NSInputStream, - _sel_getStreamsToHostWithName_port_inputStream_outputStream_, - hostname.pointer, - port, - inputStream, - outputStream); - } - - static void getStreamsToHost_port_inputStream_outputStream_( - NSHost host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_871( - _class_NSInputStream, - _sel_getStreamsToHost_port_inputStream_outputStream_, - host.pointer, - port, - inputStream, - outputStream); - } - - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_872( - _class_NSInputStream, - _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, - bufferSize, - inputStream, - outputStream); - } - - @override - NSInputStream init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSInputStream._(_ret, retain: true, release: true); - } - - static NSInputStream new1() { - final _ret = _objc_msgSend_2(_class_NSInputStream, _sel_new); - return NSInputStream._(_ret, retain: false, release: true); - } - - static NSInputStream allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSInputStream, _sel_allocWithZone_, zone); - return NSInputStream._(_ret, retain: false, release: true); - } - - static NSInputStream alloc() { - final _ret = _objc_msgSend_2(_class_NSInputStream, _sel_alloc); - return NSInputStream._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSInputStream, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSInputStream, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSInputStream, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSInputStream, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSInputStream, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + obj.pointer, _sel_isKindOfClass_, _class_NSMorphology); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSInputStream, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + int get grammaticalGender { + return _objc_msgSend_429(this.pointer, _sel_grammaticalGender); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSInputStream, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + set grammaticalGender(int value) { + return _objc_msgSend_430(this.pointer, _sel_setGrammaticalGender_, value); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSInputStream, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + int get partOfSpeech { + return _objc_msgSend_431(this.pointer, _sel_partOfSpeech); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSInputStream, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + set partOfSpeech(int value) { + return _objc_msgSend_432(this.pointer, _sel_setPartOfSpeech_, value); } -} - -late final _class_NSInputStream = objc.getClass("NSInputStream"); - -class NSStream extends NSObject { - NSStream._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - /// Returns a [NSStream] that points to the same underlying object as [other]. - static NSStream castFrom(T other) { - return NSStream._(other.pointer, retain: true, release: true); + int get number { + return _objc_msgSend_433(this.pointer, _sel_number); } - /// Returns a [NSStream] that wraps the given raw object pointer. - static NSStream castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSStream._(other, retain: retain, release: release); + set number(int value) { + return _objc_msgSend_434(this.pointer, _sel_setNumber_, value); } - /// Returns whether [obj] is an instance of [NSStream]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSStream); + int get grammaticalCase { + return _objc_msgSend_435(this.pointer, _sel_grammaticalCase); } - void open() { - _objc_msgSend_1(this.pointer, _sel_open); + set grammaticalCase(int value) { + return _objc_msgSend_436(this.pointer, _sel_setGrammaticalCase_, value); } - void close() { - _objc_msgSend_1(this.pointer, _sel_close); + int get determination { + return _objc_msgSend_437(this.pointer, _sel_determination); } - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + set determination(int value) { + return _objc_msgSend_438(this.pointer, _sel_setDetermination_, value); } - set delegate(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); + int get grammaticalPerson { + return _objc_msgSend_439(this.pointer, _sel_grammaticalPerson); } - NSObject? propertyForKey_(NSString key) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_propertyForKey_, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + set grammaticalPerson(int value) { + return _objc_msgSend_440(this.pointer, _sel_setGrammaticalPerson_, value); } - bool setProperty_forKey_(NSObject? property, NSString key) { - return _objc_msgSend_862(this.pointer, _sel_setProperty_forKey_, - property?.pointer ?? ffi.nullptr, key.pointer); + int get pronounType { + return _objc_msgSend_441(this.pointer, _sel_pronounType); } - void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_scheduleInRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); + set pronounType(int value) { + return _objc_msgSend_442(this.pointer, _sel_setPronounType_, value); } - void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_removeFromRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); + int get definiteness { + return _objc_msgSend_443(this.pointer, _sel_definiteness); } - int get streamStatus { - return _objc_msgSend_863(this.pointer, _sel_streamStatus); + set definiteness(int value) { + return _objc_msgSend_444(this.pointer, _sel_setDefiniteness_, value); } - NSError? get streamError { - final _ret = _objc_msgSend_322(this.pointer, _sel_streamError); + NSMorphologyCustomPronoun? customPronounForLanguage_(objc.NSString language) { + final _ret = _objc_msgSend_446( + this.pointer, _sel_customPronounForLanguage_, language.pointer); return _ret.address == 0 ? null - : NSError._(_ret, retain: true, release: true); + : NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: true, release: true); } - static void getStreamsToHostWithName_port_inputStream_outputStream_( - NSString hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_867( - _class_NSStream, - _sel_getStreamsToHostWithName_port_inputStream_outputStream_, - hostname.pointer, - port, - inputStream, - outputStream); + bool setCustomPronoun_forLanguage_error_(NSMorphologyCustomPronoun? features, + objc.NSString language, ffi.Pointer> error) { + return _objc_msgSend_447( + this.pointer, + _sel_setCustomPronoun_forLanguage_error_, + features?.pointer ?? ffi.nullptr, + language.pointer, + error); } - static void getStreamsToHost_port_inputStream_outputStream_( - NSHost host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_871( - _class_NSStream, - _sel_getStreamsToHost_port_inputStream_outputStream_, - host.pointer, - port, - inputStream, - outputStream); + bool get unspecified { + return _objc_msgSend_7(this.pointer, _sel_isUnspecified); } - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_872( - _class_NSStream, - _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, - bufferSize, - inputStream, - outputStream); + static NSMorphology getUserMorphology() { + final _ret = _objc_msgSend_448(_class_NSMorphology, _sel_userMorphology); + return NSMorphology.castFromPointer(_ret, retain: true, release: true); } @override - NSStream init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSStream._(_ret, retain: true, release: true); + NSMorphology init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMorphology.castFromPointer(_ret, retain: true, release: true); } - static NSStream new1() { - final _ret = _objc_msgSend_2(_class_NSStream, _sel_new); - return NSStream._(_ret, retain: false, release: true); + static NSMorphology new1() { + final _ret = _objc_msgSend_40(_class_NSMorphology, _sel_new); + return NSMorphology.castFromPointer(_ret, retain: false, release: true); } - static NSStream allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSStream, _sel_allocWithZone_, zone); - return NSStream._(_ret, retain: false, release: true); + static NSMorphology allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSMorphology, _sel_allocWithZone_, zone); + return NSMorphology.castFromPointer(_ret, retain: false, release: true); } - static NSStream alloc() { - final _ret = _objc_msgSend_2(_class_NSStream, _sel_alloc); - return NSStream._(_ret, retain: false, release: true); + static NSMorphology alloc() { + final _ret = _objc_msgSend_40(_class_NSMorphology, _sel_alloc); + return NSMorphology.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSStream, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMorphology, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSStream, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMorphology, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSStream, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSMorphology, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSStream, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSMorphology, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSStream, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMorphology, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSStream, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMorphology, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSStream, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMorphology, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSStream, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMorphology, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSStream, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSMorphology, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSStream = objc.getClass("NSStream"); -late final _sel_open = objc.registerName("open"); -late final _sel_close = objc.registerName("close"); -final _objc_msgSend_862 = objc.msgSendPointer +late final _class_NSMorphology = objc.getClass("NSMorphology"); + +abstract class NSGrammaticalGender { + static const int NSGrammaticalGenderNotSet = 0; + static const int NSGrammaticalGenderFeminine = 1; + static const int NSGrammaticalGenderMasculine = 2; + static const int NSGrammaticalGenderNeuter = 3; +} + +late final _sel_grammaticalGender = objc.registerName("grammaticalGender"); +final _objc_msgSend_429 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32 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_setGrammaticalGender_ = + objc.registerName("setGrammaticalGender:"); +final _objc_msgSend_430 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); -abstract class NSStreamStatus { - static const int NSStreamStatusNotOpen = 0; - static const int NSStreamStatusOpening = 1; - static const int NSStreamStatusOpen = 2; - static const int NSStreamStatusReading = 3; - static const int NSStreamStatusWriting = 4; - static const int NSStreamStatusAtEnd = 5; - static const int NSStreamStatusClosed = 6; - static const int NSStreamStatusError = 7; +abstract class NSGrammaticalPartOfSpeech { + static const int NSGrammaticalPartOfSpeechNotSet = 0; + static const int NSGrammaticalPartOfSpeechDeterminer = 1; + static const int NSGrammaticalPartOfSpeechPronoun = 2; + static const int NSGrammaticalPartOfSpeechLetter = 3; + static const int NSGrammaticalPartOfSpeechAdverb = 4; + static const int NSGrammaticalPartOfSpeechParticle = 5; + static const int NSGrammaticalPartOfSpeechAdjective = 6; + static const int NSGrammaticalPartOfSpeechAdposition = 7; + static const int NSGrammaticalPartOfSpeechVerb = 8; + static const int NSGrammaticalPartOfSpeechNoun = 9; + static const int NSGrammaticalPartOfSpeechConjunction = 10; + static const int NSGrammaticalPartOfSpeechNumeral = 11; + static const int NSGrammaticalPartOfSpeechInterjection = 12; + static const int NSGrammaticalPartOfSpeechPreposition = 13; + static const int NSGrammaticalPartOfSpeechAbbreviation = 14; } -late final _sel_streamStatus = objc.registerName("streamStatus"); -final _objc_msgSend_863 = objc.msgSendPointer +late final _sel_partOfSpeech = objc.registerName("partOfSpeech"); +final _objc_msgSend_431 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -43080,812 +19551,919 @@ final _objc_msgSend_863 = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_streamError = objc.registerName("streamError"); +late final _sel_setPartOfSpeech_ = objc.registerName("setPartOfSpeech:"); +final _objc_msgSend_432 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); -class NSOutputStream extends NSStream { - NSOutputStream._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); +abstract class NSGrammaticalNumber { + static const int NSGrammaticalNumberNotSet = 0; + static const int NSGrammaticalNumberSingular = 1; + static const int NSGrammaticalNumberZero = 2; + static const int NSGrammaticalNumberPlural = 3; + static const int NSGrammaticalNumberPluralTwo = 4; + static const int NSGrammaticalNumberPluralFew = 5; + static const int NSGrammaticalNumberPluralMany = 6; +} - /// Returns a [NSOutputStream] that points to the same underlying object as [other]. - static NSOutputStream castFrom(T other) { - return NSOutputStream._(other.pointer, retain: true, release: true); - } +late final _sel_number = objc.registerName("number"); +final _objc_msgSend_433 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setNumber_ = objc.registerName("setNumber:"); +final _objc_msgSend_434 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - /// Returns a [NSOutputStream] that wraps the given raw object pointer. - static NSOutputStream castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOutputStream._(other, retain: retain, release: release); - } +abstract class NSGrammaticalCase { + static const int NSGrammaticalCaseNotSet = 0; + static const int NSGrammaticalCaseNominative = 1; + static const int NSGrammaticalCaseAccusative = 2; + static const int NSGrammaticalCaseDative = 3; + static const int NSGrammaticalCaseGenitive = 4; + static const int NSGrammaticalCasePrepositional = 5; + static const int NSGrammaticalCaseAblative = 6; + static const int NSGrammaticalCaseAdessive = 7; + static const int NSGrammaticalCaseAllative = 8; + static const int NSGrammaticalCaseElative = 9; + static const int NSGrammaticalCaseIllative = 10; + static const int NSGrammaticalCaseEssive = 11; + static const int NSGrammaticalCaseInessive = 12; + static const int NSGrammaticalCaseLocative = 13; + static const int NSGrammaticalCaseTranslative = 14; +} - /// Returns whether [obj] is an instance of [NSOutputStream]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSOutputStream); - } +late final _sel_grammaticalCase = objc.registerName("grammaticalCase"); +final _objc_msgSend_435 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setGrammaticalCase_ = objc.registerName("setGrammaticalCase:"); +final _objc_msgSend_436 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - int write_maxLength_(ffi.Pointer buffer, int len) { - return _objc_msgSend_864(this.pointer, _sel_write_maxLength_, buffer, len); - } +abstract class NSGrammaticalDetermination { + static const int NSGrammaticalDeterminationNotSet = 0; + static const int NSGrammaticalDeterminationIndependent = 1; + static const int NSGrammaticalDeterminationDependent = 2; +} + +late final _sel_determination = objc.registerName("determination"); +final _objc_msgSend_437 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDetermination_ = objc.registerName("setDetermination:"); +final _objc_msgSend_438 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSGrammaticalPerson { + static const int NSGrammaticalPersonNotSet = 0; + static const int NSGrammaticalPersonFirst = 1; + static const int NSGrammaticalPersonSecond = 2; + static const int NSGrammaticalPersonThird = 3; +} + +late final _sel_grammaticalPerson = objc.registerName("grammaticalPerson"); +final _objc_msgSend_439 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setGrammaticalPerson_ = + objc.registerName("setGrammaticalPerson:"); +final _objc_msgSend_440 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSGrammaticalPronounType { + static const int NSGrammaticalPronounTypeNotSet = 0; + static const int NSGrammaticalPronounTypePersonal = 1; + static const int NSGrammaticalPronounTypeReflexive = 2; + static const int NSGrammaticalPronounTypePossessive = 3; +} + +late final _sel_pronounType = objc.registerName("pronounType"); +final _objc_msgSend_441 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPronounType_ = objc.registerName("setPronounType:"); +final _objc_msgSend_442 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSGrammaticalDefiniteness { + static const int NSGrammaticalDefinitenessNotSet = 0; + static const int NSGrammaticalDefinitenessIndefinite = 1; + static const int NSGrammaticalDefinitenessDefinite = 2; +} + +late final _sel_definiteness = objc.registerName("definiteness"); +final _objc_msgSend_443 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDefiniteness_ = objc.registerName("setDefiniteness:"); +final _objc_msgSend_444 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +class NSMorphologyCustomPronoun extends objc.NSObject { + NSMorphologyCustomPronoun._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMorphologyCustomPronoun] that points to the same underlying object as [other]. + NSMorphologyCustomPronoun.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - bool get hasSpaceAvailable { - return _objc_msgSend_12(this.pointer, _sel_hasSpaceAvailable); + /// Constructs a [NSMorphologyCustomPronoun] that wraps the given raw object pointer. + NSMorphologyCustomPronoun.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMorphologyCustomPronoun]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMorphologyCustomPronoun); } - NSOutputStream initToMemory() { - final _ret = _objc_msgSend_2(this.pointer, _sel_initToMemory); - return NSOutputStream._(_ret, retain: true, release: true); + static bool isSupportedForLanguage_(objc.NSString language) { + return _objc_msgSend_51(_class_NSMorphologyCustomPronoun, + _sel_isSupportedForLanguage_, language.pointer); } - NSOutputStream initToBuffer_capacity_( - ffi.Pointer buffer, int capacity) { - final _ret = _objc_msgSend_865( - this.pointer, _sel_initToBuffer_capacity_, buffer, capacity); - return NSOutputStream._(_ret, retain: true, release: true); + static objc.NSArray requiredKeysForLanguage_(objc.NSString language) { + final _ret = _objc_msgSend_445(_class_NSMorphologyCustomPronoun, + _sel_requiredKeysForLanguage_, language.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSOutputStream? initWithURL_append_(NSURL url, bool shouldAppend) { - final _ret = _objc_msgSend_866( - this.pointer, _sel_initWithURL_append_, url.pointer, shouldAppend); + objc.NSString? get subjectForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_subjectForm); return _ret.address == 0 ? null - : NSOutputStream._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSOutputStream? initToFileAtPath_append_(NSString path, bool shouldAppend) { - final _ret = _objc_msgSend_40(this.pointer, _sel_initToFileAtPath_append_, - path.pointer, shouldAppend); + set subjectForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setSubjectForm_, value?.pointer ?? ffi.nullptr); + } + + objc.NSString? get objectForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_objectForm); return _ret.address == 0 ? null - : NSOutputStream._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSOutputStream outputStreamToMemory() { - final _ret = - _objc_msgSend_2(_class_NSOutputStream, _sel_outputStreamToMemory); - return NSOutputStream._(_ret, retain: true, release: true); + set objectForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setObjectForm_, value?.pointer ?? ffi.nullptr); } - static NSOutputStream outputStreamToBuffer_capacity_( - ffi.Pointer buffer, int capacity) { - final _ret = _objc_msgSend_865(_class_NSOutputStream, - _sel_outputStreamToBuffer_capacity_, buffer, capacity); - return NSOutputStream._(_ret, retain: true, release: true); + objc.NSString? get possessiveForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_possessiveForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSOutputStream outputStreamToFileAtPath_append_( - NSString path, bool shouldAppend) { - final _ret = _objc_msgSend_30(_class_NSOutputStream, - _sel_outputStreamToFileAtPath_append_, path.pointer, shouldAppend); - return NSOutputStream._(_ret, retain: true, release: true); + set possessiveForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setPossessiveForm_, value?.pointer ?? ffi.nullptr); } - static NSOutputStream? outputStreamWithURL_append_( - NSURL url, bool shouldAppend) { - final _ret = _objc_msgSend_866(_class_NSOutputStream, - _sel_outputStreamWithURL_append_, url.pointer, shouldAppend); + objc.NSString? get possessiveAdjectiveForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_possessiveAdjectiveForm); return _ret.address == 0 ? null - : NSOutputStream._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void getStreamsToHostWithName_port_inputStream_outputStream_( - NSString hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_867( - _class_NSOutputStream, - _sel_getStreamsToHostWithName_port_inputStream_outputStream_, - hostname.pointer, - port, - inputStream, - outputStream); + set possessiveAdjectiveForm(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setPossessiveAdjectiveForm_, + value?.pointer ?? ffi.nullptr); } - static void getStreamsToHost_port_inputStream_outputStream_( - NSHost host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_871( - _class_NSOutputStream, - _sel_getStreamsToHost_port_inputStream_outputStream_, - host.pointer, - port, - inputStream, - outputStream); + objc.NSString? get reflexiveForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_reflexiveForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_872( - _class_NSOutputStream, - _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, - bufferSize, - inputStream, - outputStream); + set reflexiveForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setReflexiveForm_, value?.pointer ?? ffi.nullptr); } @override - NSOutputStream init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSOutputStream._(_ret, retain: true, release: true); + NSMorphologyCustomPronoun init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: true, release: true); } - static NSOutputStream new1() { - final _ret = _objc_msgSend_2(_class_NSOutputStream, _sel_new); - return NSOutputStream._(_ret, retain: false, release: true); + static NSMorphologyCustomPronoun new1() { + final _ret = _objc_msgSend_40(_class_NSMorphologyCustomPronoun, _sel_new); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } - static NSOutputStream allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSOutputStream, _sel_allocWithZone_, zone); - return NSOutputStream._(_ret, retain: false, release: true); + static NSMorphologyCustomPronoun allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSMorphologyCustomPronoun, _sel_allocWithZone_, zone); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } - static NSOutputStream alloc() { - final _ret = _objc_msgSend_2(_class_NSOutputStream, _sel_alloc); - return NSOutputStream._(_ret, retain: false, release: true); + static NSMorphologyCustomPronoun alloc() { + final _ret = _objc_msgSend_40(_class_NSMorphologyCustomPronoun, _sel_alloc); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSOutputStream, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMorphologyCustomPronoun, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSOutputStream, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMorphologyCustomPronoun, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSOutputStream, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSMorphologyCustomPronoun, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSOutputStream, _sel_useStoredAccessor); + return _objc_msgSend_7( + _class_NSMorphologyCustomPronoun, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSOutputStream, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMorphologyCustomPronoun, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSOutputStream, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMorphologyCustomPronoun, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSOutputStream, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMorphologyCustomPronoun, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSOutputStream, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMorphologyCustomPronoun, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSOutputStream, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMorphologyCustomPronoun, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSOutputStream = objc.getClass("NSOutputStream"); -late final _sel_write_maxLength_ = objc.registerName("write:maxLength:"); -final _objc_msgSend_864 = objc.msgSendPointer +late final _class_NSMorphologyCustomPronoun = + objc.getClass("NSMorphologyCustomPronoun"); +late final _sel_isSupportedForLanguage_ = + objc.registerName("isSupportedForLanguage:"); +late final _sel_requiredKeysForLanguage_ = + objc.registerName("requiredKeysForLanguage:"); +final _objc_msgSend_445 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Long Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Pointer)>>() .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); -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_865 = objc.msgSendPointer + 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_446 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); -late final _sel_initWithURL_append_ = objc.registerName("initWithURL:append:"); -final _objc_msgSend_866 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCustomPronoun_forLanguage_error_ = + objc.registerName("setCustomPronoun:forLanguage:error:"); +final _objc_msgSend_447 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Bool)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_initToFileAtPath_append_ = - objc.registerName("initToFileAtPath:append:"); -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_867 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, ffi.Pointer, - ffi.Long, - ffi.Pointer>, ffi.Pointer>)>>() .asFunction< - void Function( + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer>, + ffi.Pointer, ffi.Pointer>)>(); +late final _sel_isUnspecified = objc.registerName("isUnspecified"); +late final _sel_userMorphology = objc.registerName("userMorphology"); +final _objc_msgSend_448 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); -class NSHost extends NSObject { - NSHost._(ffi.Pointer pointer, +class NSOperationQueue extends objc.NSObject { + NSOperationQueue._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSOperationQueue] that points to the same underlying object as [other]. + NSOperationQueue.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSOperationQueue] that wraps the given raw object pointer. + NSOperationQueue.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSOperationQueue]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSOperationQueue); + } - /// Returns a [NSHost] that points to the same underlying object as [other]. - static NSHost castFrom(T other) { - return NSHost._(other.pointer, retain: true, release: true); + objc.NSProgress get progress { + final _ret = _objc_msgSend_347(this.pointer, _sel_progress); + return objc.NSProgress.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSHost] that wraps the given raw object pointer. - static NSHost castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHost._(other, retain: retain, release: release); + void addOperation_(NSOperation op) { + _objc_msgSend_449(this.pointer, _sel_addOperation_, op.pointer); } - /// Returns whether [obj] is an instance of [NSHost]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSHost); + void addOperations_waitUntilFinished_(objc.NSArray ops, bool wait) { + _objc_msgSend_456( + this.pointer, _sel_addOperations_waitUntilFinished_, ops.pointer, wait); } - static NSHost currentHost() { - final _ret = _objc_msgSend_2(_class_NSHost, _sel_currentHost); - return NSHost._(_ret, retain: true, release: true); + void addOperationWithBlock_(ObjCBlock_ffiVoid block) { + _objc_msgSend_249(this.pointer, _sel_addOperationWithBlock_, block.pointer); } - static NSHost hostWithName_(NSString? name) { - final _ret = _objc_msgSend_868( - _class_NSHost, _sel_hostWithName_, name?.pointer ?? ffi.nullptr); - return NSHost._(_ret, retain: true, release: true); + void addBarrierBlock_(ObjCBlock_ffiVoid barrier) { + _objc_msgSend_249(this.pointer, _sel_addBarrierBlock_, barrier.pointer); } - static NSHost hostWithAddress_(NSString address) { - final _ret = - _objc_msgSend_31(_class_NSHost, _sel_hostWithAddress_, address.pointer); - return NSHost._(_ret, retain: true, release: true); + int get maxConcurrentOperationCount { + return _objc_msgSend_114(this.pointer, _sel_maxConcurrentOperationCount); } - bool isEqualToHost_(NSHost aHost) { - return _objc_msgSend_869(this.pointer, _sel_isEqualToHost_, aHost.pointer); + set maxConcurrentOperationCount(int value) { + return _objc_msgSend_134( + this.pointer, _sel_setMaxConcurrentOperationCount_, value); + } + + bool get suspended { + return _objc_msgSend_7(this.pointer, _sel_isSuspended); } - NSString? get name { - final _ret = _objc_msgSend_44(this.pointer, _sel_name); + set suspended(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setSuspended_, value); + } + + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set name(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); + } + + int get qualityOfService { + return _objc_msgSend_454(this.pointer, _sel_qualityOfService); } - NSArray get names { - final _ret = _objc_msgSend_85(this.pointer, _sel_names); - return NSArray._(_ret, retain: true, release: true); + set qualityOfService(int value) { + return _objc_msgSend_455(this.pointer, _sel_setQualityOfService_, value); } - NSString? get address { - final _ret = _objc_msgSend_44(this.pointer, _sel_address); + objc.NSObject? get underlyingQueue { + final _ret = _objc_msgSend_457(this.pointer, _sel_underlyingQueue); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + set underlyingQueue(objc.NSObject? value) { + return _objc_msgSend_458( + this.pointer, _sel_setUnderlyingQueue_, value?.pointer ?? ffi.nullptr); + } + + void cancelAllOperations() { + _objc_msgSend_82(this.pointer, _sel_cancelAllOperations); } - NSArray get addresses { - final _ret = _objc_msgSend_85(this.pointer, _sel_addresses); - return NSArray._(_ret, retain: true, release: true); + void waitUntilAllOperationsAreFinished() { + _objc_msgSend_82(this.pointer, _sel_waitUntilAllOperationsAreFinished); } - NSString? get localizedName { - final _ret = _objc_msgSend_44(this.pointer, _sel_localizedName); + static NSOperationQueue? getCurrentQueue() { + final _ret = _objc_msgSend_459(_class_NSOperationQueue, _sel_currentQueue); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - static void setHostCacheEnabled_(bool flag) { - _objc_msgSend_870(_class_NSHost, _sel_setHostCacheEnabled_, flag); + static NSOperationQueue getMainQueue() { + final _ret = _objc_msgSend_460(_class_NSOperationQueue, _sel_mainQueue); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - static bool isHostCacheEnabled() { - return _objc_msgSend_12(_class_NSHost, _sel_isHostCacheEnabled); + objc.NSArray get operations { + final _ret = _objc_msgSend_6(this.pointer, _sel_operations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void flushHostCache() { - _objc_msgSend_1(_class_NSHost, _sel_flushHostCache); + int get operationCount { + return _objc_msgSend_29(this.pointer, _sel_operationCount); } @override - NSHost init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSHost._(_ret, retain: true, release: true); + NSOperationQueue init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - static NSHost new1() { - final _ret = _objc_msgSend_2(_class_NSHost, _sel_new); - return NSHost._(_ret, retain: false, release: true); + static NSOperationQueue new1() { + final _ret = _objc_msgSend_40(_class_NSOperationQueue, _sel_new); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } - static NSHost allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSHost, _sel_allocWithZone_, zone); - return NSHost._(_ret, retain: false, release: true); + static NSOperationQueue allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSOperationQueue, _sel_allocWithZone_, zone); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } - static NSHost alloc() { - final _ret = _objc_msgSend_2(_class_NSHost, _sel_alloc); - return NSHost._(_ret, retain: false, release: true); + static NSOperationQueue alloc() { + final _ret = _objc_msgSend_40(_class_NSOperationQueue, _sel_alloc); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSHost, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOperationQueue, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSHost, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOperationQueue, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSHost, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSOperationQueue, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSHost, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSOperationQueue, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSHost, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOperationQueue, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64( - _class_NSHost, _sel_automaticallyNotifiesObserversForKey_, key.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOperationQueue, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSHost, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOperationQueue, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSHost, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOperationQueue, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSHost, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSOperationQueue, _sel_classForKeyedUnarchiver); + return objc.NSObject.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:"); -final _objc_msgSend_868 = 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_869 = 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_870 = 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_871 = 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_872 = 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_read_maxLength_ = objc.registerName("read:maxLength:"); -late final _sel_getBuffer_length_ = objc.registerName("getBuffer:length:"); -final _objc_msgSend_873 = 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_initWithFileAtPath_ = objc.registerName("initWithFileAtPath:"); -late final _sel_inputStreamWithData_ = - objc.registerName("inputStreamWithData:"); -final _objc_msgSend_874 = 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:"); -late final _sel_HTTPBodyStream = objc.registerName("HTTPBodyStream"); -final _objc_msgSend_875 = 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_876 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_currentRequest = objc.registerName("currentRequest"); +late final _class_NSOperationQueue = objc.getClass("NSOperationQueue"); -class NSURLResponse extends NSObject { - NSURLResponse._(ffi.Pointer pointer, +class NSOperation extends objc.NSObject { + NSOperation._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLResponse] that points to the same underlying object as [other]. - static NSURLResponse castFrom(T other) { - return NSURLResponse._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSOperation] that points to the same underlying object as [other]. + NSOperation.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSURLResponse] that wraps the given raw object pointer. - static NSURLResponse castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLResponse._(other, retain: retain, release: release); - } + /// 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 [NSURLResponse]. + /// Returns whether [obj] is an instance of [NSOperation]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLResponse); + obj.pointer, _sel_isKindOfClass_, _class_NSOperation); } - NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( - NSURL URL, NSString? MIMEType, int length, NSString? name) { - final _ret = _objc_msgSend_877( - this.pointer, - _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_, - URL.pointer, - MIMEType?.pointer ?? ffi.nullptr, - length, - name?.pointer ?? ffi.nullptr); - return NSURLResponse._(_ret, retain: true, release: true); + void start() { + _objc_msgSend_82(this.pointer, _sel_start); } - NSURL? get URL { - final _ret = _objc_msgSend_45(this.pointer, _sel_URL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + void main() { + _objc_msgSend_82(this.pointer, _sel_main); } - NSString? get MIMEType { - final _ret = _objc_msgSend_44(this.pointer, _sel_MIMEType); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + bool get cancelled { + return _objc_msgSend_7(this.pointer, _sel_isCancelled); } - int get expectedContentLength { - return _objc_msgSend_238(this.pointer, _sel_expectedContentLength); + void cancel() { + _objc_msgSend_82(this.pointer, _sel_cancel); + } + + bool get executing { + return _objc_msgSend_7(this.pointer, _sel_isExecuting); + } + + bool get finished { + return _objc_msgSend_7(this.pointer, _sel_isFinished); + } + + bool get concurrent { + return _objc_msgSend_7(this.pointer, _sel_isConcurrent); + } + + bool get asynchronous { + return _objc_msgSend_7(this.pointer, _sel_isAsynchronous); + } + + bool get ready { + return _objc_msgSend_7(this.pointer, _sel_isReady); + } + + void addDependency_(NSOperation op) { + _objc_msgSend_449(this.pointer, _sel_addDependency_, op.pointer); + } + + void removeDependency_(NSOperation op) { + _objc_msgSend_449(this.pointer, _sel_removeDependency_, op.pointer); + } + + objc.NSArray get dependencies { + final _ret = _objc_msgSend_6(this.pointer, _sel_dependencies); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + int get queuePriority { + return _objc_msgSend_450(this.pointer, _sel_queuePriority); + } + + set queuePriority(int value) { + return _objc_msgSend_451(this.pointer, _sel_setQueuePriority_, value); } - NSString? get textEncodingName { - final _ret = _objc_msgSend_44(this.pointer, _sel_textEncodingName); + ObjCBlock_ffiVoid? get completionBlock { + final _ret = _objc_msgSend_452(this.pointer, _sel_completionBlock); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); + } + + set completionBlock(ObjCBlock_ffiVoid? value) { + return _objc_msgSend_453( + this.pointer, _sel_setCompletionBlock_, value?.pointer ?? ffi.nullptr); + } + + void waitUntilFinished() { + _objc_msgSend_82(this.pointer, _sel_waitUntilFinished); + } + + double get threadPriority { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_threadPriority) + : _objc_msgSend_115(this.pointer, _sel_threadPriority); + } + + set threadPriority(double value) { + return _objc_msgSend_212(this.pointer, _sel_setThreadPriority_, value); } - NSString? get suggestedFilename { - final _ret = _objc_msgSend_44(this.pointer, _sel_suggestedFilename); + int get qualityOfService { + return _objc_msgSend_454(this.pointer, _sel_qualityOfService); + } + + set qualityOfService(int value) { + return _objc_msgSend_455(this.pointer, _sel_setQualityOfService_, value); + } + + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set name(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); } @override - NSURLResponse init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLResponse._(_ret, retain: true, release: true); + NSOperation init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOperation.castFromPointer(_ret, retain: true, release: true); } - static NSURLResponse new1() { - final _ret = _objc_msgSend_2(_class_NSURLResponse, _sel_new); - return NSURLResponse._(_ret, retain: false, release: true); + static NSOperation new1() { + final _ret = _objc_msgSend_40(_class_NSOperation, _sel_new); + return NSOperation.castFromPointer(_ret, retain: false, release: true); } - static NSURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSOperation allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSURLResponse, _sel_allocWithZone_, zone); - return NSURLResponse._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSOperation, _sel_allocWithZone_, zone); + return NSOperation.castFromPointer(_ret, retain: false, release: true); } - static NSURLResponse alloc() { - final _ret = _objc_msgSend_2(_class_NSURLResponse, _sel_alloc); - return NSURLResponse._(_ret, retain: false, release: true); + static NSOperation alloc() { + final _ret = _objc_msgSend_40(_class_NSOperation, _sel_alloc); + return NSOperation.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLResponse, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOperation, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLResponse, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOperation, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLResponse, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSOperation, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLResponse, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSOperation, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLResponse, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOperation, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLResponse, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOperation, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLResponse, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOperation, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLResponse, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOperation, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSURLResponse, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSOperation, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSURLResponse = objc.getClass("NSURLResponse"); -late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_ = - objc.registerName( - "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); -final _objc_msgSend_877 = objc.msgSendPointer +late final _class_NSOperation = objc.getClass("NSOperation"); +late final _sel_start = objc.registerName("start"); +late final _sel_main = objc.registerName("main"); +late final _sel_isCancelled = objc.registerName("isCancelled"); +late final _sel_isExecuting = objc.registerName("isExecuting"); +late final _sel_isFinished = objc.registerName("isFinished"); +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_449 = 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"); + +abstract class NSOperationQueuePriority { + static const int NSOperationQueuePriorityVeryLow = -8; + static const int NSOperationQueuePriorityLow = -4; + static const int NSOperationQueuePriorityNormal = 0; + static const int NSOperationQueuePriorityHigh = 4; + static const int NSOperationQueuePriorityVeryHigh = 8; +} + +late final _sel_queuePriority = objc.registerName("queuePriority"); +final _objc_msgSend_450 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer)>>() + ffi.Int32 Function(ffi.Pointer, + 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"); -late final _sel_textEncodingName = objc.registerName("textEncodingName"); -late final _sel_suggestedFilename = objc.registerName("suggestedFilename"); -late final _sel_response = objc.registerName("response"); -final _objc_msgSend_878 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setQueuePriority_ = objc.registerName("setQueuePriority:"); +final _objc_msgSend_451 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_progress = objc.registerName("progress"); -final _objc_msgSend_879 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_completionBlock = objc.registerName("completionBlock"); +final _objc_msgSend_452 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + 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:"); +late final _sel_setCompletionBlock_ = objc.registerName("setCompletionBlock:"); +final _objc_msgSend_453 = 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_waitUntilFinished = objc.registerName("waitUntilFinished"); +late final _sel_threadPriority = objc.registerName("threadPriority"); +late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); -abstract class NSURLSessionTaskState { - static const int NSURLSessionTaskStateRunning = 0; - static const int NSURLSessionTaskStateSuspended = 1; - static const int NSURLSessionTaskStateCanceling = 2; - static const int NSURLSessionTaskStateCompleted = 3; +abstract class NSQualityOfService { + static const int NSQualityOfServiceUserInteractive = 33; + static const int NSQualityOfServiceUserInitiated = 25; + static const int NSQualityOfServiceUtility = 17; + static const int NSQualityOfServiceBackground = 9; + static const int NSQualityOfServiceDefault = -1; } -late final _sel_state = objc.registerName("state"); -final _objc_msgSend_880 = objc.msgSendPointer +late final _sel_qualityOfService = objc.registerName("qualityOfService"); +final _objc_msgSend_454 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -43893,1194 +20471,1138 @@ final _objc_msgSend_880 = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_suspend = objc.registerName("suspend"); -late final _sel_priority = objc.registerName("priority"); -late final _sel_setPriority_ = objc.registerName("setPriority:"); -final _objc_msgSend_881 = objc.msgSendPointer +late final _sel_setQualityOfService_ = + objc.registerName("setQualityOfService:"); +final _objc_msgSend_455 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Float)>>() + ffi.Pointer, ffi.Int32)>>() .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_882 = objc.msgSendPointer + 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_456 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool)>>() .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); -final _ObjCBlock_ffiVoid_NSArray_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSArray_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSArray_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSArray_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSArray_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSArray_closureRegistry[block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_NSArray extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSArray._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSArray castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSArray._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSArray.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSArray.fromFunction(void Function(NSArray?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSArray_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSArray._(arg0, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSArray.listener(void Function(NSArray?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSArray_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSArray._(arg0, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSArray? arg0) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr); -} - -late final _sel_getCookiesForTask_completionHandler_ = - objc.registerName("getCookiesForTask:completionHandler:"); -final _objc_msgSend_883 = objc.msgSendPointer + 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_457 = 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_458 = 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)>(); + 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_459 = 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_460 = 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"); -class NSIndexPath extends NSObject { - NSIndexPath._(ffi.Pointer pointer, +class NSOrthography extends objc.NSObject { + NSOrthography._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSIndexPath] that points to the same underlying object as [other]. - static NSIndexPath castFrom(T other) { - return NSIndexPath._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSOrthography] that points to the same underlying object as [other]. + NSOrthography.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSIndexPath] that wraps the given raw object pointer. - static NSIndexPath castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSIndexPath._(other, retain: retain, release: release); - } + /// Constructs a [NSOrthography] that wraps the given raw object pointer. + NSOrthography.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSIndexPath]. + /// Returns whether [obj] is an instance of [NSOrthography]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSIndexPath); + obj.pointer, _sel_isKindOfClass_, _class_NSOrthography); } - static NSIndexPath indexPathWithIndex_(int index) { - final _ret = - _objc_msgSend_65(_class_NSIndexPath, _sel_indexPathWithIndex_, index); - return NSIndexPath._(_ret, retain: true, release: true); + objc.NSString get dominantScript { + final _ret = _objc_msgSend_12(this.pointer, _sel_dominantScript); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSIndexPath indexPathWithIndexes_length_( - ffi.Pointer indexes, int length) { - final _ret = _objc_msgSend_884( - _class_NSIndexPath, _sel_indexPathWithIndexes_length_, indexes, length); - return NSIndexPath._(_ret, retain: true, release: true); + objc.NSDictionary get languageMap { + final _ret = _objc_msgSend_112(this.pointer, _sel_languageMap); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSIndexPath initWithIndexes_length_( - ffi.Pointer indexes, int length) { - final _ret = _objc_msgSend_884( - this.pointer, _sel_initWithIndexes_length_, indexes, length); - return NSIndexPath._(_ret, retain: true, release: true); + NSOrthography initWithDominantScript_languageMap_( + objc.NSString script, objc.NSDictionary map) { + final _ret = _objc_msgSend_461(this.pointer, + _sel_initWithDominantScript_languageMap_, script.pointer, map.pointer); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } - NSIndexPath initWithIndex_(int index) { - final _ret = _objc_msgSend_65(this.pointer, _sel_initWithIndex_, index); - return NSIndexPath._(_ret, retain: true, release: true); + NSOrthography? initWithCoder_(objc.NSCoder coder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSOrthography.castFromPointer(_ret, retain: true, release: true); } - NSIndexPath indexPathByAddingIndex_(int index) { - final _ret = - _objc_msgSend_885(this.pointer, _sel_indexPathByAddingIndex_, index); - return NSIndexPath._(_ret, retain: true, release: true); + objc.NSArray? languagesForScript_(objc.NSString script) { + final _ret = _objc_msgSend_290( + this.pointer, _sel_languagesForScript_, script.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSIndexPath indexPathByRemovingLastIndex() { - final _ret = - _objc_msgSend_886(this.pointer, _sel_indexPathByRemovingLastIndex); - return NSIndexPath._(_ret, retain: true, release: true); + objc.NSString? dominantLanguageForScript_(objc.NSString script) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_dominantLanguageForScript_, script.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int indexAtPosition_(int position) { - return _objc_msgSend_94(this.pointer, _sel_indexAtPosition_, position); + objc.NSString get dominantLanguage { + final _ret = _objc_msgSend_12(this.pointer, _sel_dominantLanguage); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get length { - return _objc_msgSend_10(this.pointer, _sel_length); + objc.NSArray get allScripts { + final _ret = _objc_msgSend_6(this.pointer, _sel_allScripts); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void getIndexes_range_( - ffi.Pointer indexes, _NSRange positionRange) { - _objc_msgSend_887( - this.pointer, _sel_getIndexes_range_, indexes, positionRange); + objc.NSArray get allLanguages { + final _ret = _objc_msgSend_6(this.pointer, _sel_allLanguages); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int compare_(NSIndexPath otherObject) { - return _objc_msgSend_888(this.pointer, _sel_compare_, otherObject.pointer); + static NSOrthography defaultOrthographyForLanguage_(objc.NSString language) { + final _ret = _objc_msgSend_35(_class_NSOrthography, + _sel_defaultOrthographyForLanguage_, language.pointer); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } - void getIndexes_(ffi.Pointer indexes) { - _objc_msgSend_889(this.pointer, _sel_getIndexes_, indexes); + static NSOrthography orthographyWithDominantScript_languageMap_( + objc.NSString script, objc.NSDictionary map) { + final _ret = _objc_msgSend_461( + _class_NSOrthography, + _sel_orthographyWithDominantScript_languageMap_, + script.pointer, + map.pointer); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } @override - NSIndexPath init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSIndexPath._(_ret, retain: true, release: true); + NSOrthography init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } - static NSIndexPath new1() { - final _ret = _objc_msgSend_2(_class_NSIndexPath, _sel_new); - return NSIndexPath._(_ret, retain: false, release: true); + static NSOrthography new1() { + final _ret = _objc_msgSend_40(_class_NSOrthography, _sel_new); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } - static NSIndexPath allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSIndexPath, _sel_allocWithZone_, zone); - return NSIndexPath._(_ret, retain: false, release: true); + static NSOrthography allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSOrthography, _sel_allocWithZone_, zone); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } - static NSIndexPath alloc() { - final _ret = _objc_msgSend_2(_class_NSIndexPath, _sel_alloc); - return NSIndexPath._(_ret, retain: false, release: true); + static NSOrthography alloc() { + final _ret = _objc_msgSend_40(_class_NSOrthography, _sel_alloc); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSIndexPath, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOrthography, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSIndexPath, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOrthography, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSIndexPath, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSOrthography, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSIndexPath, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSOrthography, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSIndexPath, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOrthography, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSIndexPath, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOrthography, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSIndexPath, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOrthography, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSIndexPath, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOrthography, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSIndexPath, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSOrthography, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_884 = objc.msgSendPointer +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_461 = 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)>(); -late final _sel_initWithIndexes_length_ = - objc.registerName("initWithIndexes:length:"); -late final _sel_indexPathByAddingIndex_ = - objc.registerName("indexPathByAddingIndex:"); -final _objc_msgSend_885 = 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_886 = 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:"); -late final _sel_getIndexes_range_ = objc.registerName("getIndexes:range:"); -final _objc_msgSend_887 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -final _objc_msgSend_888 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 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_889 = 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)>(); +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:"); -class NSInflectionRule extends NSObject { - NSInflectionRule._(ffi.Pointer pointer, +class NSPointerArray extends objc.NSObject { + NSPointerArray._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSInflectionRule] that points to the same underlying object as [other]. - static NSInflectionRule castFrom(T other) { - return NSInflectionRule._(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.pointer, retain: true, release: true); - /// Returns a [NSInflectionRule] that wraps the given raw object pointer. - static NSInflectionRule castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInflectionRule._(other, retain: retain, release: release); - } + /// 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 [NSInflectionRule]. + /// Returns whether [obj] is an instance of [NSPointerArray]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSInflectionRule); + obj.pointer, _sel_isKindOfClass_, _class_NSPointerArray); } - @override - NSObject init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSObject._(_ret, retain: true, release: true); + NSPointerArray initWithOptions_(int options) { + final _ret = + _objc_msgSend_462(this.pointer, _sel_initWithOptions_, options); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - static NSInflectionRule getAutomaticRule() { - final _ret = _objc_msgSend_890(_class_NSInflectionRule, _sel_automaticRule); - return NSInflectionRule._(_ret, retain: true, release: true); + NSPointerArray initWithPointerFunctions_(NSPointerFunctions functions) { + final _ret = _objc_msgSend_476( + this.pointer, _sel_initWithPointerFunctions_, functions.pointer); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - static bool canInflectLanguage_(NSString language) { - return _objc_msgSend_64( - _class_NSInflectionRule, _sel_canInflectLanguage_, language.pointer); + static NSPointerArray pointerArrayWithOptions_(int options) { + final _ret = _objc_msgSend_477( + _class_NSPointerArray, _sel_pointerArrayWithOptions_, options); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - static bool getCanInflectPreferredLocalization() { - return _objc_msgSend_12( - _class_NSInflectionRule, _sel_canInflectPreferredLocalization); + static NSPointerArray pointerArrayWithPointerFunctions_( + NSPointerFunctions functions) { + final _ret = _objc_msgSend_478(_class_NSPointerArray, + _sel_pointerArrayWithPointerFunctions_, functions.pointer); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - static NSInflectionRule new1() { - final _ret = _objc_msgSend_2(_class_NSInflectionRule, _sel_new); - return NSInflectionRule._(_ret, retain: false, release: true); + NSPointerFunctions get pointerFunctions { + final _ret = _objc_msgSend_479(this.pointer, _sel_pointerFunctions); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - static NSInflectionRule allocWithZone_(ffi.Pointer<_NSZone> zone) { + ffi.Pointer pointerAtIndex_(int index) { + return _objc_msgSend_480(this.pointer, _sel_pointerAtIndex_, index); + } + + void addPointer_(ffi.Pointer pointer) { + _objc_msgSend_481(this.pointer, _sel_addPointer_, pointer); + } + + void removePointerAtIndex_(int index) { + _objc_msgSend_414(this.pointer, _sel_removePointerAtIndex_, index); + } + + void insertPointer_atIndex_(ffi.Pointer item, int index) { + _objc_msgSend_482(this.pointer, _sel_insertPointer_atIndex_, item, index); + } + + void replacePointerAtIndex_withPointer_( + int index, ffi.Pointer item) { + _objc_msgSend_483( + this.pointer, _sel_replacePointerAtIndex_withPointer_, index, item); + } + + void compact() { + _objc_msgSend_82(this.pointer, _sel_compact); + } + + int get count { + return _objc_msgSend_29(this.pointer, _sel_count); + } + + set count(int value) { + return _objc_msgSend_125(this.pointer, _sel_setCount_, value); + } + + static objc.NSObject pointerArrayWithStrongObjects() { + final _ret = _objc_msgSend_40( + _class_NSPointerArray, _sel_pointerArrayWithStrongObjects); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject pointerArrayWithWeakObjects() { + final _ret = _objc_msgSend_40( + _class_NSPointerArray, _sel_pointerArrayWithWeakObjects); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSPointerArray strongObjectsPointerArray() { + final _ret = _objc_msgSend_484( + _class_NSPointerArray, _sel_strongObjectsPointerArray); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSPointerArray weakObjectsPointerArray() { final _ret = - _objc_msgSend_3(_class_NSInflectionRule, _sel_allocWithZone_, zone); - return NSInflectionRule._(_ret, retain: false, release: true); + _objc_msgSend_484(_class_NSPointerArray, _sel_weakObjectsPointerArray); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - static NSInflectionRule alloc() { - final _ret = _objc_msgSend_2(_class_NSInflectionRule, _sel_alloc); - return NSInflectionRule._(_ret, retain: false, release: true); + objc.NSArray get allObjects { + final _ret = _objc_msgSend_6(this.pointer, _sel_allObjects); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSPointerArray init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSPointerArray new1() { + final _ret = _objc_msgSend_40(_class_NSPointerArray, _sel_new); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); + } + + static NSPointerArray allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSPointerArray, _sel_allocWithZone_, zone); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); + } + + static NSPointerArray alloc() { + final _ret = _objc_msgSend_40(_class_NSPointerArray, _sel_alloc); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSInflectionRule, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPointerArray, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSInflectionRule, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPointerArray, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSInflectionRule, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSPointerArray, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSInflectionRule, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSPointerArray, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSInflectionRule, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPointerArray, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSInflectionRule, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPointerArray, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSInflectionRule, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPointerArray, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSInflectionRule, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPointerArray, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSInflectionRule, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSPointerArray, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSInflectionRule = objc.getClass("NSInflectionRule"); -late final _sel_automaticRule = objc.registerName("automaticRule"); -final _objc_msgSend_890 = objc.msgSendPointer +late final _class_NSPointerArray = objc.getClass("NSPointerArray"); + +abstract class NSPointerFunctionsOptions { + static const int NSPointerFunctionsStrongMemory = 0; + static const int NSPointerFunctionsZeroingWeakMemory = 1; + static const int NSPointerFunctionsOpaqueMemory = 2; + static const int NSPointerFunctionsMallocMemory = 3; + static const int NSPointerFunctionsMachVirtualMemory = 4; + static const int NSPointerFunctionsWeakMemory = 5; + static const int NSPointerFunctionsObjectPersonality = 0; + static const int NSPointerFunctionsOpaquePersonality = 256; + static const int NSPointerFunctionsObjectPointerPersonality = 512; + static const int NSPointerFunctionsCStringPersonality = 768; + static const int NSPointerFunctionsStructPersonality = 1024; + static const int NSPointerFunctionsIntegerPersonality = 1280; + static const int NSPointerFunctionsCopyIn = 65536; +} + +late final _sel_initWithOptions_ = objc.registerName("initWithOptions:"); +final _objc_msgSend_462 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_canInflectLanguage_ = objc.registerName("canInflectLanguage:"); -late final _sel_canInflectPreferredLocalization = - objc.registerName("canInflectPreferredLocalization"); + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); -class NSMorphology extends NSObject { - NSMorphology._(ffi.Pointer pointer, +class NSPointerFunctions extends objc.NSObject { + NSPointerFunctions._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSMorphology] that points to the same underlying object as [other]. - static NSMorphology castFrom(T other) { - return NSMorphology._(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.pointer, retain: true, release: true); - /// Returns a [NSMorphology] that wraps the given raw object pointer. - static NSMorphology castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMorphology._(other, retain: retain, release: release); - } + /// 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 [NSMorphology]. + /// Returns whether [obj] is an instance of [NSPointerFunctions]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMorphology); - } - - int get grammaticalGender { - return _objc_msgSend_891(this.pointer, _sel_grammaticalGender); - } - - set grammaticalGender(int value) { - return _objc_msgSend_892(this.pointer, _sel_setGrammaticalGender_, value); + obj.pointer, _sel_isKindOfClass_, _class_NSPointerFunctions); } - int get partOfSpeech { - return _objc_msgSend_893(this.pointer, _sel_partOfSpeech); + NSPointerFunctions initWithOptions_(int options) { + final _ret = + _objc_msgSend_462(this.pointer, _sel_initWithOptions_, options); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - set partOfSpeech(int value) { - return _objc_msgSend_894(this.pointer, _sel_setPartOfSpeech_, value); + static NSPointerFunctions pointerFunctionsWithOptions_(int options) { + final _ret = _objc_msgSend_463( + _class_NSPointerFunctions, _sel_pointerFunctionsWithOptions_, options); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - int get number { - return _objc_msgSend_895(this.pointer, _sel_number); + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get hashFunction { + return _objc_msgSend_464(this.pointer, _sel_hashFunction); } - set number(int value) { - return _objc_msgSend_896(this.pointer, _sel_setNumber_, 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_465(this.pointer, _sel_setHashFunction_, value); } - int get grammaticalCase { - return _objc_msgSend_897(this.pointer, _sel_grammaticalCase); + 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_466(this.pointer, _sel_isEqualFunction); } - set grammaticalCase(int value) { - return _objc_msgSend_898(this.pointer, _sel_setGrammaticalCase_, 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_467(this.pointer, _sel_setIsEqualFunction_, value); } - int get determination { - return _objc_msgSend_899(this.pointer, _sel_determination); + ffi.Pointer< + ffi.NativeFunction)>> + get sizeFunction { + return _objc_msgSend_468(this.pointer, _sel_sizeFunction); } - set determination(int value) { - return _objc_msgSend_900(this.pointer, _sel_setDetermination_, value); + set sizeFunction( + ffi.Pointer< + ffi + .NativeFunction)>> + value) { + return _objc_msgSend_469(this.pointer, _sel_setSizeFunction_, value); } - int get grammaticalPerson { - return _objc_msgSend_901(this.pointer, _sel_grammaticalPerson); + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + get descriptionFunction { + return _objc_msgSend_470(this.pointer, _sel_descriptionFunction); } - set grammaticalPerson(int value) { - return _objc_msgSend_902(this.pointer, _sel_setGrammaticalPerson_, value); + set descriptionFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + value) { + return _objc_msgSend_471(this.pointer, _sel_setDescriptionFunction_, value); } - int get pronounType { - return _objc_msgSend_903(this.pointer, _sel_pronounType); + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get relinquishFunction { + return _objc_msgSend_472(this.pointer, _sel_relinquishFunction); } - set pronounType(int value) { - return _objc_msgSend_904(this.pointer, _sel_setPronounType_, 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_473(this.pointer, _sel_setRelinquishFunction_, value); } - int get definiteness { - return _objc_msgSend_905(this.pointer, _sel_definiteness); + 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_474(this.pointer, _sel_acquireFunction); } - set definiteness(int value) { - return _objc_msgSend_906(this.pointer, _sel_setDefiniteness_, 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_475(this.pointer, _sel_setAcquireFunction_, value); } - NSMorphologyCustomPronoun? customPronounForLanguage_(NSString language) { - final _ret = _objc_msgSend_907( - this.pointer, _sel_customPronounForLanguage_, language.pointer); - return _ret.address == 0 - ? null - : NSMorphologyCustomPronoun._(_ret, retain: true, release: true); + bool get usesStrongWriteBarrier { + return _objc_msgSend_7(this.pointer, _sel_usesStrongWriteBarrier); } - bool setCustomPronoun_forLanguage_error_(NSMorphologyCustomPronoun? features, - NSString language, ffi.Pointer> error) { - return _objc_msgSend_908( - this.pointer, - _sel_setCustomPronoun_forLanguage_error_, - features?.pointer ?? ffi.nullptr, - language.pointer, - error); + set usesStrongWriteBarrier(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesStrongWriteBarrier_, value); } - bool get unspecified { - return _objc_msgSend_12(this.pointer, _sel_isUnspecified); + bool get usesWeakReadAndWriteBarriers { + return _objc_msgSend_7(this.pointer, _sel_usesWeakReadAndWriteBarriers); } - static NSMorphology getUserMorphology() { - final _ret = _objc_msgSend_909(_class_NSMorphology, _sel_userMorphology); - return NSMorphology._(_ret, retain: true, release: true); + set usesWeakReadAndWriteBarriers(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesWeakReadAndWriteBarriers_, value); } @override - NSMorphology init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMorphology._(_ret, retain: true, release: true); + NSPointerFunctions init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - static NSMorphology new1() { - final _ret = _objc_msgSend_2(_class_NSMorphology, _sel_new); - return NSMorphology._(_ret, retain: false, release: true); + static NSPointerFunctions new1() { + final _ret = _objc_msgSend_40(_class_NSPointerFunctions, _sel_new); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } - static NSMorphology allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSPointerFunctions allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSMorphology, _sel_allocWithZone_, zone); - return NSMorphology._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSPointerFunctions, _sel_allocWithZone_, zone); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } - static NSMorphology alloc() { - final _ret = _objc_msgSend_2(_class_NSMorphology, _sel_alloc); - return NSMorphology._(_ret, retain: false, release: true); + static NSPointerFunctions alloc() { + final _ret = _objc_msgSend_40(_class_NSPointerFunctions, _sel_alloc); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMorphology, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPointerFunctions, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMorphology, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPointerFunctions, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMorphology, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSPointerFunctions, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMorphology, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSPointerFunctions, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMorphology, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPointerFunctions, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMorphology, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPointerFunctions, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMorphology, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPointerFunctions, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMorphology, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPointerFunctions, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSMorphology, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSPointerFunctions, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSMorphology = objc.getClass("NSMorphology"); - -abstract class NSGrammaticalGender { - static const int NSGrammaticalGenderNotSet = 0; - static const int NSGrammaticalGenderFeminine = 1; - static const int NSGrammaticalGenderMasculine = 2; - static const int NSGrammaticalGenderNeuter = 3; -} - -late final _sel_grammaticalGender = objc.registerName("grammaticalGender"); -final _objc_msgSend_891 = objc.msgSendPointer +late final _class_NSPointerFunctions = objc.getClass("NSPointerFunctions"); +late final _sel_pointerFunctionsWithOptions_ = + objc.registerName("pointerFunctionsWithOptions:"); +final _objc_msgSend_463 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_hashFunction = objc.registerName("hashFunction"); +final _objc_msgSend_464 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer, ffi.Pointer)>>)>> Function( + ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setGrammaticalGender_ = - objc.registerName("setGrammaticalGender:"); -final _objc_msgSend_892 = 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_465 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + 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)>(); - -abstract class NSGrammaticalPartOfSpeech { - static const int NSGrammaticalPartOfSpeechNotSet = 0; - static const int NSGrammaticalPartOfSpeechDeterminer = 1; - static const int NSGrammaticalPartOfSpeechPronoun = 2; - static const int NSGrammaticalPartOfSpeechLetter = 3; - static const int NSGrammaticalPartOfSpeechAdverb = 4; - static const int NSGrammaticalPartOfSpeechParticle = 5; - static const int NSGrammaticalPartOfSpeechAdjective = 6; - static const int NSGrammaticalPartOfSpeechAdposition = 7; - static const int NSGrammaticalPartOfSpeechVerb = 8; - static const int NSGrammaticalPartOfSpeechNoun = 9; - static const int NSGrammaticalPartOfSpeechConjunction = 10; - static const int NSGrammaticalPartOfSpeechNumeral = 11; - static const int NSGrammaticalPartOfSpeechInterjection = 12; - static const int NSGrammaticalPartOfSpeechPreposition = 13; - static const int NSGrammaticalPartOfSpeechAbbreviation = 14; -} - -late final _sel_partOfSpeech = objc.registerName("partOfSpeech"); -final _objc_msgSend_893 = 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_466 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer)>>)>> Function( + ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setPartOfSpeech_ = objc.registerName("setPartOfSpeech:"); -final _objc_msgSend_894 = 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_467 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + 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)>(); - -abstract class NSGrammaticalNumber { - static const int NSGrammaticalNumberNotSet = 0; - static const int NSGrammaticalNumberSingular = 1; - static const int NSGrammaticalNumberZero = 2; - static const int NSGrammaticalNumberPlural = 3; - static const int NSGrammaticalNumberPluralTwo = 4; - static const int NSGrammaticalNumberPluralFew = 5; - static const int NSGrammaticalNumberPluralMany = 6; -} - -late final _sel_number = objc.registerName("number"); -final _objc_msgSend_895 = 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_468 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(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_896 = 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_469 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); - -abstract class NSGrammaticalCase { - static const int NSGrammaticalCaseNotSet = 0; - static const int NSGrammaticalCaseNominative = 1; - static const int NSGrammaticalCaseAccusative = 2; - static const int NSGrammaticalCaseDative = 3; - static const int NSGrammaticalCaseGenitive = 4; - static const int NSGrammaticalCasePrepositional = 5; - static const int NSGrammaticalCaseAblative = 6; - static const int NSGrammaticalCaseAdessive = 7; - static const int NSGrammaticalCaseAllative = 8; - static const int NSGrammaticalCaseElative = 9; - static const int NSGrammaticalCaseIllative = 10; - static const int NSGrammaticalCaseEssive = 11; - static const int NSGrammaticalCaseInessive = 12; - static const int NSGrammaticalCaseLocative = 13; - static const int NSGrammaticalCaseTranslative = 14; -} - -late final _sel_grammaticalCase = objc.registerName("grammaticalCase"); -final _objc_msgSend_897 = 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_470 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer)>> Function( + ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setGrammaticalCase_ = objc.registerName("setGrammaticalCase:"); -final _objc_msgSend_898 = 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_471 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + 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_472 = 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_473 = 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_474 = 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_475 = 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, int)>(); - -abstract class NSGrammaticalDetermination { - static const int NSGrammaticalDeterminationNotSet = 0; - static const int NSGrammaticalDeterminationIndependent = 1; - static const int NSGrammaticalDeterminationDependent = 2; -} - -late final _sel_determination = objc.registerName("determination"); -final _objc_msgSend_899 = objc.msgSendPointer + 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_476 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDetermination_ = objc.registerName("setDetermination:"); -final _objc_msgSend_900 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_pointerArrayWithOptions_ = + objc.registerName("pointerArrayWithOptions:"); +final _objc_msgSend_477 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Int32)>>() .asFunction< - void Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int)>(); - -abstract class NSGrammaticalPerson { - static const int NSGrammaticalPersonNotSet = 0; - static const int NSGrammaticalPersonFirst = 1; - static const int NSGrammaticalPersonSecond = 2; - static const int NSGrammaticalPersonThird = 3; -} - -late final _sel_grammaticalPerson = objc.registerName("grammaticalPerson"); -final _objc_msgSend_901 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setGrammaticalPerson_ = - objc.registerName("setGrammaticalPerson:"); -final _objc_msgSend_902 = objc.msgSendPointer +late final _sel_pointerArrayWithPointerFunctions_ = + objc.registerName("pointerArrayWithPointerFunctions:"); +final _objc_msgSend_478 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); - -abstract class NSGrammaticalPronounType { - static const int NSGrammaticalPronounTypeNotSet = 0; - static const int NSGrammaticalPronounTypePersonal = 1; - static const int NSGrammaticalPronounTypeReflexive = 2; - static const int NSGrammaticalPronounTypePossessive = 3; -} - -late final _sel_pronounType = objc.registerName("pronounType"); -final _objc_msgSend_903 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_pointerFunctions = objc.registerName("pointerFunctions"); +final _objc_msgSend_479 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setPronounType_ = objc.registerName("setPronounType:"); -final _objc_msgSend_904 = objc.msgSendPointer +late final _sel_pointerAtIndex_ = objc.registerName("pointerAtIndex:"); +final _objc_msgSend_480 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - void Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, int)>(); - -abstract class NSGrammaticalDefiniteness { - static const int NSGrammaticalDefinitenessNotSet = 0; - static const int NSGrammaticalDefinitenessIndefinite = 1; - static const int NSGrammaticalDefinitenessDefinite = 2; -} - -late final _sel_definiteness = objc.registerName("definiteness"); -final _objc_msgSend_905 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDefiniteness_ = objc.registerName("setDefiniteness:"); -final _objc_msgSend_906 = objc.msgSendPointer +late final _sel_addPointer_ = objc.registerName("addPointer:"); +final _objc_msgSend_481 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, int)>(); - -class NSMorphologyCustomPronoun extends NSObject { - NSMorphologyCustomPronoun._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMorphologyCustomPronoun] that points to the same underlying object as [other]. - static NSMorphologyCustomPronoun castFrom( - T other) { - return NSMorphologyCustomPronoun._(other.pointer, - retain: true, release: true); - } - - /// Returns a [NSMorphologyCustomPronoun] that wraps the given raw object pointer. - static NSMorphologyCustomPronoun castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSMorphologyCustomPronoun._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMorphologyCustomPronoun]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMorphologyCustomPronoun); - } - - static bool isSupportedForLanguage_(NSString language) { - return _objc_msgSend_64(_class_NSMorphologyCustomPronoun, - _sel_isSupportedForLanguage_, language.pointer); - } - - static NSArray requiredKeysForLanguage_(NSString language) { - final _ret = _objc_msgSend_358(_class_NSMorphologyCustomPronoun, - _sel_requiredKeysForLanguage_, language.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSString? get subjectForm { - final _ret = _objc_msgSend_44(this.pointer, _sel_subjectForm); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set subjectForm(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setSubjectForm_, value?.pointer ?? ffi.nullptr); - } - - NSString? get objectForm { - final _ret = _objc_msgSend_44(this.pointer, _sel_objectForm); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set objectForm(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setObjectForm_, value?.pointer ?? ffi.nullptr); - } - - NSString? get possessiveForm { - final _ret = _objc_msgSend_44(this.pointer, _sel_possessiveForm); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set possessiveForm(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setPossessiveForm_, value?.pointer ?? ffi.nullptr); - } - - NSString? get possessiveAdjectiveForm { - final _ret = _objc_msgSend_44(this.pointer, _sel_possessiveAdjectiveForm); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set possessiveAdjectiveForm(NSString? value) { - return _objc_msgSend_545(this.pointer, _sel_setPossessiveAdjectiveForm_, - value?.pointer ?? ffi.nullptr); - } - - NSString? get reflexiveForm { - final _ret = _objc_msgSend_44(this.pointer, _sel_reflexiveForm); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set reflexiveForm(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setReflexiveForm_, value?.pointer ?? ffi.nullptr); - } - - @override - NSMorphologyCustomPronoun init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMorphologyCustomPronoun._(_ret, retain: true, release: true); - } - - static NSMorphologyCustomPronoun new1() { - final _ret = _objc_msgSend_2(_class_NSMorphologyCustomPronoun, _sel_new); - return NSMorphologyCustomPronoun._(_ret, retain: false, release: true); - } - - static NSMorphologyCustomPronoun allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSMorphologyCustomPronoun, _sel_allocWithZone_, zone); - return NSMorphologyCustomPronoun._(_ret, retain: false, release: true); - } - - static NSMorphologyCustomPronoun alloc() { - final _ret = _objc_msgSend_2(_class_NSMorphologyCustomPronoun, _sel_alloc); - return NSMorphologyCustomPronoun._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMorphologyCustomPronoun, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMorphologyCustomPronoun, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMorphologyCustomPronoun, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSMorphologyCustomPronoun, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMorphologyCustomPronoun, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMorphologyCustomPronoun, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMorphologyCustomPronoun, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMorphologyCustomPronoun, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSMorphologyCustomPronoun, _sel_classForKeyedUnarchiver); - return NSObject._(_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:"); -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_907 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removePointerAtIndex_ = + objc.registerName("removePointerAtIndex:"); +late final _sel_insertPointer_atIndex_ = + objc.registerName("insertPointer:atIndex:"); +final _objc_msgSend_482 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setCustomPronoun_forLanguage_error_ = - objc.registerName("setCustomPronoun:forLanguage:error:"); -final _objc_msgSend_908 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_replacePointerAtIndex_withPointer_ = + objc.registerName("replacePointerAtIndex:withPointer:"); +final _objc_msgSend_483 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.UnsignedLong, + ffi.Pointer)>>() .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); -late final _sel_isUnspecified = objc.registerName("isUnspecified"); -late final _sel_userMorphology = objc.registerName("userMorphology"); -final _objc_msgSend_909 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, int, ffi.Pointer)>(); +late final _sel_compact = objc.registerName("compact"); +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_484 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -45088,1643 +21610,2100 @@ final _objc_msgSend_909 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); +late final _sel_weakObjectsPointerArray = + objc.registerName("weakObjectsPointerArray"); +late final _sel_allObjects = objc.registerName("allObjects"); -class NSOperationQueue extends NSObject { - NSOperationQueue._(ffi.Pointer pointer, +class NSProcessInfo extends objc.NSObject { + NSProcessInfo._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSOperationQueue] that points to the same underlying object as [other]. - static NSOperationQueue castFrom(T other) { - return NSOperationQueue._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSProcessInfo] that points to the same underlying object as [other]. + NSProcessInfo.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSOperationQueue] that wraps the given raw object pointer. - static NSOperationQueue castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperationQueue._(other, retain: retain, release: release); - } + /// Constructs a [NSProcessInfo] that wraps the given raw object pointer. + NSProcessInfo.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSOperationQueue]. + /// Returns whether [obj] is an instance of [NSProcessInfo]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSOperationQueue); - } - - NSProgress get progress { - final _ret = _objc_msgSend_879(this.pointer, _sel_progress); - return NSProgress._(_ret, retain: true, release: true); - } - - void addOperation_(NSOperation op) { - _objc_msgSend_910(this.pointer, _sel_addOperation_, op.pointer); - } - - void addOperations_waitUntilFinished_(NSArray ops, bool wait) { - _objc_msgSend_913( - this.pointer, _sel_addOperations_waitUntilFinished_, ops.pointer, wait); - } - - void addOperationWithBlock_(ObjCBlock_ffiVoid block) { - _objc_msgSend_532(this.pointer, _sel_addOperationWithBlock_, block.pointer); - } - - void addBarrierBlock_(ObjCBlock_ffiVoid barrier) { - _objc_msgSend_532(this.pointer, _sel_addBarrierBlock_, barrier.pointer); - } - - int get maxConcurrentOperationCount { - return _objc_msgSend_83(this.pointer, _sel_maxConcurrentOperationCount); - } - - set maxConcurrentOperationCount(int value) { - return _objc_msgSend_635( - this.pointer, _sel_setMaxConcurrentOperationCount_, value); - } - - bool get suspended { - return _objc_msgSend_12(this.pointer, _sel_isSuspended); - } - - set suspended(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setSuspended_, value); - } - - NSString? get name { - final _ret = _objc_msgSend_44(this.pointer, _sel_name); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set name(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); - } - - int get qualityOfService { - return _objc_msgSend_543(this.pointer, _sel_qualityOfService); - } - - set qualityOfService(int value) { - return _objc_msgSend_544(this.pointer, _sel_setQualityOfService_, value); - } - - NSObject? get underlyingQueue { - final _ret = _objc_msgSend_914(this.pointer, _sel_underlyingQueue); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set underlyingQueue(NSObject? value) { - return _objc_msgSend_915( - this.pointer, _sel_setUnderlyingQueue_, value?.pointer ?? ffi.nullptr); - } - - void cancelAllOperations() { - _objc_msgSend_1(this.pointer, _sel_cancelAllOperations); - } - - void waitUntilAllOperationsAreFinished() { - _objc_msgSend_1(this.pointer, _sel_waitUntilAllOperationsAreFinished); - } - - static NSOperationQueue? getCurrentQueue() { - final _ret = _objc_msgSend_916(_class_NSOperationQueue, _sel_currentQueue); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, retain: true, release: true); - } - - static NSOperationQueue getMainQueue() { - final _ret = _objc_msgSend_917(_class_NSOperationQueue, _sel_mainQueue); - return NSOperationQueue._(_ret, retain: true, release: true); - } - - NSArray get operations { - final _ret = _objc_msgSend_85(this.pointer, _sel_operations); - return NSArray._(_ret, retain: true, release: true); - } - - int get operationCount { - return _objc_msgSend_10(this.pointer, _sel_operationCount); - } - - @override - NSOperationQueue init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSOperationQueue._(_ret, retain: true, release: true); - } - - static NSOperationQueue new1() { - final _ret = _objc_msgSend_2(_class_NSOperationQueue, _sel_new); - return NSOperationQueue._(_ret, retain: false, release: true); + obj.pointer, _sel_isKindOfClass_, _class_NSProcessInfo); } - static NSOperationQueue allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSOperationQueue, _sel_allocWithZone_, zone); - return NSOperationQueue._(_ret, retain: false, release: true); + static NSProcessInfo getProcessInfo() { + final _ret = _objc_msgSend_485(_class_NSProcessInfo, _sel_processInfo); + return NSProcessInfo.castFromPointer(_ret, retain: true, release: true); } - static NSOperationQueue alloc() { - final _ret = _objc_msgSend_2(_class_NSOperationQueue, _sel_alloc); - return NSOperationQueue._(_ret, retain: false, release: true); + objc.NSDictionary get environment { + final _ret = _objc_msgSend_112(this.pointer, _sel_environment); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSOperationQueue, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + objc.NSArray get arguments { + final _ret = _objc_msgSend_6(this.pointer, _sel_arguments); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSOperationQueue, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + objc.NSString get hostName { + final _ret = _objc_msgSend_12(this.pointer, _sel_hostName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSOperationQueue, _sel_accessInstanceVariablesDirectly); + objc.NSString get processName { + final _ret = _objc_msgSend_12(this.pointer, _sel_processName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSOperationQueue, _sel_useStoredAccessor); + set processName(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setProcessName_, value.pointer); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSOperationQueue, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + int get processIdentifier { + return _objc_msgSend_264(this.pointer, _sel_processIdentifier); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSOperationQueue, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + objc.NSString get globallyUniqueString { + final _ret = _objc_msgSend_12(this.pointer, _sel_globallyUniqueString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSOperationQueue, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + int operatingSystem() { + return _objc_msgSend_29(this.pointer, _sel_operatingSystem); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSOperationQueue, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + objc.NSString operatingSystemName() { + final _ret = _objc_msgSend_12(this.pointer, _sel_operatingSystemName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + objc.NSString get operatingSystemVersionString { final _ret = - _objc_msgSend_2(_class_NSOperationQueue, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSOperationQueue = objc.getClass("NSOperationQueue"); - -class NSOperation extends NSObject { - NSOperation._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSOperation] that points to the same underlying object as [other]. - static NSOperation castFrom(T other) { - return NSOperation._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSOperation] that wraps the given raw object pointer. - static NSOperation castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperation._(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); - } - - void start() { - _objc_msgSend_1(this.pointer, _sel_start); + _objc_msgSend_12(this.pointer, _sel_operatingSystemVersionString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void main() { - _objc_msgSend_1(this.pointer, _sel_main); + void getOperatingSystemVersion(ffi.Pointer stret) { + objc.useMsgSendVariants + ? _objc_msgSend_486Stret( + stret, this.pointer, _sel_operatingSystemVersion) + : stret.ref = + _objc_msgSend_486(this.pointer, _sel_operatingSystemVersion); } - bool get cancelled { - return _objc_msgSend_12(this.pointer, _sel_isCancelled); + int get processorCount { + return _objc_msgSend_29(this.pointer, _sel_processorCount); } - void cancel() { - _objc_msgSend_1(this.pointer, _sel_cancel); + int get activeProcessorCount { + return _objc_msgSend_29(this.pointer, _sel_activeProcessorCount); } - bool get executing { - return _objc_msgSend_12(this.pointer, _sel_isExecuting); + int get physicalMemory { + return _objc_msgSend_267(this.pointer, _sel_physicalMemory); } - bool get finished { - return _objc_msgSend_12(this.pointer, _sel_isFinished); + bool isOperatingSystemAtLeastVersion_(NSOperatingSystemVersion version) { + return _objc_msgSend_487( + this.pointer, _sel_isOperatingSystemAtLeastVersion_, version); } - bool get concurrent { - return _objc_msgSend_12(this.pointer, _sel_isConcurrent); + double get systemUptime { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_systemUptime) + : _objc_msgSend_115(this.pointer, _sel_systemUptime); } - bool get asynchronous { - return _objc_msgSend_12(this.pointer, _sel_isAsynchronous); + void disableSuddenTermination() { + _objc_msgSend_82(this.pointer, _sel_disableSuddenTermination); } - bool get ready { - return _objc_msgSend_12(this.pointer, _sel_isReady); + void enableSuddenTermination() { + _objc_msgSend_82(this.pointer, _sel_enableSuddenTermination); } - void addDependency_(NSOperation op) { - _objc_msgSend_910(this.pointer, _sel_addDependency_, op.pointer); + void disableAutomaticTermination_(objc.NSString reason) { + _objc_msgSend_98( + this.pointer, _sel_disableAutomaticTermination_, reason.pointer); } - void removeDependency_(NSOperation op) { - _objc_msgSend_910(this.pointer, _sel_removeDependency_, op.pointer); + void enableAutomaticTermination_(objc.NSString reason) { + _objc_msgSend_98( + this.pointer, _sel_enableAutomaticTermination_, reason.pointer); } - NSArray get dependencies { - final _ret = _objc_msgSend_85(this.pointer, _sel_dependencies); - return NSArray._(_ret, retain: true, release: true); + bool get automaticTerminationSupportEnabled { + return _objc_msgSend_7( + this.pointer, _sel_automaticTerminationSupportEnabled); } - int get queuePriority { - return _objc_msgSend_911(this.pointer, _sel_queuePriority); + set automaticTerminationSupportEnabled(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAutomaticTerminationSupportEnabled_, value); } - set queuePriority(int value) { - return _objc_msgSend_912(this.pointer, _sel_setQueuePriority_, value); + objc.NSObject beginActivityWithOptions_reason_( + int options, objc.NSString reason) { + final _ret = _objc_msgSend_488(this.pointer, + _sel_beginActivityWithOptions_reason_, options, reason.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - ObjCBlock_ffiVoid? get completionBlock { - final _ret = _objc_msgSend_668(this.pointer, _sel_completionBlock); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid._(_ret, retain: true, release: true); + void endActivity_(objc.NSObject activity) { + _objc_msgSend_49(this.pointer, _sel_endActivity_, activity.pointer); } - set completionBlock(ObjCBlock_ffiVoid? value) { - return _objc_msgSend_669( - this.pointer, _sel_setCompletionBlock_, value?.pointer ?? ffi.nullptr); + void performActivityWithOptions_reason_usingBlock_( + int options, objc.NSString reason, ObjCBlock_ffiVoid block) { + _objc_msgSend_489( + this.pointer, + _sel_performActivityWithOptions_reason_usingBlock_, + options, + reason.pointer, + block.pointer); } - void waitUntilFinished() { - _objc_msgSend_1(this.pointer, _sel_waitUntilFinished); + void performExpiringActivityWithReason_usingBlock_( + objc.NSString reason, ObjCBlock_ffiVoid_bool block) { + _objc_msgSend_490( + this.pointer, + _sel_performExpiringActivityWithReason_usingBlock_, + reason.pointer, + block.pointer); } - double get threadPriority { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_threadPriority) - : _objc_msgSend_165(this.pointer, _sel_threadPriority); + objc.NSString get userName { + final _ret = _objc_msgSend_12(this.pointer, _sel_userName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set threadPriority(double value) { - return _objc_msgSend_542(this.pointer, _sel_setThreadPriority_, value); + objc.NSString get fullUserName { + final _ret = _objc_msgSend_12(this.pointer, _sel_fullUserName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get qualityOfService { - return _objc_msgSend_543(this.pointer, _sel_qualityOfService); + int get thermalState { + return _objc_msgSend_491(this.pointer, _sel_thermalState); } - set qualityOfService(int value) { - return _objc_msgSend_544(this.pointer, _sel_setQualityOfService_, value); + bool get lowPowerModeEnabled { + return _objc_msgSend_7(this.pointer, _sel_isLowPowerModeEnabled); } - NSString? get name { - final _ret = _objc_msgSend_44(this.pointer, _sel_name); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + bool get macCatalystApp { + return _objc_msgSend_7(this.pointer, _sel_isMacCatalystApp); } - set name(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); + bool get iOSAppOnMac { + return _objc_msgSend_7(this.pointer, _sel_isiOSAppOnMac); } @override - NSOperation init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSOperation._(_ret, retain: true, release: true); + NSProcessInfo init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSProcessInfo.castFromPointer(_ret, retain: true, release: true); } - static NSOperation new1() { - final _ret = _objc_msgSend_2(_class_NSOperation, _sel_new); - return NSOperation._(_ret, retain: false, release: true); + static NSProcessInfo new1() { + final _ret = _objc_msgSend_40(_class_NSProcessInfo, _sel_new); + return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } - static NSOperation allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSOperation, _sel_allocWithZone_, zone); - return NSOperation._(_ret, retain: false, release: true); + static NSProcessInfo allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSProcessInfo, _sel_allocWithZone_, zone); + return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } - static NSOperation alloc() { - final _ret = _objc_msgSend_2(_class_NSOperation, _sel_alloc); - return NSOperation._(_ret, retain: false, release: true); + static NSProcessInfo alloc() { + final _ret = _objc_msgSend_40(_class_NSProcessInfo, _sel_alloc); + return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSOperation, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSProcessInfo, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSOperation, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSProcessInfo, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSOperation, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSProcessInfo, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSOperation, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSProcessInfo, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSOperation, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSProcessInfo, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSOperation, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSProcessInfo, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSOperation, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSProcessInfo, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSOperation, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSProcessInfo, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSOperation, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSProcessInfo, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSOperation = objc.getClass("NSOperation"); -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_910 = objc.msgSendPointer +late final _class_NSProcessInfo = objc.getClass("NSProcessInfo"); +late final _sel_processInfo = objc.registerName("processInfo"); +final _objc_msgSend_485 = 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_removeDependency_ = objc.registerName("removeDependency:"); -late final _sel_dependencies = objc.registerName("dependencies"); + 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"); -abstract class NSOperationQueuePriority { - static const int NSOperationQueuePriorityVeryLow = -8; - static const int NSOperationQueuePriorityLow = -4; - static const int NSOperationQueuePriorityNormal = 0; - static const int NSOperationQueuePriorityHigh = 4; - static const int NSOperationQueuePriorityVeryHigh = 8; +final class NSOperatingSystemVersion extends ffi.Struct { + @ffi.Long() + external int majorVersion; + + @ffi.Long() + external int minorVersion; + + @ffi.Long() + external int patchVersion; } -late final _sel_queuePriority = objc.registerName("queuePriority"); -final _objc_msgSend_911 = objc.msgSendPointer +late final _sel_operatingSystemVersion = + objc.registerName("operatingSystemVersion"); +final _objc_msgSend_486 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + NSOperatingSystemVersion Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( + NSOperatingSystemVersion Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setQueuePriority_ = objc.registerName("setQueuePriority:"); -final _objc_msgSend_912 = objc.msgSendPointer +final _objc_msgSend_486Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .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_addOperation_ = objc.registerName("addOperation:"); -late final _sel_addOperations_waitUntilFinished_ = - objc.registerName("addOperations:waitUntilFinished:"); -final _objc_msgSend_913 = 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_487 = 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:"); + +abstract class NSActivityOptions { + static const int NSActivityIdleDisplaySleepDisabled = 1099511627776; + static const int NSActivityIdleSystemSleepDisabled = 1048576; + static const int NSActivitySuddenTerminationDisabled = 16384; + static const int NSActivityAutomaticTerminationDisabled = 32768; + static const int NSActivityAnimationTrackingEnabled = 35184372088832; + static const int NSActivityTrackingEnabled = 70368744177664; + static const int NSActivityUserInitiated = 16777215; + static const int NSActivityUserInitiatedAllowingIdleSystemSleep = 15728639; + static const int NSActivityBackground = 255; + static const int NSActivityLatencyCritical = 1095216660480; + static const int NSActivityUserInteractive = 1095233437695; +} + +late final _sel_beginActivityWithOptions_reason_ = + objc.registerName("beginActivityWithOptions:reason:"); +final _objc_msgSend_488 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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_489 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer, - ffi.Bool)>>() + ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, + int, 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_914 = 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_915 = objc.msgSendPointer + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_bool_fnPtrTrampoline( + ffi.Pointer block, bool arg0) => + block.ref.target + .cast>() + .asFunction()(arg0); +final _ObjCBlock_ffiVoid_bool_closureRegistry = {}; +int _ObjCBlock_ffiVoid_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_bool_registerClosure( + void Function(bool) fn) { + final id = ++_ObjCBlock_ffiVoid_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_bool_closureTrampoline( + ffi.Pointer block, bool arg0) => + _ObjCBlock_ffiVoid_bool_closureRegistry[block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_bool._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_bool._(pointer, retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_bool.fromFunctionPointer( + ffi.Pointer> ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_bool.fromFunction(void Function(bool) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_bool_registerClosure((bool arg0) => fn(arg0)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_bool.listener(void Function(bool) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Bool)>.listener( + _ObjCBlock_ffiVoid_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_bool_registerClosure((bool arg0) => fn(arg0)))); + static ffi + .NativeCallable, ffi.Bool)>? + _dartFuncListenerTrampoline; + + void call(bool arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, ffi.Bool arg0)>>() + .asFunction, bool)>()( + pointer, arg0); +} + +late final _sel_performExpiringActivityWithReason_usingBlock_ = + objc.registerName("performExpiringActivityWithReason:usingBlock:"); +final _objc_msgSend_490 = 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_916 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_mainQueue = objc.registerName("mainQueue"); -final _objc_msgSend_917 = objc.msgSendPointer + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_userName = objc.registerName("userName"); +late final _sel_fullUserName = objc.registerName("fullUserName"); + +abstract class NSProcessInfoThermalState { + static const int NSProcessInfoThermalStateNominal = 0; + static const int NSProcessInfoThermalStateFair = 1; + static const int NSProcessInfoThermalStateSerious = 2; + static const int NSProcessInfoThermalStateCritical = 3; +} + +late final _sel_thermalState = objc.registerName("thermalState"); +final _objc_msgSend_491 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Int32 Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_operations = objc.registerName("operations"); -late final _sel_operationCount = objc.registerName("operationCount"); +late final _sel_isLowPowerModeEnabled = + objc.registerName("isLowPowerModeEnabled"); +late final _sel_isMacCatalystApp = objc.registerName("isMacCatalystApp"); +late final _sel_isiOSAppOnMac = objc.registerName("isiOSAppOnMac"); -class NSPointerArray extends NSObject { - NSPointerArray._(ffi.Pointer pointer, +class NSTextCheckingResult extends objc.NSObject { + NSTextCheckingResult._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSPointerArray] that points to the same underlying object as [other]. - static NSPointerArray castFrom(T other) { - return NSPointerArray._(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.pointer, retain: true, release: true); - /// Returns a [NSPointerArray] that wraps the given raw object pointer. - static NSPointerArray castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPointerArray._(other, retain: retain, release: release); - } + /// 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 [NSPointerArray]. + /// Returns whether [obj] is an instance of [NSTextCheckingResult]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSPointerArray); + obj.pointer, _sel_isKindOfClass_, _class_NSTextCheckingResult); } - NSPointerArray initWithOptions_(int options) { - final _ret = - _objc_msgSend_918(this.pointer, _sel_initWithOptions_, options); - return NSPointerArray._(_ret, retain: true, release: true); + int get resultType { + return _objc_msgSend_492(this.pointer, _sel_resultType); } - NSPointerArray initWithPointerFunctions_(NSPointerFunctions functions) { - final _ret = _objc_msgSend_932( - this.pointer, _sel_initWithPointerFunctions_, functions.pointer); - return NSPointerArray._(_ret, retain: true, release: true); + void getRange(ffi.Pointer<_NSRange> stret) { + objc.useMsgSendVariants + ? _objc_msgSend_493Stret(stret, this.pointer, _sel_range) + : stret.ref = _objc_msgSend_493(this.pointer, _sel_range); } - static NSPointerArray pointerArrayWithOptions_(int options) { - final _ret = _objc_msgSend_933( - _class_NSPointerArray, _sel_pointerArrayWithOptions_, options); - return NSPointerArray._(_ret, retain: true, release: true); + NSOrthography? get orthography { + final _ret = _objc_msgSend_494(this.pointer, _sel_orthography); + return _ret.address == 0 + ? null + : NSOrthography.castFromPointer(_ret, retain: true, release: true); } - static NSPointerArray pointerArrayWithPointerFunctions_( - NSPointerFunctions functions) { - final _ret = _objc_msgSend_934(_class_NSPointerArray, - _sel_pointerArrayWithPointerFunctions_, functions.pointer); - return NSPointerArray._(_ret, retain: true, release: true); + objc.NSArray? get grammarDetails { + final _ret = _objc_msgSend_69(this.pointer, _sel_grammarDetails); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSPointerFunctions get pointerFunctions { - final _ret = _objc_msgSend_935(this.pointer, _sel_pointerFunctions); - return NSPointerFunctions._(_ret, retain: true, release: true); + objc.NSDate? get date { + final _ret = _objc_msgSend_116(this.pointer, _sel_date); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer pointerAtIndex_(int index) { - return _objc_msgSend_936(this.pointer, _sel_pointerAtIndex_, index); + NSTimeZone? get timeZone { + final _ret = _objc_msgSend_132(this.pointer, _sel_timeZone); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - void addPointer_(ffi.Pointer pointer) { - _objc_msgSend_52(this.pointer, _sel_addPointer_, pointer); + double get duration { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_duration) + : _objc_msgSend_115(this.pointer, _sel_duration); } - void removePointerAtIndex_(int index) { - _objc_msgSend_470(this.pointer, _sel_removePointerAtIndex_, index); + objc.NSDictionary? get components { + final _ret = _objc_msgSend_65(this.pointer, _sel_components); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - void insertPointer_atIndex_(ffi.Pointer item, int index) { - _objc_msgSend_22(this.pointer, _sel_insertPointer_atIndex_, item, index); + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void replacePointerAtIndex_withPointer_( - int index, ffi.Pointer item) { - _objc_msgSend_937( - this.pointer, _sel_replacePointerAtIndex_withPointer_, index, item); + objc.NSString? get replacementString { + final _ret = _objc_msgSend_13(this.pointer, _sel_replacementString); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void compact() { - _objc_msgSend_1(this.pointer, _sel_compact); + objc.NSArray? get alternativeStrings { + final _ret = _objc_msgSend_69(this.pointer, _sel_alternativeStrings); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get count { - return _objc_msgSend_10(this.pointer, _sel_count); + NSRegularExpression? get regularExpression { + final _ret = _objc_msgSend_506(this.pointer, _sel_regularExpression); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - set count(int value) { - return _objc_msgSend_516(this.pointer, _sel_setCount_, value); + objc.NSString? get phoneNumber { + final _ret = _objc_msgSend_13(this.pointer, _sel_phoneNumber); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject pointerArrayWithStrongObjects() { - final _ret = _objc_msgSend_2( - _class_NSPointerArray, _sel_pointerArrayWithStrongObjects); - return NSObject._(_ret, retain: true, release: true); + int get numberOfRanges { + return _objc_msgSend_29(this.pointer, _sel_numberOfRanges); } - static NSObject pointerArrayWithWeakObjects() { - final _ret = _objc_msgSend_2( - _class_NSPointerArray, _sel_pointerArrayWithWeakObjects); - return NSObject._(_ret, retain: true, release: true); + void rangeAtIndex_(ffi.Pointer<_NSRange> stret, int idx) { + objc.useMsgSendVariants + ? _objc_msgSend_507Stret(stret, this.pointer, _sel_rangeAtIndex_, idx) + : stret.ref = _objc_msgSend_507(this.pointer, _sel_rangeAtIndex_, idx); } - static NSPointerArray strongObjectsPointerArray() { - final _ret = _objc_msgSend_938( - _class_NSPointerArray, _sel_strongObjectsPointerArray); - return NSPointerArray._(_ret, retain: true, release: true); + void rangeWithName_(ffi.Pointer<_NSRange> stret, objc.NSString name) { + objc.useMsgSendVariants + ? _objc_msgSend_508Stret( + stret, this.pointer, _sel_rangeWithName_, name.pointer) + : stret.ref = + _objc_msgSend_508(this.pointer, _sel_rangeWithName_, name.pointer); } - static NSPointerArray weakObjectsPointerArray() { - final _ret = - _objc_msgSend_938(_class_NSPointerArray, _sel_weakObjectsPointerArray); - return NSPointerArray._(_ret, retain: true, release: true); + NSTextCheckingResult resultByAdjustingRangesWithOffset_(int offset) { + final _ret = _objc_msgSend_509( + this.pointer, _sel_resultByAdjustingRangesWithOffset_, offset); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + objc.NSDictionary? get addressComponents { + final _ret = _objc_msgSend_65(this.pointer, _sel_addressComponents); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSTextCheckingResult orthographyCheckingResultWithRange_orthography_( + _NSRange range, NSOrthography orthography) { + final _ret = _objc_msgSend_510( + _class_NSTextCheckingResult, + _sel_orthographyCheckingResultWithRange_orthography_, + range, + orthography.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult spellCheckingResultWithRange_(_NSRange range) { + final _ret = _objc_msgSend_511( + _class_NSTextCheckingResult, _sel_spellCheckingResultWithRange_, range); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult grammarCheckingResultWithRange_details_( + _NSRange range, objc.NSArray details) { + final _ret = _objc_msgSend_512(_class_NSTextCheckingResult, + _sel_grammarCheckingResultWithRange_details_, range, details.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult dateCheckingResultWithRange_date_( + _NSRange range, objc.NSDate date) { + final _ret = _objc_msgSend_513(_class_NSTextCheckingResult, + _sel_dateCheckingResultWithRange_date_, range, date.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult + dateCheckingResultWithRange_date_timeZone_duration_(_NSRange range, + objc.NSDate date, NSTimeZone timeZone, double duration) { + final _ret = _objc_msgSend_514( + _class_NSTextCheckingResult, + _sel_dateCheckingResultWithRange_date_timeZone_duration_, + range, + date.pointer, + timeZone.pointer, + duration); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult addressCheckingResultWithRange_components_( + _NSRange range, objc.NSDictionary components) { + final _ret = _objc_msgSend_515( + _class_NSTextCheckingResult, + _sel_addressCheckingResultWithRange_components_, + range, + components.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult linkCheckingResultWithRange_URL_( + _NSRange range, objc.NSURL url) { + final _ret = _objc_msgSend_516(_class_NSTextCheckingResult, + _sel_linkCheckingResultWithRange_URL_, range, url.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult quoteCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_quoteCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult dashCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_dashCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult + replacementCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_replacementCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult + correctionCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_correctionCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult + correctionCheckingResultWithRange_replacementString_alternativeStrings_( + _NSRange range, + objc.NSString replacementString, + objc.NSArray alternativeStrings) { + final _ret = _objc_msgSend_518( + _class_NSTextCheckingResult, + _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_, + range, + replacementString.pointer, + alternativeStrings.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - NSArray get allObjects { - final _ret = _objc_msgSend_85(this.pointer, _sel_allObjects); - return NSArray._(_ret, retain: true, release: true); + static NSTextCheckingResult + regularExpressionCheckingResultWithRanges_count_regularExpression_( + ffi.Pointer<_NSRange> ranges, + int count, + NSRegularExpression regularExpression) { + final _ret = _objc_msgSend_519( + _class_NSTextCheckingResult, + _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_, + ranges, + count, + regularExpression.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult phoneNumberCheckingResultWithRange_phoneNumber_( + _NSRange range, objc.NSString phoneNumber) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_phoneNumberCheckingResultWithRange_phoneNumber_, + range, + phoneNumber.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult + transitInformationCheckingResultWithRange_components_( + _NSRange range, objc.NSDictionary components) { + final _ret = _objc_msgSend_515( + _class_NSTextCheckingResult, + _sel_transitInformationCheckingResultWithRange_components_, + range, + components.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } @override - NSPointerArray init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSPointerArray._(_ret, retain: true, release: true); + NSTextCheckingResult init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - static NSPointerArray new1() { - final _ret = _objc_msgSend_2(_class_NSPointerArray, _sel_new); - return NSPointerArray._(_ret, retain: false, release: true); + static NSTextCheckingResult new1() { + final _ret = _objc_msgSend_40(_class_NSTextCheckingResult, _sel_new); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } - static NSPointerArray allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSPointerArray, _sel_allocWithZone_, zone); - return NSPointerArray._(_ret, retain: false, release: true); + static NSTextCheckingResult allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSTextCheckingResult, _sel_allocWithZone_, zone); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } - static NSPointerArray alloc() { - final _ret = _objc_msgSend_2(_class_NSPointerArray, _sel_alloc); - return NSPointerArray._(_ret, retain: false, release: true); + static NSTextCheckingResult alloc() { + final _ret = _objc_msgSend_40(_class_NSTextCheckingResult, _sel_alloc); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSPointerArray, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTextCheckingResult, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSPointerArray, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTextCheckingResult, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSPointerArray, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSTextCheckingResult, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSPointerArray, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSTextCheckingResult, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSPointerArray, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTextCheckingResult, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSPointerArray, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSTextCheckingResult, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSPointerArray, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTextCheckingResult, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSPointerArray, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSTextCheckingResult, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSPointerArray, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSTextCheckingResult, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSPointerArray = objc.getClass("NSPointerArray"); +late final _class_NSTextCheckingResult = objc.getClass("NSTextCheckingResult"); -abstract class NSPointerFunctionsOptions { - static const int NSPointerFunctionsStrongMemory = 0; - static const int NSPointerFunctionsZeroingWeakMemory = 1; - static const int NSPointerFunctionsOpaqueMemory = 2; - static const int NSPointerFunctionsMallocMemory = 3; - static const int NSPointerFunctionsMachVirtualMemory = 4; - static const int NSPointerFunctionsWeakMemory = 5; - static const int NSPointerFunctionsObjectPersonality = 0; - static const int NSPointerFunctionsOpaquePersonality = 256; - static const int NSPointerFunctionsObjectPointerPersonality = 512; - static const int NSPointerFunctionsCStringPersonality = 768; - static const int NSPointerFunctionsStructPersonality = 1024; - static const int NSPointerFunctionsIntegerPersonality = 1280; - static const int NSPointerFunctionsCopyIn = 65536; +abstract class NSTextCheckingType { + static const int NSTextCheckingTypeOrthography = 1; + static const int NSTextCheckingTypeSpelling = 2; + static const int NSTextCheckingTypeGrammar = 4; + static const int NSTextCheckingTypeDate = 8; + static const int NSTextCheckingTypeAddress = 16; + static const int NSTextCheckingTypeLink = 32; + static const int NSTextCheckingTypeQuote = 64; + static const int NSTextCheckingTypeDash = 128; + static const int NSTextCheckingTypeReplacement = 256; + static const int NSTextCheckingTypeCorrection = 512; + static const int NSTextCheckingTypeRegularExpression = 1024; + static const int NSTextCheckingTypePhoneNumber = 2048; + static const int NSTextCheckingTypeTransitInformation = 4096; } -late final _sel_initWithOptions_ = objc.registerName("initWithOptions:"); -final _objc_msgSend_918 = objc.msgSendPointer +late final _sel_resultType = objc.registerName("resultType"); +final _objc_msgSend_492 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int)>(); + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_range = objc.registerName("range"); +final _objc_msgSend_493 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_493Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer)>(); +late final _sel_orthography = objc.registerName("orthography"); +final _objc_msgSend_494 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_grammarDetails = objc.registerName("grammarDetails"); +late final _sel_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"); -class NSPointerFunctions extends NSObject { - NSPointerFunctions._(ffi.Pointer pointer, +class NSRegularExpression extends objc.NSObject { + NSRegularExpression._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSPointerFunctions] that points to the same underlying object as [other]. - static NSPointerFunctions castFrom(T other) { - return NSPointerFunctions._(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.pointer, retain: true, release: true); - /// Returns a [NSPointerFunctions] that wraps the given raw object pointer. - static NSPointerFunctions castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPointerFunctions._(other, retain: retain, release: release); - } + /// 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 [NSPointerFunctions]. + /// Returns whether [obj] is an instance of [NSRegularExpression]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSPointerFunctions); - } - - NSPointerFunctions initWithOptions_(int options) { - final _ret = - _objc_msgSend_918(this.pointer, _sel_initWithOptions_, options); - return NSPointerFunctions._(_ret, retain: true, release: true); - } - - static NSPointerFunctions pointerFunctionsWithOptions_(int options) { - final _ret = _objc_msgSend_919( - _class_NSPointerFunctions, _sel_pointerFunctionsWithOptions_, options); - return NSPointerFunctions._(_ret, retain: true, release: true); - } - - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - get hashFunction { - return _objc_msgSend_920(this.pointer, _sel_hashFunction); + obj.pointer, _sel_isKindOfClass_, _class_NSRegularExpression); } - set hashFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value) { - return _objc_msgSend_921(this.pointer, _sel_setHashFunction_, value); + static NSRegularExpression? regularExpressionWithPattern_options_error_( + objc.NSString pattern, + int options, + ffi.Pointer> error) { + final _ret = _objc_msgSend_495( + _class_NSRegularExpression, + _sel_regularExpressionWithPattern_options_error_, + pattern.pointer, + options, + error); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - 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_922(this.pointer, _sel_isEqualFunction); + NSRegularExpression? initWithPattern_options_error_(objc.NSString pattern, + int options, ffi.Pointer> error) { + final _ret = _objc_msgSend_496(this.pointer, + _sel_initWithPattern_options_error_, pattern.pointer, options, error); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - 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_923(this.pointer, _sel_setIsEqualFunction_, value); + objc.NSString get pattern { + final _ret = _objc_msgSend_12(this.pointer, _sel_pattern); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer< - ffi.NativeFunction)>> - get sizeFunction { - return _objc_msgSend_924(this.pointer, _sel_sizeFunction); + int get options { + return _objc_msgSend_497(this.pointer, _sel_options); } - set sizeFunction( - ffi.Pointer< - ffi - .NativeFunction)>> - value) { - return _objc_msgSend_925(this.pointer, _sel_setSizeFunction_, value); + int get numberOfCaptureGroups { + return _objc_msgSend_29(this.pointer, _sel_numberOfCaptureGroups); } - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - get descriptionFunction { - return _objc_msgSend_926(this.pointer, _sel_descriptionFunction); + static objc.NSString escapedPatternForString_(objc.NSString string) { + final _ret = _objc_msgSend_297(_class_NSRegularExpression, + _sel_escapedPatternForString_, string.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set descriptionFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - value) { - return _objc_msgSend_927(this.pointer, _sel_setDescriptionFunction_, value); + void enumerateMatchesInString_options_range_usingBlock_( + objc.NSString string, + int options, + _NSRange range, + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool block) { + _objc_msgSend_498( + this.pointer, + _sel_enumerateMatchesInString_options_range_usingBlock_, + string.pointer, + options, + range, + block.pointer); } - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - get relinquishFunction { - return _objc_msgSend_928(this.pointer, _sel_relinquishFunction); + objc.NSArray matchesInString_options_range_( + objc.NSString string, int options, _NSRange range) { + final _ret = _objc_msgSend_499(this.pointer, + _sel_matchesInString_options_range_, string.pointer, options, range); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set relinquishFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value) { - return _objc_msgSend_929(this.pointer, _sel_setRelinquishFunction_, value); + int numberOfMatchesInString_options_range_( + objc.NSString string, int options, _NSRange range) { + return _objc_msgSend_500( + this.pointer, + _sel_numberOfMatchesInString_options_range_, + string.pointer, + options, + range); } - 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_930(this.pointer, _sel_acquireFunction); + NSTextCheckingResult? firstMatchInString_options_range_( + objc.NSString string, int options, _NSRange range) { + final _ret = _objc_msgSend_501(this.pointer, + _sel_firstMatchInString_options_range_, string.pointer, options, range); + return _ret.address == 0 + ? null + : NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - 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_931(this.pointer, _sel_setAcquireFunction_, value); + void rangeOfFirstMatchInString_options_range_(ffi.Pointer<_NSRange> stret, + objc.NSString string, int options, _NSRange range) { + objc.useMsgSendVariants + ? _objc_msgSend_502Stret( + stret, + this.pointer, + _sel_rangeOfFirstMatchInString_options_range_, + string.pointer, + options, + range) + : stret.ref = _objc_msgSend_502( + this.pointer, + _sel_rangeOfFirstMatchInString_options_range_, + string.pointer, + options, + range); } - bool get usesStrongWriteBarrier { - return _objc_msgSend_12(this.pointer, _sel_usesStrongWriteBarrier); + objc.NSString stringByReplacingMatchesInString_options_range_withTemplate_( + objc.NSString string, int options, _NSRange range, objc.NSString templ) { + final _ret = _objc_msgSend_503( + this.pointer, + _sel_stringByReplacingMatchesInString_options_range_withTemplate_, + string.pointer, + options, + range, + templ.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set usesStrongWriteBarrier(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setUsesStrongWriteBarrier_, value); + int replaceMatchesInString_options_range_withTemplate_( + objc.NSMutableString string, + int options, + _NSRange range, + objc.NSString templ) { + return _objc_msgSend_504( + this.pointer, + _sel_replaceMatchesInString_options_range_withTemplate_, + string.pointer, + options, + range, + templ.pointer); } - bool get usesWeakReadAndWriteBarriers { - return _objc_msgSend_12(this.pointer, _sel_usesWeakReadAndWriteBarriers); + objc.NSString replacementStringForResult_inString_offset_template_( + NSTextCheckingResult result, + objc.NSString string, + int offset, + objc.NSString templ) { + final _ret = _objc_msgSend_505( + this.pointer, + _sel_replacementStringForResult_inString_offset_template_, + result.pointer, + string.pointer, + offset, + templ.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set usesWeakReadAndWriteBarriers(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setUsesWeakReadAndWriteBarriers_, value); + static objc.NSString escapedTemplateForString_(objc.NSString string) { + final _ret = _objc_msgSend_297(_class_NSRegularExpression, + _sel_escapedTemplateForString_, string.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } @override - NSPointerFunctions init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSPointerFunctions._(_ret, retain: true, release: true); + NSRegularExpression init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - static NSPointerFunctions new1() { - final _ret = _objc_msgSend_2(_class_NSPointerFunctions, _sel_new); - return NSPointerFunctions._(_ret, retain: false, release: true); + static NSRegularExpression new1() { + final _ret = _objc_msgSend_40(_class_NSRegularExpression, _sel_new); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } - static NSPointerFunctions allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSRegularExpression allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSPointerFunctions, _sel_allocWithZone_, zone); - return NSPointerFunctions._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSRegularExpression, _sel_allocWithZone_, zone); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } - static NSPointerFunctions alloc() { - final _ret = _objc_msgSend_2(_class_NSPointerFunctions, _sel_alloc); - return NSPointerFunctions._(_ret, retain: false, release: true); + static NSRegularExpression alloc() { + final _ret = _objc_msgSend_40(_class_NSRegularExpression, _sel_alloc); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSPointerFunctions, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSRegularExpression, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSPointerFunctions, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSRegularExpression, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSPointerFunctions, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSRegularExpression, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSPointerFunctions, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSRegularExpression, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSPointerFunctions, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSRegularExpression, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSPointerFunctions, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSRegularExpression, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSPointerFunctions, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSRegularExpression, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSPointerFunctions, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSRegularExpression, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSRegularExpression, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSRegularExpression = objc.getClass("NSRegularExpression"); + +abstract class NSRegularExpressionOptions { + static const int NSRegularExpressionCaseInsensitive = 1; + static const int NSRegularExpressionAllowCommentsAndWhitespace = 2; + static const int NSRegularExpressionIgnoreMetacharacters = 4; + static const int NSRegularExpressionDotMatchesLineSeparators = 8; + static const int NSRegularExpressionAnchorsMatchLines = 16; + static const int NSRegularExpressionUseUnixLineSeparators = 32; + static const int NSRegularExpressionUseUnicodeWordBoundaries = 64; +} + +late final _sel_regularExpressionWithPattern_options_error_ = + objc.registerName("regularExpressionWithPattern:options:error:"); +final _objc_msgSend_495 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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_496 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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_497 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 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:"); + +abstract class NSMatchingOptions { + static const int NSMatchingReportProgress = 1; + static const int NSMatchingReportCompletion = 2; + static const int NSMatchingAnchored = 4; + static const int NSMatchingWithTransparentBounds = 8; + static const int NSMatchingWithoutAnchoringBounds = 16; +} + +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.Int32 arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( + void Function(ffi.Pointer, int, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ + id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) { + return ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( + pointer, + retain: retain, + release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Int32 arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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?, int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : NSTextCheckingResult.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.listener( + void Function(NSTextCheckingResult?, int, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : NSTextCheckingResult.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSTextCheckingResult? arg0, int arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Int32 arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2); +} - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSPointerFunctions, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } +abstract class NSMatchingFlags { + static const int NSMatchingProgress = 1; + static const int NSMatchingCompleted = 2; + static const int NSMatchingHitEnd = 4; + static const int NSMatchingRequiredEnd = 8; + static const int NSMatchingInternalError = 16; } -late final _class_NSPointerFunctions = objc.getClass("NSPointerFunctions"); -late final _sel_pointerFunctionsWithOptions_ = - objc.registerName("pointerFunctionsWithOptions:"); -final _objc_msgSend_919 = objc.msgSendPointer +late final _sel_enumerateMatchesInString_options_range_usingBlock_ = + objc.registerName("enumerateMatchesInString:options:range:usingBlock:"); +final _objc_msgSend_498 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_hashFunction = objc.registerName("hashFunction"); -final _objc_msgSend_920 = objc.msgSendPointer + 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_499 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer, ffi.Pointer)>>)>> Function( + ffi.Pointer Function( ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() .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_921 = objc.msgSendPointer + 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_500 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>)>>() + ffi.Pointer, + ffi.Int32, + _NSRange)>>() .asFunction< - void Function( + int 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_922 = objc.msgSendPointer + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_firstMatchInString_options_range_ = + objc.registerName("firstMatchInString:options:range:"); +final _objc_msgSend_501 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer, ffi.Pointer, ffi.Pointer)>>)>> Function( + ffi.Pointer Function( ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() .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_923 = objc.msgSendPointer + 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_502 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +final _objc_msgSend_502Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( + ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>)>>() + ffi.Pointer, + ffi.Int32, + _NSRange)>>() .asFunction< void Function( + ffi.Pointer<_NSRange>, 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_924 = objc.msgSendPointer + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_stringByReplacingMatchesInString_options_range_withTemplate_ = + objc.registerName( + "stringByReplacingMatchesInString:options:range:withTemplate:"); +final _objc_msgSend_503 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer)>> Function( + ffi.Pointer Function( ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + 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_925 = objc.msgSendPointer + 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_504 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>>() + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>() .asFunction< - void Function( + int Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>(); -late final _sel_descriptionFunction = objc.registerName("descriptionFunction"); -final _objc_msgSend_926 = objc.msgSendPointer + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); +late final _sel_replacementStringForResult_inString_offset_template_ = + objc.registerName("replacementStringForResult:inString:offset:template:"); +final _objc_msgSend_505 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> Function( + 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_506 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + 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_927 = objc.msgSendPointer + 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_507 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_507Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( + ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>)>>() + ffi.UnsignedLong)>>() .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_928 = objc.msgSendPointer + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_rangeWithName_ = objc.registerName("rangeWithName:"); +final _objc_msgSend_508 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer, ffi.Pointer)>>)>> Function( + _NSRange Function( ffi.Pointer, - ffi.Pointer)>>() + 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_929 = objc.msgSendPointer + _NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_508Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( + ffi.Pointer<_NSRange>, ffi.Pointer, ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>>)>>() + ffi.Pointer)>>() .asFunction< - void Function( + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_resultByAdjustingRangesWithOffset_ = + objc.registerName("resultByAdjustingRangesWithOffset:"); +final _objc_msgSend_509 = 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_510 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer 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_930 = objc.msgSendPointer + _NSRange, + ffi.Pointer)>(); +late final _sel_spellCheckingResultWithRange_ = + objc.registerName("spellCheckingResultWithRange:"); +final _objc_msgSend_511 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>, ffi.Bool)>> Function( - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() .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_931 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_grammarCheckingResultWithRange_details_ = + objc.registerName("grammarCheckingResultWithRange:details:"); +final _objc_msgSend_512 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer 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)>>)>>() + _NSRange, + ffi.Pointer)>>() .asFunction< - void Function( + ffi.Pointer 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_932 = objc.msgSendPointer + _NSRange, + ffi.Pointer)>(); +late final _sel_dateCheckingResultWithRange_date_ = + objc.registerName("dateCheckingResultWithRange:date:"); +final _objc_msgSend_513 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + _NSRange, ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_pointerArrayWithOptions_ = - objc.registerName("pointerArrayWithOptions:"); -final _objc_msgSend_933 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_dateCheckingResultWithRange_date_timeZone_duration_ = + objc.registerName("dateCheckingResultWithRange:date:timeZone:duration:"); +final _objc_msgSend_514 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer, + ffi.Double)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_pointerArrayWithPointerFunctions_ = - objc.registerName("pointerArrayWithPointerFunctions:"); -final _objc_msgSend_934 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer, + double)>(); +late final _sel_addressCheckingResultWithRange_components_ = + objc.registerName("addressCheckingResultWithRange:components:"); +final _objc_msgSend_515 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + _NSRange, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_pointerFunctions = objc.registerName("pointerFunctions"); -final _objc_msgSend_935 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_linkCheckingResultWithRange_URL_ = + objc.registerName("linkCheckingResultWithRange:URL:"); +final _objc_msgSend_516 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_pointerAtIndex_ = objc.registerName("pointerAtIndex:"); -final _objc_msgSend_936 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_quoteCheckingResultWithRange_replacementString_ = + objc.registerName("quoteCheckingResultWithRange:replacementString:"); +final _objc_msgSend_517 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_dashCheckingResultWithRange_replacementString_ = + objc.registerName("dashCheckingResultWithRange:replacementString:"); +late final _sel_replacementCheckingResultWithRange_replacementString_ = + objc.registerName("replacementCheckingResultWithRange:replacementString:"); +late final _sel_correctionCheckingResultWithRange_replacementString_ = + objc.registerName("correctionCheckingResultWithRange:replacementString:"); +late final _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_ = + objc.registerName( + "correctionCheckingResultWithRange:replacementString:alternativeStrings:"); +final _objc_msgSend_518 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_addPointer_ = objc.registerName("addPointer:"); -late final _sel_removePointerAtIndex_ = - objc.registerName("removePointerAtIndex:"); -late final _sel_insertPointer_atIndex_ = - objc.registerName("insertPointer:atIndex:"); -late final _sel_replacePointerAtIndex_withPointer_ = - objc.registerName("replacePointerAtIndex:withPointer:"); -final _objc_msgSend_937 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_ = + objc.registerName( + "regularExpressionCheckingResultWithRanges:count:regularExpression:"); +final _objc_msgSend_519 = 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, - ffi.Pointer, int, ffi.Pointer)>(); -late final _sel_compact = objc.registerName("compact"); -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_938 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_weakObjectsPointerArray = - objc.registerName("weakObjectsPointerArray"); + 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:"); -class NSProcessInfo extends NSObject { - NSProcessInfo._(ffi.Pointer pointer, +class NSURLCache extends objc.NSObject { + NSURLCache._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSProcessInfo] that points to the same underlying object as [other]. - static NSProcessInfo castFrom(T other) { - return NSProcessInfo._(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.pointer, retain: true, release: true); - /// Returns a [NSProcessInfo] that wraps the given raw object pointer. - static NSProcessInfo castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProcessInfo._(other, retain: retain, release: release); - } + /// 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 [NSProcessInfo]. + /// Returns whether [obj] is an instance of [NSURLCache]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSProcessInfo); - } - - static NSProcessInfo getProcessInfo() { - final _ret = _objc_msgSend_939(_class_NSProcessInfo, _sel_processInfo); - return NSProcessInfo._(_ret, retain: true, release: true); - } - - NSDictionary get environment { - final _ret = _objc_msgSend_181(this.pointer, _sel_environment); - return NSDictionary._(_ret, retain: true, release: true); - } - - NSArray get arguments { - final _ret = _objc_msgSend_85(this.pointer, _sel_arguments); - return NSArray._(_ret, retain: true, release: true); - } - - NSString get hostName { - final _ret = _objc_msgSend_21(this.pointer, _sel_hostName); - return NSString._(_ret, retain: true, release: true); - } - - NSString get processName { - final _ret = _objc_msgSend_21(this.pointer, _sel_processName); - return NSString._(_ret, retain: true, release: true); - } - - set processName(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setProcessName_, value.pointer); - } - - int get processIdentifier { - return _objc_msgSend_237(this.pointer, _sel_processIdentifier); - } - - NSString get globallyUniqueString { - final _ret = _objc_msgSend_21(this.pointer, _sel_globallyUniqueString); - return NSString._(_ret, retain: true, release: true); - } - - int operatingSystem() { - return _objc_msgSend_10(this.pointer, _sel_operatingSystem); - } - - NSString operatingSystemName() { - final _ret = _objc_msgSend_21(this.pointer, _sel_operatingSystemName); - return NSString._(_ret, retain: true, release: true); + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSURLCache); } - NSString get operatingSystemVersionString { - final _ret = - _objc_msgSend_21(this.pointer, _sel_operatingSystemVersionString); - return NSString._(_ret, retain: true, release: true); + static NSURLCache getSharedURLCache() { + final _ret = _objc_msgSend_520(_class_NSURLCache, _sel_sharedURLCache); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - void getOperatingSystemVersion(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_940Stret( - stret, this.pointer, _sel_operatingSystemVersion) - : stret.ref = - _objc_msgSend_940(this.pointer, _sel_operatingSystemVersion); + static void setSharedURLCache(NSURLCache value) { + return _objc_msgSend_521( + _class_NSURLCache, _sel_setSharedURLCache_, value.pointer); } - int get processorCount { - return _objc_msgSend_10(this.pointer, _sel_processorCount); + NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( + int memoryCapacity, int diskCapacity, objc.NSString? path) { + final _ret = _objc_msgSend_522( + this.pointer, + _sel_initWithMemoryCapacity_diskCapacity_diskPath_, + memoryCapacity, + diskCapacity, + path?.pointer ?? ffi.nullptr); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - int get activeProcessorCount { - return _objc_msgSend_10(this.pointer, _sel_activeProcessorCount); + NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( + int memoryCapacity, int diskCapacity, objc.NSURL? directoryURL) { + final _ret = _objc_msgSend_523( + this.pointer, + _sel_initWithMemoryCapacity_diskCapacity_directoryURL_, + memoryCapacity, + diskCapacity, + directoryURL?.pointer ?? ffi.nullptr); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - int get physicalMemory { - return _objc_msgSend_164(this.pointer, _sel_physicalMemory); + NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_528( + this.pointer, _sel_cachedResponseForRequest_, request.pointer); + return _ret.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - bool isOperatingSystemAtLeastVersion_(NSOperatingSystemVersion version) { - return _objc_msgSend_941( - this.pointer, _sel_isOperatingSystemAtLeastVersion_, version); + void storeCachedResponse_forRequest_( + NSCachedURLResponse cachedResponse, NSURLRequest request) { + _objc_msgSend_529(this.pointer, _sel_storeCachedResponse_forRequest_, + cachedResponse.pointer, request.pointer); } - double get systemUptime { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_systemUptime) - : _objc_msgSend_165(this.pointer, _sel_systemUptime); + void removeCachedResponseForRequest_(NSURLRequest request) { + _objc_msgSend_530( + this.pointer, _sel_removeCachedResponseForRequest_, request.pointer); } - void disableSuddenTermination() { - _objc_msgSend_1(this.pointer, _sel_disableSuddenTermination); + void removeAllCachedResponses() { + _objc_msgSend_82(this.pointer, _sel_removeAllCachedResponses); } - void enableSuddenTermination() { - _objc_msgSend_1(this.pointer, _sel_enableSuddenTermination); + void removeCachedResponsesSinceDate_(objc.NSDate date) { + _objc_msgSend_246( + this.pointer, _sel_removeCachedResponsesSinceDate_, date.pointer); } - void disableAutomaticTermination_(NSString reason) { - _objc_msgSend_247( - this.pointer, _sel_disableAutomaticTermination_, reason.pointer); + int get memoryCapacity { + return _objc_msgSend_29(this.pointer, _sel_memoryCapacity); } - void enableAutomaticTermination_(NSString reason) { - _objc_msgSend_247( - this.pointer, _sel_enableAutomaticTermination_, reason.pointer); + set memoryCapacity(int value) { + return _objc_msgSend_125(this.pointer, _sel_setMemoryCapacity_, value); } - bool get automaticTerminationSupportEnabled { - return _objc_msgSend_12( - this.pointer, _sel_automaticTerminationSupportEnabled); + int get diskCapacity { + return _objc_msgSend_29(this.pointer, _sel_diskCapacity); } - set automaticTerminationSupportEnabled(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAutomaticTerminationSupportEnabled_, value); + set diskCapacity(int value) { + return _objc_msgSend_125(this.pointer, _sel_setDiskCapacity_, value); } - NSObject beginActivityWithOptions_reason_(int options, NSString reason) { - final _ret = _objc_msgSend_942(this.pointer, - _sel_beginActivityWithOptions_reason_, options, reason.pointer); - return NSObject._(_ret, retain: true, release: true); + int get currentMemoryUsage { + return _objc_msgSend_29(this.pointer, _sel_currentMemoryUsage); } - void endActivity_(NSObject activity) { - _objc_msgSend_15(this.pointer, _sel_endActivity_, activity.pointer); + int get currentDiskUsage { + return _objc_msgSend_29(this.pointer, _sel_currentDiskUsage); } - void performActivityWithOptions_reason_usingBlock_( - int options, NSString reason, ObjCBlock_ffiVoid block) { - _objc_msgSend_943( - this.pointer, - _sel_performActivityWithOptions_reason_usingBlock_, - options, - reason.pointer, - block.pointer); + void storeCachedResponse_forDataTask_( + NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { + _objc_msgSend_531(this.pointer, _sel_storeCachedResponse_forDataTask_, + cachedResponse.pointer, dataTask.pointer); } - void performExpiringActivityWithReason_usingBlock_( - NSString reason, ObjCBlock_ffiVoid_bool block) { - _objc_msgSend_944( + void getCachedResponseForDataTask_completionHandler_( + NSURLSessionDataTask dataTask, + ObjCBlock_ffiVoid_NSCachedURLResponse completionHandler) { + _objc_msgSend_532( this.pointer, - _sel_performExpiringActivityWithReason_usingBlock_, - reason.pointer, - block.pointer); - } - - NSString get userName { - final _ret = _objc_msgSend_21(this.pointer, _sel_userName); - return NSString._(_ret, retain: true, release: true); - } - - NSString get fullUserName { - final _ret = _objc_msgSend_21(this.pointer, _sel_fullUserName); - return NSString._(_ret, retain: true, release: true); - } - - int get thermalState { - return _objc_msgSend_945(this.pointer, _sel_thermalState); - } - - bool get lowPowerModeEnabled { - return _objc_msgSend_12(this.pointer, _sel_isLowPowerModeEnabled); - } - - bool get macCatalystApp { - return _objc_msgSend_12(this.pointer, _sel_isMacCatalystApp); + _sel_getCachedResponseForDataTask_completionHandler_, + dataTask.pointer, + completionHandler.pointer); } - bool get iOSAppOnMac { - return _objc_msgSend_12(this.pointer, _sel_isiOSAppOnMac); + void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { + _objc_msgSend_533( + this.pointer, _sel_removeCachedResponseForDataTask_, dataTask.pointer); } @override - NSProcessInfo init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSProcessInfo._(_ret, retain: true, release: true); + NSURLCache init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - static NSProcessInfo new1() { - final _ret = _objc_msgSend_2(_class_NSProcessInfo, _sel_new); - return NSProcessInfo._(_ret, retain: false, release: true); + static NSURLCache new1() { + final _ret = _objc_msgSend_40(_class_NSURLCache, _sel_new); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } - static NSProcessInfo allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSProcessInfo, _sel_allocWithZone_, zone); - return NSProcessInfo._(_ret, retain: false, release: true); + static NSURLCache allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSURLCache, _sel_allocWithZone_, zone); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } - static NSProcessInfo alloc() { - final _ret = _objc_msgSend_2(_class_NSProcessInfo, _sel_alloc); - return NSProcessInfo._(_ret, retain: false, release: true); + static NSURLCache alloc() { + final _ret = _objc_msgSend_40(_class_NSURLCache, _sel_alloc); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSProcessInfo, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLCache, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSProcessInfo, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLCache, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSProcessInfo, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLCache, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSProcessInfo, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSURLCache, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSProcessInfo, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLCache, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSProcessInfo, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLCache, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSProcessInfo, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLCache, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSProcessInfo, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSURLCache, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSProcessInfo, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSURLCache, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSProcessInfo = objc.getClass("NSProcessInfo"); -late final _sel_processInfo = objc.registerName("processInfo"); -final _objc_msgSend_939 = objc.msgSendPointer +late final _class_NSURLCache = objc.getClass("NSURLCache"); +late final _sel_sharedURLCache = objc.registerName("sharedURLCache"); +final _objc_msgSend_520 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -46732,1049 +23711,935 @@ final _objc_msgSend_939 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_environment = objc.registerName("environment"); -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_940 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - NSOperatingSystemVersion Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - NSOperatingSystemVersion Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_940Stret = objc.msgSendStretPointer +late final _sel_setSharedURLCache_ = objc.registerName("setSharedURLCache:"); +final _objc_msgSend_521 = 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_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_941 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, NSOperatingSystemVersion)>>() + 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:"); - -abstract class NSActivityOptions { - static const int NSActivityIdleDisplaySleepDisabled = 1099511627776; - static const int NSActivityIdleSystemSleepDisabled = 1048576; - static const int NSActivitySuddenTerminationDisabled = 16384; - static const int NSActivityAutomaticTerminationDisabled = 32768; - static const int NSActivityAnimationTrackingEnabled = 35184372088832; - static const int NSActivityTrackingEnabled = 70368744177664; - static const int NSActivityUserInitiated = 16777215; - static const int NSActivityUserInitiatedAllowingIdleSystemSleep = 15728639; - static const int NSActivityBackground = 255; - static const int NSActivityLatencyCritical = 1095216660480; - static const int NSActivityUserInteractive = 1095233437695; -} - -late final _sel_beginActivityWithOptions_reason_ = - objc.registerName("beginActivityWithOptions:reason:"); -final _objc_msgSend_942 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_ = + objc.registerName("initWithMemoryCapacity:diskCapacity:diskPath:"); +final _objc_msgSend_522 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, + ffi.UnsignedLong, + ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, int, + int, ffi.Pointer)>(); -late final _sel_endActivity_ = objc.registerName("endActivity:"); -late final _sel_performActivityWithOptions_reason_usingBlock_ = - objc.registerName("performActivityWithOptions:reason:usingBlock:"); -final _objc_msgSend_943 = objc.msgSendPointer +late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_ = + objc.registerName("initWithMemoryCapacity:diskCapacity:directoryURL:"); +final _objc_msgSend_523 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer)>>() .asFunction< - void Function( + instancetype 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); -final _ObjCBlock_ffiVoid_bool_closureRegistry = {}; -int _ObjCBlock_ffiVoid_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_bool_registerClosure( - void Function(bool) fn) { - final id = ++_ObjCBlock_ffiVoid_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_bool_closureTrampoline( - ffi.Pointer block, bool arg0) => - _ObjCBlock_ffiVoid_bool_closureRegistry[block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_bool extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_bool._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_bool._(pointer, retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_bool.fromFunctionPointer( - ffi.Pointer> ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_bool.fromFunction(void Function(bool) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Bool)>(_ObjCBlock_ffiVoid_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_bool_registerClosure((bool arg0) => fn(arg0)))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_bool.listener(void Function(bool) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Bool)>.listener( - _ObjCBlock_ffiVoid_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_bool_registerClosure((bool arg0) => fn(arg0)))); - static ffi - .NativeCallable, ffi.Bool)>? - _dartFuncListenerTrampoline; - - void call(bool arg0) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, ffi.Bool arg0)>>() - .asFunction, bool)>()( - pointer, arg0); -} - -late final _sel_performExpiringActivityWithReason_usingBlock_ = - objc.registerName("performExpiringActivityWithReason:usingBlock:"); -final _objc_msgSend_944 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_userName = objc.registerName("userName"); -late final _sel_fullUserName = objc.registerName("fullUserName"); - -abstract class NSProcessInfoThermalState { - static const int NSProcessInfoThermalStateNominal = 0; - static const int NSProcessInfoThermalStateFair = 1; - static const int NSProcessInfoThermalStateSerious = 2; - static const int NSProcessInfoThermalStateCritical = 3; -} - -late final _sel_thermalState = objc.registerName("thermalState"); -final _objc_msgSend_945 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 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"); + int, + ffi.Pointer)>(); -class NSTextCheckingResult extends NSObject { - NSTextCheckingResult._(ffi.Pointer pointer, +class NSCachedURLResponse extends objc.NSObject { + NSCachedURLResponse._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSTextCheckingResult] that points to the same underlying object as [other]. - static NSTextCheckingResult castFrom(T other) { - return NSTextCheckingResult._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSCachedURLResponse] that points to the same underlying object as [other]. + NSCachedURLResponse.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSTextCheckingResult] that wraps the given raw object pointer. - static NSTextCheckingResult castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSTextCheckingResult._(other, retain: retain, release: release); - } + /// Constructs a [NSCachedURLResponse] that wraps the given raw object pointer. + NSCachedURLResponse.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSTextCheckingResult]. + /// Returns whether [obj] is an instance of [NSCachedURLResponse]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSTextCheckingResult); - } - - int get resultType { - return _objc_msgSend_946(this.pointer, _sel_resultType); - } - - void getRange(ffi.Pointer<_NSRange> stret) { - objc.useMsgSendVariants - ? _objc_msgSend_54Stret(stret, this.pointer, _sel_range) - : stret.ref = _objc_msgSend_54(this.pointer, _sel_range); - } - - NSOrthography? get orthography { - final _ret = _objc_msgSend_947(this.pointer, _sel_orthography); - return _ret.address == 0 - ? null - : NSOrthography._(_ret, retain: true, release: true); - } - - NSArray? get grammarDetails { - final _ret = _objc_msgSend_84(this.pointer, _sel_grammarDetails); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSDate? get date { - final _ret = _objc_msgSend_183(this.pointer, _sel_date); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - NSTimeZone? get timeZone { - final _ret = _objc_msgSend_773(this.pointer, _sel_timeZone); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, retain: true, release: true); - } - - double get duration { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_duration) - : _objc_msgSend_165(this.pointer, _sel_duration); + obj.pointer, _sel_isKindOfClass_, _class_NSCachedURLResponse); } - NSDictionary? get components { - final _ret = _objc_msgSend_390(this.pointer, _sel_components); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + NSCachedURLResponse initWithResponse_data_( + NSURLResponse response, objc.NSData data) { + final _ret = _objc_msgSend_524(this.pointer, _sel_initWithResponse_data_, + response.pointer, data.pointer); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - NSURL? get URL { - final _ret = _objc_msgSend_45(this.pointer, _sel_URL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( + NSURLResponse response, + objc.NSData data, + objc.NSDictionary? userInfo, + int storagePolicy) { + final _ret = _objc_msgSend_525( + this.pointer, + _sel_initWithResponse_data_userInfo_storagePolicy_, + response.pointer, + data.pointer, + userInfo?.pointer ?? ffi.nullptr, + storagePolicy); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - NSString? get replacementString { - final _ret = _objc_msgSend_44(this.pointer, _sel_replacementString); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + NSURLResponse get response { + final _ret = _objc_msgSend_526(this.pointer, _sel_response); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - NSArray? get alternativeStrings { - final _ret = _objc_msgSend_84(this.pointer, _sel_alternativeStrings); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + objc.NSData get data { + final _ret = _objc_msgSend_104(this.pointer, _sel_data); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSRegularExpression? get regularExpression { - final _ret = _objc_msgSend_959(this.pointer, _sel_regularExpression); + objc.NSDictionary? get userInfo { + final _ret = _objc_msgSend_65(this.pointer, _sel_userInfo); return _ret.address == 0 ? null - : NSRegularExpression._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSString? get phoneNumber { - final _ret = _objc_msgSend_44(this.pointer, _sel_phoneNumber); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + int get storagePolicy { + return _objc_msgSend_527(this.pointer, _sel_storagePolicy); } - int get numberOfRanges { - return _objc_msgSend_10(this.pointer, _sel_numberOfRanges); + @override + NSCachedURLResponse init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - void rangeAtIndex_(ffi.Pointer<_NSRange> stret, int idx) { - objc.useMsgSendVariants - ? _objc_msgSend_347Stret(stret, this.pointer, _sel_rangeAtIndex_, idx) - : stret.ref = _objc_msgSend_347(this.pointer, _sel_rangeAtIndex_, idx); + static NSCachedURLResponse new1() { + final _ret = _objc_msgSend_40(_class_NSCachedURLResponse, _sel_new); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } - void rangeWithName_(ffi.Pointer<_NSRange> stret, NSString name) { - objc.useMsgSendVariants - ? _objc_msgSend_340Stret( - stret, this.pointer, _sel_rangeWithName_, name.pointer) - : stret.ref = - _objc_msgSend_340(this.pointer, _sel_rangeWithName_, name.pointer); + static NSCachedURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSCachedURLResponse, _sel_allocWithZone_, zone); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } - NSTextCheckingResult resultByAdjustingRangesWithOffset_(int offset) { - final _ret = _objc_msgSend_960( - this.pointer, _sel_resultByAdjustingRangesWithOffset_, offset); - return NSTextCheckingResult._(_ret, retain: true, release: true); + static NSCachedURLResponse alloc() { + final _ret = _objc_msgSend_40(_class_NSCachedURLResponse, _sel_alloc); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } - NSDictionary? get addressComponents { - final _ret = _objc_msgSend_390(this.pointer, _sel_addressComponents); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSCachedURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static NSTextCheckingResult orthographyCheckingResultWithRange_orthography_( - _NSRange range, NSOrthography orthography) { - final _ret = _objc_msgSend_961( - _class_NSTextCheckingResult, - _sel_orthographyCheckingResultWithRange_orthography_, - range, - orthography.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSCachedURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static NSTextCheckingResult spellCheckingResultWithRange_(_NSRange range) { - final _ret = _objc_msgSend_962( - _class_NSTextCheckingResult, _sel_spellCheckingResultWithRange_, range); - return NSTextCheckingResult._(_ret, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSCachedURLResponse, _sel_accessInstanceVariablesDirectly); } - static NSTextCheckingResult grammarCheckingResultWithRange_details_( - _NSRange range, NSArray details) { - final _ret = _objc_msgSend_963(_class_NSTextCheckingResult, - _sel_grammarCheckingResultWithRange_details_, range, details.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSCachedURLResponse, _sel_useStoredAccessor); } - static NSTextCheckingResult dateCheckingResultWithRange_date_( - _NSRange range, NSDate date) { - final _ret = _objc_msgSend_964(_class_NSTextCheckingResult, - _sel_dateCheckingResultWithRange_date_, range, date.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSCachedURLResponse, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSTextCheckingResult - dateCheckingResultWithRange_date_timeZone_duration_( - _NSRange range, NSDate date, NSTimeZone timeZone, double duration) { - final _ret = _objc_msgSend_965( - _class_NSTextCheckingResult, - _sel_dateCheckingResultWithRange_date_timeZone_duration_, - range, - date.pointer, - timeZone.pointer, - duration); - return NSTextCheckingResult._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSCachedURLResponse, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSTextCheckingResult addressCheckingResultWithRange_components_( - _NSRange range, NSDictionary components) { - final _ret = _objc_msgSend_966( - _class_NSTextCheckingResult, - _sel_addressCheckingResultWithRange_components_, - range, - components.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSCachedURLResponse, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSTextCheckingResult linkCheckingResultWithRange_URL_( - _NSRange range, NSURL url) { - final _ret = _objc_msgSend_967(_class_NSTextCheckingResult, - _sel_linkCheckingResultWithRange_URL_, range, url.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSCachedURLResponse, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSTextCheckingResult quoteCheckingResultWithRange_replacementString_( - _NSRange range, NSString replacementString) { - final _ret = _objc_msgSend_968( - _class_NSTextCheckingResult, - _sel_quoteCheckingResultWithRange_replacementString_, - range, - replacementString.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSCachedURLResponse, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - static NSTextCheckingResult dashCheckingResultWithRange_replacementString_( - _NSRange range, NSString replacementString) { - final _ret = _objc_msgSend_968( - _class_NSTextCheckingResult, - _sel_dashCheckingResultWithRange_replacementString_, - range, - replacementString.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); - } +late final _class_NSCachedURLResponse = objc.getClass("NSCachedURLResponse"); +late final _sel_initWithResponse_data_ = + objc.registerName("initWithResponse:data:"); +final _objc_msgSend_524 = 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)>(); - static NSTextCheckingResult - replacementCheckingResultWithRange_replacementString_( - _NSRange range, NSString replacementString) { - final _ret = _objc_msgSend_968( - _class_NSTextCheckingResult, - _sel_replacementCheckingResultWithRange_replacementString_, - range, - replacementString.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); - } +abstract class NSURLCacheStoragePolicy { + static const int NSURLCacheStorageAllowed = 0; + static const int NSURLCacheStorageAllowedInMemoryOnly = 1; + static const int NSURLCacheStorageNotAllowed = 2; +} - static NSTextCheckingResult - correctionCheckingResultWithRange_replacementString_( - _NSRange range, NSString replacementString) { - final _ret = _objc_msgSend_968( - _class_NSTextCheckingResult, - _sel_correctionCheckingResultWithRange_replacementString_, - range, - replacementString.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); - } +late final _sel_initWithResponse_data_userInfo_storagePolicy_ = + objc.registerName("initWithResponse:data:userInfo:storagePolicy:"); +final _objc_msgSend_525 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +final _objc_msgSend_526 = 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_527 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cachedResponseForRequest_ = + objc.registerName("cachedResponseForRequest:"); +final _objc_msgSend_528 = 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_529 = 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_530 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removeAllCachedResponses = + objc.registerName("removeAllCachedResponses"); +late final _sel_removeCachedResponsesSinceDate_ = + objc.registerName("removeCachedResponsesSinceDate:"); +late final _sel_memoryCapacity = objc.registerName("memoryCapacity"); +late final _sel_setMemoryCapacity_ = objc.registerName("setMemoryCapacity:"); +late final _sel_diskCapacity = objc.registerName("diskCapacity"); +late final _sel_setDiskCapacity_ = objc.registerName("setDiskCapacity:"); +late final _sel_currentMemoryUsage = objc.registerName("currentMemoryUsage"); +late final _sel_currentDiskUsage = objc.registerName("currentDiskUsage"); - static NSTextCheckingResult - correctionCheckingResultWithRange_replacementString_alternativeStrings_( - _NSRange range, - NSString replacementString, - NSArray alternativeStrings) { - final _ret = _objc_msgSend_969( - _class_NSTextCheckingResult, - _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_, - range, - replacementString.pointer, - alternativeStrings.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); - } +class NSURLSessionDataTask extends NSURLSessionTask { + NSURLSessionDataTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSTextCheckingResult - regularExpressionCheckingResultWithRanges_count_regularExpression_( - ffi.Pointer<_NSRange> ranges, - int count, - NSRegularExpression regularExpression) { - final _ret = _objc_msgSend_970( - _class_NSTextCheckingResult, - _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_, - ranges, - count, - regularExpression.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); - } + /// Constructs a [NSURLSessionDataTask] that points to the same underlying object as [other]. + NSURLSessionDataTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static NSTextCheckingResult phoneNumberCheckingResultWithRange_phoneNumber_( - _NSRange range, NSString phoneNumber) { - final _ret = _objc_msgSend_968( - _class_NSTextCheckingResult, - _sel_phoneNumberCheckingResultWithRange_phoneNumber_, - range, - phoneNumber.pointer); - return NSTextCheckingResult._(_ret, 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); - static NSTextCheckingResult - transitInformationCheckingResultWithRange_components_( - _NSRange range, NSDictionary components) { - final _ret = _objc_msgSend_966( - _class_NSTextCheckingResult, - _sel_transitInformationCheckingResultWithRange_components_, - range, - components.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionDataTask); } @override - NSTextCheckingResult init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSTextCheckingResult._(_ret, retain: true, release: true); + NSURLSessionDataTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - static NSTextCheckingResult new1() { - final _ret = _objc_msgSend_2(_class_NSTextCheckingResult, _sel_new); - return NSTextCheckingResult._(_ret, retain: false, release: true); + static NSURLSessionDataTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDataTask, _sel_new); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } - static NSTextCheckingResult allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSTextCheckingResult, _sel_allocWithZone_, zone); - return NSTextCheckingResult._(_ret, retain: false, release: true); + static NSURLSessionDataTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionDataTask, _sel_allocWithZone_, zone); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } - static NSTextCheckingResult alloc() { - final _ret = _objc_msgSend_2(_class_NSTextCheckingResult, _sel_alloc); - return NSTextCheckingResult._(_ret, retain: false, release: true); + static NSURLSessionDataTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDataTask, _sel_alloc); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSTextCheckingResult, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionDataTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSTextCheckingResult, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionDataTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSTextCheckingResult, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLSessionDataTask, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSTextCheckingResult, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSURLSessionDataTask, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSTextCheckingResult, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionDataTask, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSTextCheckingResult, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionDataTask, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSTextCheckingResult, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionDataTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSTextCheckingResult, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionDataTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSTextCheckingResult, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionDataTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSTextCheckingResult = objc.getClass("NSTextCheckingResult"); +late final _class_NSURLSessionDataTask = objc.getClass("NSURLSessionDataTask"); +late final _sel_storeCachedResponse_forDataTask_ = + objc.registerName("storeCachedResponse:forDataTask:"); +final _objc_msgSend_531 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -abstract class NSTextCheckingType { - static const int NSTextCheckingTypeOrthography = 1; - static const int NSTextCheckingTypeSpelling = 2; - static const int NSTextCheckingTypeGrammar = 4; - static const int NSTextCheckingTypeDate = 8; - static const int NSTextCheckingTypeAddress = 16; - static const int NSTextCheckingTypeLink = 32; - static const int NSTextCheckingTypeQuote = 64; - static const int NSTextCheckingTypeDash = 128; - static const int NSTextCheckingTypeReplacement = 256; - static const int NSTextCheckingTypeCorrection = 512; - static const int NSTextCheckingTypeRegularExpression = 1024; - static const int NSTextCheckingTypePhoneNumber = 2048; - static const int NSTextCheckingTypeTransitInformation = 4096; +void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[ + block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_NSCachedURLResponse extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSCachedURLResponse._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSCachedURLResponse castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSCachedURLResponse._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunction( + void Function(NSCachedURLResponse?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSCachedURLResponse.listener(void Function(NSCachedURLResponse?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSCachedURLResponse? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); } -late final _sel_resultType = objc.registerName("resultType"); -final _objc_msgSend_946 = objc.msgSendPointer +late final _sel_getCachedResponseForDataTask_completionHandler_ = + objc.registerName("getCachedResponseForDataTask:completionHandler:"); +final _objc_msgSend_532 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_range = objc.registerName("range"); -late final _sel_orthography = objc.registerName("orthography"); -final _objc_msgSend_947 = objc.msgSendPointer + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeCachedResponseForDataTask_ = + objc.registerName("removeCachedResponseForDataTask:"); +final _objc_msgSend_533 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + 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"); + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -class NSRegularExpression extends NSObject { - NSRegularExpression._(ffi.Pointer pointer, +class NSURLConnection extends objc.NSObject { + NSURLConnection._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSRegularExpression] that points to the same underlying object as [other]. - static NSRegularExpression castFrom(T other) { - return NSRegularExpression._(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.pointer, retain: true, release: true); - /// Returns a [NSRegularExpression] that wraps the given raw object pointer. - static NSRegularExpression castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSRegularExpression._(other, retain: retain, release: release); - } + /// 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 [NSRegularExpression]. + /// Returns whether [obj] is an instance of [NSURLConnection]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSRegularExpression); + obj.pointer, _sel_isKindOfClass_, _class_NSURLConnection); } - static NSRegularExpression? regularExpressionWithPattern_options_error_( - NSString pattern, - int options, - ffi.Pointer> error) { - final _ret = _objc_msgSend_948( - _class_NSRegularExpression, - _sel_regularExpressionWithPattern_options_error_, - pattern.pointer, - options, - error); + NSURLConnection? initWithRequest_delegate_startImmediately_( + NSURLRequest request, objc.NSObject? delegate, bool startImmediately) { + final _ret = _objc_msgSend_534( + this.pointer, + _sel_initWithRequest_delegate_startImmediately_, + request.pointer, + delegate?.pointer ?? ffi.nullptr, + startImmediately); return _ret.address == 0 ? null - : NSRegularExpression._(_ret, retain: true, release: true); + : NSURLConnection.castFromPointer(_ret, retain: true, release: true); } - NSRegularExpression? initWithPattern_options_error_(NSString pattern, - int options, ffi.Pointer> error) { - final _ret = _objc_msgSend_949(this.pointer, - _sel_initWithPattern_options_error_, pattern.pointer, options, error); + NSURLConnection? initWithRequest_delegate_( + NSURLRequest request, objc.NSObject? delegate) { + final _ret = _objc_msgSend_535(this.pointer, _sel_initWithRequest_delegate_, + request.pointer, delegate?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSRegularExpression._(_ret, retain: true, release: true); - } - - NSString get pattern { - final _ret = _objc_msgSend_21(this.pointer, _sel_pattern); - return NSString._(_ret, retain: true, release: true); - } - - int get options { - return _objc_msgSend_950(this.pointer, _sel_options); + : NSURLConnection.castFromPointer(_ret, retain: true, release: true); } - int get numberOfCaptureGroups { - return _objc_msgSend_10(this.pointer, _sel_numberOfCaptureGroups); + static NSURLConnection? connectionWithRequest_delegate_( + NSURLRequest request, objc.NSObject? delegate) { + final _ret = _objc_msgSend_536( + _class_NSURLConnection, + _sel_connectionWithRequest_delegate_, + request.pointer, + delegate?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURLConnection.castFromPointer(_ret, retain: true, release: true); } - static NSString escapedPatternForString_(NSString string) { - final _ret = _objc_msgSend_69(_class_NSRegularExpression, - _sel_escapedPatternForString_, string.pointer); - return NSString._(_ret, retain: true, release: true); + NSURLRequest get originalRequest { + final _ret = _objc_msgSend_537(this.pointer, _sel_originalRequest); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - void enumerateMatchesInString_options_range_usingBlock_( - NSString string, - int options, - _NSRange range, - ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool block) { - _objc_msgSend_951( - this.pointer, - _sel_enumerateMatchesInString_options_range_usingBlock_, - string.pointer, - options, - range, - block.pointer); + NSURLRequest get currentRequest { + final _ret = _objc_msgSend_537(this.pointer, _sel_currentRequest); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - NSArray matchesInString_options_range_( - NSString string, int options, _NSRange range) { - final _ret = _objc_msgSend_952(this.pointer, - _sel_matchesInString_options_range_, string.pointer, options, range); - return NSArray._(_ret, retain: true, release: true); + void start() { + _objc_msgSend_82(this.pointer, _sel_start); } - int numberOfMatchesInString_options_range_( - NSString string, int options, _NSRange range) { - return _objc_msgSend_953( - this.pointer, - _sel_numberOfMatchesInString_options_range_, - string.pointer, - options, - range); + void cancel() { + _objc_msgSend_82(this.pointer, _sel_cancel); } - NSTextCheckingResult? firstMatchInString_options_range_( - NSString string, int options, _NSRange range) { - final _ret = _objc_msgSend_954(this.pointer, - _sel_firstMatchInString_options_range_, string.pointer, options, range); - return _ret.address == 0 - ? null - : NSTextCheckingResult._(_ret, retain: true, release: true); + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - void rangeOfFirstMatchInString_options_range_(ffi.Pointer<_NSRange> stret, - NSString string, int options, _NSRange range) { - objc.useMsgSendVariants - ? _objc_msgSend_955Stret( - stret, - this.pointer, - _sel_rangeOfFirstMatchInString_options_range_, - string.pointer, - options, - range) - : stret.ref = _objc_msgSend_955( - this.pointer, - _sel_rangeOfFirstMatchInString_options_range_, - string.pointer, - options, - range); + void unscheduleFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_unscheduleFromRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - NSString stringByReplacingMatchesInString_options_range_withTemplate_( - NSString string, int options, _NSRange range, NSString templ) { - final _ret = _objc_msgSend_956( - this.pointer, - _sel_stringByReplacingMatchesInString_options_range_withTemplate_, - string.pointer, - options, - range, - templ.pointer); - return NSString._(_ret, retain: true, release: true); + void setDelegateQueue_(NSOperationQueue? queue) { + _objc_msgSend_538( + this.pointer, _sel_setDelegateQueue_, queue?.pointer ?? ffi.nullptr); } - int replaceMatchesInString_options_range_withTemplate_( - NSMutableString string, int options, _NSRange range, NSString templ) { - return _objc_msgSend_957( - this.pointer, - _sel_replaceMatchesInString_options_range_withTemplate_, - string.pointer, - options, - range, - templ.pointer); + static bool canHandleRequest_(NSURLRequest request) { + return _objc_msgSend_539( + _class_NSURLConnection, _sel_canHandleRequest_, request.pointer); } - NSString replacementStringForResult_inString_offset_template_( - NSTextCheckingResult result, - NSString string, - int offset, - NSString templ) { - final _ret = _objc_msgSend_958( - this.pointer, - _sel_replacementStringForResult_inString_offset_template_, - result.pointer, - string.pointer, - offset, - templ.pointer); - return NSString._(_ret, retain: true, release: true); + static objc.NSData? sendSynchronousRequest_returningResponse_error_( + NSURLRequest request, + ffi.Pointer> response, + ffi.Pointer> error) { + final _ret = _objc_msgSend_540( + _class_NSURLConnection, + _sel_sendSynchronousRequest_returningResponse_error_, + request.pointer, + response, + error); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static NSString escapedTemplateForString_(NSString string) { - final _ret = _objc_msgSend_69(_class_NSRegularExpression, - _sel_escapedTemplateForString_, string.pointer); - return NSString._(_ret, retain: true, release: true); + static void sendAsynchronousRequest_queue_completionHandler_( + NSURLRequest request, + NSOperationQueue queue, + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError handler) { + _objc_msgSend_541( + _class_NSURLConnection, + _sel_sendAsynchronousRequest_queue_completionHandler_, + request.pointer, + queue.pointer, + handler.pointer); } @override - NSRegularExpression init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSRegularExpression._(_ret, retain: true, release: true); + NSURLConnection init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLConnection.castFromPointer(_ret, retain: true, release: true); } - static NSRegularExpression new1() { - final _ret = _objc_msgSend_2(_class_NSRegularExpression, _sel_new); - return NSRegularExpression._(_ret, retain: false, release: true); + static NSURLConnection new1() { + final _ret = _objc_msgSend_40(_class_NSURLConnection, _sel_new); + return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } - static NSRegularExpression allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSURLConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSRegularExpression, _sel_allocWithZone_, zone); - return NSRegularExpression._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSURLConnection, _sel_allocWithZone_, zone); + return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } - static NSRegularExpression alloc() { - final _ret = _objc_msgSend_2(_class_NSRegularExpression, _sel_alloc); - return NSRegularExpression._(_ret, retain: false, release: true); + static NSURLConnection alloc() { + final _ret = _objc_msgSend_40(_class_NSURLConnection, _sel_alloc); + return NSURLConnection.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSRegularExpression, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLConnection, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSRegularExpression, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLConnection, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSRegularExpression, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLConnection, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSRegularExpression, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSURLConnection, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSRegularExpression, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLConnection, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSRegularExpression, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLConnection, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSRegularExpression, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLConnection, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSRegularExpression, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLConnection, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSRegularExpression, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLConnection, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSRegularExpression = objc.getClass("NSRegularExpression"); - -abstract class NSRegularExpressionOptions { - static const int NSRegularExpressionCaseInsensitive = 1; - static const int NSRegularExpressionAllowCommentsAndWhitespace = 2; - static const int NSRegularExpressionIgnoreMetacharacters = 4; - static const int NSRegularExpressionDotMatchesLineSeparators = 8; - static const int NSRegularExpressionAnchorsMatchLines = 16; - static const int NSRegularExpressionUseUnixLineSeparators = 32; - static const int NSRegularExpressionUseUnicodeWordBoundaries = 64; -} - -late final _sel_regularExpressionWithPattern_options_error_ = - objc.registerName("regularExpressionWithPattern:options:error:"); -final _objc_msgSend_948 = objc.msgSendPointer +late final _class_NSURLConnection = objc.getClass("NSURLConnection"); +late final _sel_initWithRequest_delegate_startImmediately_ = + objc.registerName("initWithRequest:delegate:startImmediately:"); +final _objc_msgSend_534 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() + ffi.Pointer, + ffi.Bool)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_initWithPattern_options_error_ = - objc.registerName("initWithPattern:options:error:"); -final _objc_msgSend_949 = objc.msgSendPointer + ffi.Pointer, + bool)>(); +late final _sel_initWithRequest_delegate_ = + objc.registerName("initWithRequest:delegate:"); +final _objc_msgSend_535 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() + 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_950 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_connectionWithRequest_delegate_ = + objc.registerName("connectionWithRequest:delegate:"); +final _objc_msgSend_536 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + 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_537 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_numberOfCaptureGroups = - objc.registerName("numberOfCaptureGroups"); -late final _sel_escapedPatternForString_ = - objc.registerName("escapedPatternForString:"); - -abstract class NSMatchingOptions { - static const int NSMatchingReportProgress = 1; - static const int NSMatchingReportCompletion = 2; - static const int NSMatchingAnchored = 4; - static const int NSMatchingWithTransparentBounds = 8; - static const int NSMatchingWithoutAnchoringBounds = 16; -} - -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.Int32 arg1, ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, int, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry = - , int, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex = - 0; +late final _sel_unscheduleFromRunLoop_forMode_ = + objc.registerName("unscheduleFromRunLoop:forMode:"); +late final _sel_setDelegateQueue_ = objc.registerName("setDelegateQueue:"); +final _objc_msgSend_538 = 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_539 = 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_540 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex = 0; ffi.Pointer - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( - void Function(ffi.Pointer, int, ffi.Pointer) + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) fn) { final id = - ++_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ - id] = fn; + ++_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline( +void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[ block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool +class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._( ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( - pointer, - retain: retain, - release: release); + static ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._(pointer, + retain: retain, release: release); } /// Creates a block from a C function pointer. @@ -47782,20 +24647,22 @@ class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool /// This block must be invoked by native 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( + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Int32 arg1, ffi.Pointer arg2)>> + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> ptr) : this._(objc.newBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline) + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; @@ -47805,21 +24672,21 @@ class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool /// This block must be invoked by native 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?, int, ffi.Pointer) fn) + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunction( + void Function(NSURLResponse?, objc.NSData?, objc.NSError?) fn) : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSTextCheckingResult._(arg0, retain: true, release: true), arg1, arg2)))); + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : NSURLResponse.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : objc.NSData.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -47831,230 +24698,857 @@ class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool /// /// 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?, int, ffi.Pointer) fn) + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.listener( + void Function(NSURLResponse?, objc.NSData?, objc.NSError?) fn) : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) - ..keepIsolateAlive = false) + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) + ..keepIsolateAlive = false) .nativeFunction .cast(), - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( - (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSTextCheckingResult._(arg0, retain: true, release: true), arg1, arg2)))); + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( + (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.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer)>? _dartFuncListenerTrampoline; + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURLResponse? arg0, objc.NSData? arg1, objc.NSError? arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, + arg0?.pointer ?? ffi.nullptr, + arg1?.pointer ?? ffi.nullptr, + arg2?.pointer ?? ffi.nullptr); +} + +late final _sel_sendAsynchronousRequest_queue_completionHandler_ = + objc.registerName("sendAsynchronousRequest:queue:completionHandler:"); +final _objc_msgSend_541 = 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)>(); + +class NSURLCredential extends objc.NSObject { + NSURLCredential._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLCredential] that points to the same underlying object as [other]. + NSURLCredential.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLCredential] that wraps the given raw object pointer. + NSURLCredential.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLCredential]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLCredential); + } + + int get persistence { + return _objc_msgSend_542(this.pointer, _sel_persistence); + } + + NSURLCredential initWithUser_password_persistence_( + objc.NSString user, objc.NSString password, int persistence) { + final _ret = _objc_msgSend_543( + this.pointer, + _sel_initWithUser_password_persistence_, + user.pointer, + password.pointer, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + static NSURLCredential credentialWithUser_password_persistence_( + objc.NSString user, objc.NSString password, int persistence) { + final _ret = _objc_msgSend_544( + _class_NSURLCredential, + _sel_credentialWithUser_password_persistence_, + user.pointer, + password.pointer, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString? get user { + final _ret = _objc_msgSend_13(this.pointer, _sel_user); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString? get password { + final _ret = _objc_msgSend_13(this.pointer, _sel_password); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool get hasPassword { + return _objc_msgSend_7(this.pointer, _sel_hasPassword); + } + + NSURLCredential initWithIdentity_certificates_persistence_( + ffi.Pointer<__SecIdentity> identity, + objc.NSArray? certArray, + int persistence) { + final _ret = _objc_msgSend_545( + this.pointer, + _sel_initWithIdentity_certificates_persistence_, + identity, + certArray?.pointer ?? ffi.nullptr, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + static NSURLCredential credentialWithIdentity_certificates_persistence_( + ffi.Pointer<__SecIdentity> identity, + objc.NSArray? certArray, + int persistence) { + final _ret = _objc_msgSend_546( + _class_NSURLCredential, + _sel_credentialWithIdentity_certificates_persistence_, + identity, + certArray?.pointer ?? ffi.nullptr, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + ffi.Pointer<__SecIdentity> get identity { + return _objc_msgSend_547(this.pointer, _sel_identity); + } + + objc.NSArray get certificates { + final _ret = _objc_msgSend_6(this.pointer, _sel_certificates); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSURLCredential initWithTrust_(ffi.Pointer<__SecTrust> trust) { + final _ret = _objc_msgSend_548(this.pointer, _sel_initWithTrust_, trust); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + static NSURLCredential credentialForTrust_(ffi.Pointer<__SecTrust> trust) { + final _ret = _objc_msgSend_549( + _class_NSURLCredential, _sel_credentialForTrust_, trust); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSURLCredential init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + static NSURLCredential new1() { + final _ret = _objc_msgSend_40(_class_NSURLCredential, _sel_new); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLCredential allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLCredential, _sel_allocWithZone_, zone); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLCredential alloc() { + final _ret = _objc_msgSend_40(_class_NSURLCredential, _sel_alloc); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLCredential, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLCredential, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLCredential, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLCredential, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLCredential, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLCredential, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLCredential, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } - void call(NSTextCheckingResult? arg0, int arg1, ffi.Pointer arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Int32 arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLCredential, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLCredential, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } } -abstract class NSMatchingFlags { - static const int NSMatchingProgress = 1; - static const int NSMatchingCompleted = 2; - static const int NSMatchingHitEnd = 4; - static const int NSMatchingRequiredEnd = 8; - static const int NSMatchingInternalError = 16; +late final _class_NSURLCredential = objc.getClass("NSURLCredential"); + +abstract class NSURLCredentialPersistence { + static const int NSURLCredentialPersistenceNone = 0; + static const int NSURLCredentialPersistenceForSession = 1; + static const int NSURLCredentialPersistencePermanent = 2; + static const int NSURLCredentialPersistenceSynchronizable = 3; } -late final _sel_enumerateMatchesInString_options_range_usingBlock_ = - objc.registerName("enumerateMatchesInString:options:range:usingBlock:"); -final _objc_msgSend_951 = objc.msgSendPointer +late final _sel_persistence = objc.registerName("persistence"); +final _objc_msgSend_542 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Int32 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_543 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Int32)>>() .asFunction< - void Function( + instancetype 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_952 = objc.msgSendPointer + ffi.Pointer, + int)>(); +late final _sel_credentialWithUser_password_persistence_ = + objc.registerName("credentialWithUser:password:persistence:"); +final _objc_msgSend_544 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - _NSRange)>>() + ffi.Pointer, + ffi.Int32)>>() .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_953 = objc.msgSendPointer + ffi.Pointer, + int)>(); +late final _sel_user = objc.registerName("user"); +late final _sel_password = objc.registerName("password"); +late final _sel_hasPassword = objc.registerName("hasPassword"); + +final class __SecIdentity extends ffi.Opaque {} + +late final _sel_initWithIdentity_certificates_persistence_ = + objc.registerName("initWithIdentity:certificates:persistence:"); +final _objc_msgSend_545 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( + instancetype Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer<__SecIdentity>, ffi.Pointer, - ffi.Int32, - _NSRange)>>() + ffi.Int32)>>() .asFunction< - int Function( + instancetype Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer<__SecIdentity>, ffi.Pointer, - int, - _NSRange)>(); -late final _sel_firstMatchInString_options_range_ = - objc.registerName("firstMatchInString:options:range:"); -final _objc_msgSend_954 = objc.msgSendPointer + int)>(); +late final _sel_credentialWithIdentity_certificates_persistence_ = + objc.registerName("credentialWithIdentity:certificates:persistence:"); +final _objc_msgSend_546 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer<__SecIdentity>, ffi.Pointer, - ffi.Int32, - _NSRange)>>() + ffi.Int32)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer<__SecIdentity>, ffi.Pointer, - int, - _NSRange)>(); -late final _sel_rangeOfFirstMatchInString_options_range_ = - objc.registerName("rangeOfFirstMatchInString:options:range:"); -final _objc_msgSend_955 = objc.msgSendPointer + int)>(); +late final _sel_identity = objc.registerName("identity"); +final _objc_msgSend_547 = objc.msgSendPointer .cast< ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() + ffi.Pointer<__SecIdentity> Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -final _objc_msgSend_955Stret = objc.msgSendStretPointer + ffi.Pointer<__SecIdentity> Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_certificates = objc.registerName("certificates"); + +final class __SecTrust extends ffi.Opaque {} + +late final _sel_initWithTrust_ = objc.registerName("initWithTrust:"); +final _objc_msgSend_548 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>>() .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_956 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>(); +late final _sel_credentialForTrust_ = objc.registerName("credentialForTrust:"); +final _objc_msgSend_549 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>>() .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_957 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>(); + +class NSURLProtectionSpace extends objc.NSObject { + NSURLProtectionSpace._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLProtectionSpace] that points to the same underlying object as [other]. + NSURLProtectionSpace.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLProtectionSpace] that wraps the given raw object pointer. + NSURLProtectionSpace.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLProtectionSpace]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLProtectionSpace); + } + + NSURLProtectionSpace initWithHost_port_protocol_realm_authenticationMethod_( + objc.NSString host, + int port, + objc.NSString? protocol, + objc.NSString? realm, + objc.NSString? authenticationMethod) { + final _ret = _objc_msgSend_550( + 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); + } + + NSURLProtectionSpace initWithProxyHost_port_type_realm_authenticationMethod_( + objc.NSString host, + int port, + objc.NSString? type, + objc.NSString? realm, + objc.NSString? authenticationMethod) { + final _ret = _objc_msgSend_550( + 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); + } + + objc.NSString? get realm { + final _ret = _objc_msgSend_13(this.pointer, _sel_realm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool get receivesCredentialSecurely { + return _objc_msgSend_7(this.pointer, _sel_receivesCredentialSecurely); + } + + bool get isProxy { + return _objc_msgSend_7(this.pointer, _sel_isProxy); + } + + objc.NSString get host { + final _ret = _objc_msgSend_12(this.pointer, _sel_host); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + int get port { + return _objc_msgSend_114(this.pointer, _sel_port); + } + + objc.NSString? get proxyType { + final _ret = _objc_msgSend_13(this.pointer, _sel_proxyType); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString? get protocol { + final _ret = _objc_msgSend_13(this.pointer, _sel_protocol); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString get authenticationMethod { + final _ret = _objc_msgSend_12(this.pointer, _sel_authenticationMethod); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray? get distinguishedNames { + final _ret = _objc_msgSend_69(this.pointer, _sel_distinguishedNames); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + ffi.Pointer<__SecTrust> get serverTrust { + return _objc_msgSend_551(this.pointer, _sel_serverTrust); + } + + @override + NSURLProtectionSpace init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: true, release: true); + } + + static NSURLProtectionSpace new1() { + final _ret = _objc_msgSend_40(_class_NSURLProtectionSpace, _sel_new); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); + } + + static NSURLProtectionSpace allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLProtectionSpace, _sel_allocWithZone_, zone); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); + } + + static NSURLProtectionSpace alloc() { + final _ret = _objc_msgSend_40(_class_NSURLProtectionSpace, _sel_alloc); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLProtectionSpace, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLProtectionSpace, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLProtectionSpace, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLProtectionSpace, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLProtectionSpace, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLProtectionSpace, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLProtectionSpace, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLProtectionSpace, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLProtectionSpace, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLProtectionSpace = objc.getClass("NSURLProtectionSpace"); +late final _sel_initWithHost_port_protocol_realm_authenticationMethod_ = + objc.registerName("initWithHost:port:protocol:realm:authenticationMethod:"); +final _objc_msgSend_550 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - _NSRange, + ffi.Long, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, int, - _NSRange, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -late final _sel_replacementStringForResult_inString_offset_template_ = - objc.registerName("replacementStringForResult:inString:offset:template:"); -final _objc_msgSend_958 = objc.msgSendPointer +late final _sel_initWithProxyHost_port_type_realm_authenticationMethod_ = objc + .registerName("initWithProxyHost:port:type:realm:authenticationMethod:"); +late final _sel_realm = objc.registerName("realm"); +late final _sel_receivesCredentialSecurely = + objc.registerName("receivesCredentialSecurely"); +late final _sel_isProxy = objc.registerName("isProxy"); +late final _sel_host = objc.registerName("host"); +late final _sel_proxyType = objc.registerName("proxyType"); +late final _sel_protocol = objc.registerName("protocol"); +late final _sel_authenticationMethod = + objc.registerName("authenticationMethod"); +late final _sel_distinguishedNames = objc.registerName("distinguishedNames"); +late final _sel_serverTrust = objc.registerName("serverTrust"); +final _objc_msgSend_551 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer)>>() + ffi.Pointer<__SecTrust> Function(ffi.Pointer, + 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_959 = objc.msgSendPointer + ffi.Pointer<__SecTrust> Function( + ffi.Pointer, ffi.Pointer)>(); + +class NSURLCredentialStorage extends objc.NSObject { + NSURLCredentialStorage._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLCredentialStorage] that points to the same underlying object as [other]. + NSURLCredentialStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLCredentialStorage] that wraps the given raw object pointer. + NSURLCredentialStorage.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLCredentialStorage); + } + + static NSURLCredentialStorage getSharedCredentialStorage() { + final _ret = _objc_msgSend_552( + _class_NSURLCredentialStorage, _sel_sharedCredentialStorage); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); + } + + objc.NSDictionary? credentialsForProtectionSpace_( + NSURLProtectionSpace space) { + final _ret = _objc_msgSend_553( + this.pointer, _sel_credentialsForProtectionSpace_, space.pointer); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSDictionary get allCredentials { + final _ret = _objc_msgSend_112(this.pointer, _sel_allCredentials); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + void setCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_554(this.pointer, _sel_setCredential_forProtectionSpace_, + credential.pointer, space.pointer); + } + + void removeCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_554(this.pointer, _sel_removeCredential_forProtectionSpace_, + credential.pointer, space.pointer); + } + + void removeCredential_forProtectionSpace_options_(NSURLCredential credential, + NSURLProtectionSpace space, objc.NSDictionary? options) { + _objc_msgSend_555( + this.pointer, + _sel_removeCredential_forProtectionSpace_options_, + credential.pointer, + space.pointer, + options?.pointer ?? ffi.nullptr); + } + + NSURLCredential? defaultCredentialForProtectionSpace_( + NSURLProtectionSpace space) { + final _ret = _objc_msgSend_556( + this.pointer, _sel_defaultCredentialForProtectionSpace_, space.pointer); + return _ret.address == 0 + ? null + : NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + void setDefaultCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_554( + this.pointer, + _sel_setDefaultCredential_forProtectionSpace_, + credential.pointer, + space.pointer); + } + + void getCredentialsForProtectionSpace_task_completionHandler_( + NSURLProtectionSpace protectionSpace, + NSURLSessionTask task, + ObjCBlock_ffiVoid_NSDictionary completionHandler) { + _objc_msgSend_557( + this.pointer, + _sel_getCredentialsForProtectionSpace_task_completionHandler_, + protectionSpace.pointer, + task.pointer, + completionHandler.pointer); + } + + void setCredential_forProtectionSpace_task_(NSURLCredential credential, + NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { + _objc_msgSend_558(this.pointer, _sel_setCredential_forProtectionSpace_task_, + credential.pointer, protectionSpace.pointer, task.pointer); + } + + void removeCredential_forProtectionSpace_options_task_( + NSURLCredential credential, + NSURLProtectionSpace protectionSpace, + objc.NSDictionary? options, + NSURLSessionTask task) { + _objc_msgSend_559( + this.pointer, + _sel_removeCredential_forProtectionSpace_options_task_, + credential.pointer, + protectionSpace.pointer, + options?.pointer ?? ffi.nullptr, + task.pointer); + } + + void getDefaultCredentialForProtectionSpace_task_completionHandler_( + NSURLProtectionSpace space, + NSURLSessionTask task, + ObjCBlock_ffiVoid_NSURLCredential completionHandler) { + _objc_msgSend_560( + this.pointer, + _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_, + space.pointer, + task.pointer, + completionHandler.pointer); + } + + void setDefaultCredential_forProtectionSpace_task_(NSURLCredential credential, + NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { + _objc_msgSend_558( + this.pointer, + _sel_setDefaultCredential_forProtectionSpace_task_, + credential.pointer, + protectionSpace.pointer, + task.pointer); + } + + @override + NSURLCredentialStorage init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); + } + + static NSURLCredentialStorage new1() { + final _ret = _objc_msgSend_40(_class_NSURLCredentialStorage, _sel_new); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); + } + + static NSURLCredentialStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLCredentialStorage, _sel_allocWithZone_, zone); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); + } + + static NSURLCredentialStorage alloc() { + final _ret = _objc_msgSend_40(_class_NSURLCredentialStorage, _sel_alloc); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLCredentialStorage, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLCredentialStorage, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLCredentialStorage, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLCredentialStorage, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLCredentialStorage, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLCredentialStorage, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLCredentialStorage, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLCredentialStorage, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLCredentialStorage, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLCredentialStorage = + objc.getClass("NSURLCredentialStorage"); +late final _sel_sharedCredentialStorage = + objc.registerName("sharedCredentialStorage"); +final _objc_msgSend_552 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -48062,405 +25556,604 @@ final _objc_msgSend_959 = objc.msgSendPointer .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:"); -late final _sel_rangeWithName_ = objc.registerName("rangeWithName:"); -late final _sel_resultByAdjustingRangesWithOffset_ = - objc.registerName("resultByAdjustingRangesWithOffset:"); -final _objc_msgSend_960 = 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_961 = objc.msgSendPointer +late final _sel_credentialsForProtectionSpace_ = + objc.registerName("credentialsForProtectionSpace:"); +final _objc_msgSend_553 = 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_962 = 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_963 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allCredentials = objc.registerName("allCredentials"); +late final _sel_setCredential_forProtectionSpace_ = + objc.registerName("setCredential:forProtectionSpace:"); +final _objc_msgSend_554 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - _NSRange, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_dateCheckingResultWithRange_date_ = - objc.registerName("dateCheckingResultWithRange:date:"); -final _objc_msgSend_964 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( ffi.Pointer, - ffi.Pointer, - _NSRange, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, - _NSRange, + ffi.Pointer, ffi.Pointer)>(); -late final _sel_dateCheckingResultWithRange_date_timeZone_duration_ = - objc.registerName("dateCheckingResultWithRange:date:timeZone:duration:"); -final _objc_msgSend_965 = objc.msgSendPointer +late final _sel_removeCredential_forProtectionSpace_ = + objc.registerName("removeCredential:forProtectionSpace:"); +late final _sel_removeCredential_forProtectionSpace_options_ = + objc.registerName("removeCredential:forProtectionSpace:options:"); +final _objc_msgSend_555 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer, ffi.Pointer, - ffi.Double)>>() + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer, ffi.Pointer, - double)>(); -late final _sel_addressCheckingResultWithRange_components_ = - objc.registerName("addressCheckingResultWithRange:components:"); -final _objc_msgSend_966 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_defaultCredentialForProtectionSpace_ = + objc.registerName("defaultCredentialForProtectionSpace:"); +final _objc_msgSend_556 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_linkCheckingResultWithRange_URL_ = - objc.registerName("linkCheckingResultWithRange:URL:"); -final _objc_msgSend_967 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDefaultCredential_forProtectionSpace_ = + objc.registerName("setDefaultCredential:forProtectionSpace:"); +void _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSDictionary_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[block.ref.target.address]!( + arg0); + +class ObjCBlock_ffiVoid_NSDictionary extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSDictionary._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSDictionary castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSDictionary._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary.fromFunction(void Function(objc.NSDictionary?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSDictionary.listener(void Function(objc.NSDictionary?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(objc.NSDictionary? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_getCredentialsForProtectionSpace_task_completionHandler_ = objc + .registerName("getCredentialsForProtectionSpace:task:completionHandler:"); +final _objc_msgSend_557 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - _NSRange, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_quoteCheckingResultWithRange_replacementString_ = - objc.registerName("quoteCheckingResultWithRange:replacementString:"); -final _objc_msgSend_968 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_setCredential_forProtectionSpace_task_ = + objc.registerName("setCredential:forProtectionSpace:task:"); +final _objc_msgSend_558 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - _NSRange, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, - _NSRange, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -late final _sel_dashCheckingResultWithRange_replacementString_ = - objc.registerName("dashCheckingResultWithRange:replacementString:"); -late final _sel_replacementCheckingResultWithRange_replacementString_ = - objc.registerName("replacementCheckingResultWithRange:replacementString:"); -late final _sel_correctionCheckingResultWithRange_replacementString_ = - objc.registerName("correctionCheckingResultWithRange:replacementString:"); -late final _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_ = - objc.registerName( - "correctionCheckingResultWithRange:replacementString:alternativeStrings:"); -final _objc_msgSend_969 = objc.msgSendPointer +late final _sel_removeCredential_forProtectionSpace_options_task_ = + objc.registerName("removeCredential:forProtectionSpace:options:task:"); +final _objc_msgSend_559 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - _NSRange, + ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, - _NSRange, + ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_ = +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); +final _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[ + block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_NSURLCredential extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSURLCredential._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSURLCredential castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSURLCredential._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLCredential.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLCredential.fromFunction( + void Function(NSURLCredential?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSURLCredential.castFromPointer(arg0, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURLCredential.listener(void Function(NSURLCredential?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSURLCredential.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(NSURLCredential? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_ = objc.registerName( - "regularExpressionCheckingResultWithRanges:count:regularExpression:"); -final _objc_msgSend_970 = objc.msgSendPointer + "getDefaultCredentialForProtectionSpace:task:completionHandler:"); +final _objc_msgSend_560 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSRange>, - ffi.UnsignedLong, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSRange>, - int, - ffi.Pointer)>(); -late final _sel_phoneNumberCheckingResultWithRange_phoneNumber_ = - objc.registerName("phoneNumberCheckingResultWithRange:phoneNumber:"); -late final _sel_transitInformationCheckingResultWithRange_components_ = - objc.registerName("transitInformationCheckingResultWithRange:components:"); + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_setDefaultCredential_forProtectionSpace_task_ = + objc.registerName("setDefaultCredential:forProtectionSpace:task:"); -class NSURLCache extends NSObject { - NSURLCache._(ffi.Pointer pointer, +class NSURLProtocol extends objc.NSObject { + NSURLProtocol._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLCache] that points to the same underlying object as [other]. - static NSURLCache castFrom(T other) { - return NSURLCache._(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.pointer, retain: true, release: true); - /// Returns a [NSURLCache] that wraps the given raw object pointer. - static NSURLCache castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCache._(other, retain: retain, release: release); - } + /// 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 [NSURLCache]. + /// Returns whether [obj] is an instance of [NSURLProtocol]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSURLCache); - } - - static NSURLCache getSharedURLCache() { - final _ret = _objc_msgSend_971(_class_NSURLCache, _sel_sharedURLCache); - return NSURLCache._(_ret, retain: true, release: true); + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLProtocol); } - static void setSharedURLCache(NSURLCache value) { - return _objc_msgSend_972( - _class_NSURLCache, _sel_setSharedURLCache_, value.pointer); + NSURLProtocol initWithRequest_cachedResponse_client_(NSURLRequest request, + NSCachedURLResponse? cachedResponse, objc.NSObject? client) { + final _ret = _objc_msgSend_561( + this.pointer, + _sel_initWithRequest_cachedResponse_client_, + request.pointer, + cachedResponse?.pointer ?? ffi.nullptr, + client?.pointer ?? ffi.nullptr); + return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); } - NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( - int memoryCapacity, int diskCapacity, NSString? path) { - final _ret = _objc_msgSend_973( - this.pointer, - _sel_initWithMemoryCapacity_diskCapacity_diskPath_, - memoryCapacity, - diskCapacity, - path?.pointer ?? ffi.nullptr); - return NSURLCache._(_ret, retain: true, release: true); + objc.NSObject? get client { + final _ret = _objc_msgSend_66(this.pointer, _sel_client); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( - int memoryCapacity, int diskCapacity, NSURL? directoryURL) { - final _ret = _objc_msgSend_974( - this.pointer, - _sel_initWithMemoryCapacity_diskCapacity_directoryURL_, - memoryCapacity, - diskCapacity, - directoryURL?.pointer ?? ffi.nullptr); - return NSURLCache._(_ret, retain: true, release: true); + NSURLRequest get request { + final _ret = _objc_msgSend_537(this.pointer, _sel_request); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_979( - this.pointer, _sel_cachedResponseForRequest_, request.pointer); + NSCachedURLResponse? get cachedResponse { + final _ret = _objc_msgSend_562(this.pointer, _sel_cachedResponse); return _ret.address == 0 ? null - : NSCachedURLResponse._(_ret, retain: true, release: true); + : NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - void storeCachedResponse_forRequest_( - NSCachedURLResponse cachedResponse, NSURLRequest request) { - _objc_msgSend_980(this.pointer, _sel_storeCachedResponse_forRequest_, - cachedResponse.pointer, request.pointer); + static bool canInitWithRequest_(NSURLRequest request) { + return _objc_msgSend_539( + _class_NSURLProtocol, _sel_canInitWithRequest_, request.pointer); } - void removeCachedResponseForRequest_(NSURLRequest request) { - _objc_msgSend_981( - this.pointer, _sel_removeCachedResponseForRequest_, request.pointer); + static NSURLRequest canonicalRequestForRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_563(_class_NSURLProtocol, + _sel_canonicalRequestForRequest_, request.pointer); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - void removeAllCachedResponses() { - _objc_msgSend_1(this.pointer, _sel_removeAllCachedResponses); + static bool requestIsCacheEquivalent_toRequest_( + NSURLRequest a, NSURLRequest b) { + return _objc_msgSend_564(_class_NSURLProtocol, + _sel_requestIsCacheEquivalent_toRequest_, a.pointer, b.pointer); } - void removeCachedResponsesSinceDate_(NSDate date) { - _objc_msgSend_540( - this.pointer, _sel_removeCachedResponsesSinceDate_, date.pointer); + void startLoading() { + _objc_msgSend_82(this.pointer, _sel_startLoading); } - int get memoryCapacity { - return _objc_msgSend_10(this.pointer, _sel_memoryCapacity); + void stopLoading() { + _objc_msgSend_82(this.pointer, _sel_stopLoading); } - set memoryCapacity(int value) { - return _objc_msgSend_516(this.pointer, _sel_setMemoryCapacity_, value); + static objc.NSObject? propertyForKey_inRequest_( + objc.NSString key, NSURLRequest request) { + final _ret = _objc_msgSend_565(_class_NSURLProtocol, + _sel_propertyForKey_inRequest_, key.pointer, request.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get diskCapacity { - return _objc_msgSend_10(this.pointer, _sel_diskCapacity); + static void setProperty_forKey_inRequest_( + objc.NSObject value, objc.NSString key, NSMutableURLRequest request) { + _objc_msgSend_573(_class_NSURLProtocol, _sel_setProperty_forKey_inRequest_, + value.pointer, key.pointer, request.pointer); } - set diskCapacity(int value) { - return _objc_msgSend_516(this.pointer, _sel_setDiskCapacity_, value); + static void removePropertyForKey_inRequest_( + objc.NSString key, NSMutableURLRequest request) { + _objc_msgSend_574(_class_NSURLProtocol, + _sel_removePropertyForKey_inRequest_, key.pointer, request.pointer); } - int get currentMemoryUsage { - return _objc_msgSend_10(this.pointer, _sel_currentMemoryUsage); + static bool registerClass_(objc.NSObject protocolClass) { + return _objc_msgSend_0( + _class_NSURLProtocol, _sel_registerClass_, protocolClass.pointer); } - int get currentDiskUsage { - return _objc_msgSend_10(this.pointer, _sel_currentDiskUsage); + static void unregisterClass_(objc.NSObject protocolClass) { + _objc_msgSend_49( + _class_NSURLProtocol, _sel_unregisterClass_, protocolClass.pointer); } - void storeCachedResponse_forDataTask_( - NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { - _objc_msgSend_982(this.pointer, _sel_storeCachedResponse_forDataTask_, - cachedResponse.pointer, dataTask.pointer); + static bool canInitWithTask_(NSURLSessionTask task) { + return _objc_msgSend_575( + _class_NSURLProtocol, _sel_canInitWithTask_, task.pointer); } - void getCachedResponseForDataTask_completionHandler_( - NSURLSessionDataTask dataTask, - ObjCBlock_ffiVoid_NSCachedURLResponse completionHandler) { - _objc_msgSend_983( + NSURLProtocol initWithTask_cachedResponse_client_(NSURLSessionTask task, + NSCachedURLResponse? cachedResponse, objc.NSObject? client) { + final _ret = _objc_msgSend_576( this.pointer, - _sel_getCachedResponseForDataTask_completionHandler_, - dataTask.pointer, - completionHandler.pointer); + _sel_initWithTask_cachedResponse_client_, + task.pointer, + cachedResponse?.pointer ?? ffi.nullptr, + client?.pointer ?? ffi.nullptr); + return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); } - void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { - _objc_msgSend_984( - this.pointer, _sel_removeCachedResponseForDataTask_, dataTask.pointer); + NSURLSessionTask? get task { + final _ret = _objc_msgSend_577(this.pointer, _sel_task); + return _ret.address == 0 + ? null + : NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); } @override - NSURLCache init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLCache._(_ret, retain: true, release: true); + NSURLProtocol init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); } - static NSURLCache new1() { - final _ret = _objc_msgSend_2(_class_NSURLCache, _sel_new); - return NSURLCache._(_ret, retain: false, release: true); + static NSURLProtocol new1() { + final _ret = _objc_msgSend_40(_class_NSURLProtocol, _sel_new); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } - static NSURLCache allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSURLCache, _sel_allocWithZone_, zone); - return NSURLCache._(_ret, retain: false, release: true); + static NSURLProtocol allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLProtocol, _sel_allocWithZone_, zone); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } - static NSURLCache alloc() { - final _ret = _objc_msgSend_2(_class_NSURLCache, _sel_alloc); - return NSURLCache._(_ret, retain: false, release: true); + static NSURLProtocol alloc() { + final _ret = _objc_msgSend_40(_class_NSURLProtocol, _sel_alloc); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLCache, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLProtocol, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLCache, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLProtocol, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLCache, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLProtocol, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLCache, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSURLProtocol, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLCache, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLProtocol, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLCache, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLProtocol, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLCache, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLProtocol, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLCache, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLProtocol, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSURLCache, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSURLProtocol, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSURLCache = objc.getClass("NSURLCache"); -late final _sel_sharedURLCache = objc.registerName("sharedURLCache"); -final _objc_msgSend_971 = objc.msgSendPointer +late final _class_NSURLProtocol = objc.getClass("NSURLProtocol"); +late final _sel_initWithRequest_cachedResponse_client_ = + objc.registerName("initWithRequest:cachedResponse:client:"); +final _objc_msgSend_561 = 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_562 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -48468,567 +26161,480 @@ final _objc_msgSend_971 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setSharedURLCache_ = objc.registerName("setSharedURLCache:"); -final _objc_msgSend_972 = objc.msgSendPointer +late final _sel_canInitWithRequest_ = objc.registerName("canInitWithRequest:"); +late final _sel_canonicalRequestForRequest_ = + objc.registerName("canonicalRequestForRequest:"); +final _objc_msgSend_563 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_ = - objc.registerName("initWithMemoryCapacity:diskCapacity:diskPath:"); -final _objc_msgSend_973 = objc.msgSendPointer +late final _sel_requestIsCacheEquivalent_toRequest_ = + objc.registerName("requestIsCacheEquivalent:toRequest:"); +final _objc_msgSend_564 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - instancetype Function( + bool Function( ffi.Pointer, ffi.Pointer, - int, - int, + ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_ = - objc.registerName("initWithMemoryCapacity:diskCapacity:directoryURL:"); -final _objc_msgSend_974 = objc.msgSendPointer +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_565 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - int, - int, + ffi.Pointer, ffi.Pointer)>(); -class NSCachedURLResponse extends NSObject { - NSCachedURLResponse._(ffi.Pointer pointer, +class NSMutableURLRequest extends NSURLRequest { + NSMutableURLRequest._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSCachedURLResponse] that points to the same underlying object as [other]. - static NSCachedURLResponse castFrom(T other) { - return NSCachedURLResponse._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSMutableURLRequest] that points to the same underlying object as [other]. + NSMutableURLRequest.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSCachedURLResponse] that wraps the given raw object pointer. - static NSCachedURLResponse castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCachedURLResponse._(other, retain: retain, release: release); - } + /// Constructs a [NSMutableURLRequest] that wraps the given raw object pointer. + NSMutableURLRequest.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSCachedURLResponse]. + /// Returns whether [obj] is an instance of [NSMutableURLRequest]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSCachedURLResponse); + obj.pointer, _sel_isKindOfClass_, _class_NSMutableURLRequest); } - NSCachedURLResponse initWithResponse_data_( - NSURLResponse response, NSData data) { - final _ret = _objc_msgSend_975(this.pointer, _sel_initWithResponse_data_, - response.pointer, data.pointer); - return NSCachedURLResponse._(_ret, retain: true, release: true); + @override + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( - NSURLResponse response, - NSData data, - NSDictionary? userInfo, - int storagePolicy) { - final _ret = _objc_msgSend_976( - this.pointer, - _sel_initWithResponse_data_userInfo_storagePolicy_, - response.pointer, - data.pointer, - userInfo?.pointer ?? ffi.nullptr, - storagePolicy); - return NSCachedURLResponse._(_ret, retain: true, release: true); + set URL(objc.NSURL? value) { + return _objc_msgSend_566( + this.pointer, _sel_setURL_, value?.pointer ?? ffi.nullptr); } - NSURLResponse get response { - final _ret = _objc_msgSend_977(this.pointer, _sel_response); - return NSURLResponse._(_ret, retain: true, release: true); + @override + int get cachePolicy { + return _objc_msgSend_322(this.pointer, _sel_cachePolicy); + } + + set cachePolicy(int value) { + return _objc_msgSend_567(this.pointer, _sel_setCachePolicy_, value); + } + + @override + double get timeoutInterval { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutInterval) + : _objc_msgSend_115(this.pointer, _sel_timeoutInterval); } - NSData get data { - final _ret = _objc_msgSend_43(this.pointer, _sel_data); - return NSData._(_ret, retain: true, release: true); + set timeoutInterval(double value) { + return _objc_msgSend_212(this.pointer, _sel_setTimeoutInterval_, value); } - NSDictionary? get userInfo { - final _ret = _objc_msgSend_390(this.pointer, _sel_userInfo); + @override + objc.NSURL? get mainDocumentURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_mainDocumentURL); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - int get storagePolicy { - return _objc_msgSend_978(this.pointer, _sel_storagePolicy); + set mainDocumentURL(objc.NSURL? value) { + return _objc_msgSend_566( + this.pointer, _sel_setMainDocumentURL_, value?.pointer ?? ffi.nullptr); } @override - NSCachedURLResponse init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSCachedURLResponse._(_ret, retain: true, release: true); + int get networkServiceType { + return _objc_msgSend_323(this.pointer, _sel_networkServiceType); } - static NSCachedURLResponse new1() { - final _ret = _objc_msgSend_2(_class_NSCachedURLResponse, _sel_new); - return NSCachedURLResponse._(_ret, retain: false, release: true); + set networkServiceType(int value) { + return _objc_msgSend_568(this.pointer, _sel_setNetworkServiceType_, value); } - static NSCachedURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSCachedURLResponse, _sel_allocWithZone_, zone); - return NSCachedURLResponse._(_ret, retain: false, release: true); + @override + bool get allowsCellularAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsCellularAccess); } - static NSCachedURLResponse alloc() { - final _ret = _objc_msgSend_2(_class_NSCachedURLResponse, _sel_alloc); - return NSCachedURLResponse._(_ret, retain: false, release: true); + set allowsCellularAccess(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setAllowsCellularAccess_, value); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSCachedURLResponse, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + @override + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsExpensiveNetworkAccess); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSCachedURLResponse, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + set allowsExpensiveNetworkAccess(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSCachedURLResponse, _sel_accessInstanceVariablesDirectly); + @override + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsConstrainedNetworkAccess); } - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSCachedURLResponse, _sel_useStoredAccessor); + set allowsConstrainedNetworkAccess(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSCachedURLResponse, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + @override + bool get assumesHTTP3Capable { + return _objc_msgSend_7(this.pointer, _sel_assumesHTTP3Capable); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSCachedURLResponse, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + set assumesHTTP3Capable(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setAssumesHTTP3Capable_, value); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSCachedURLResponse, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + @override + int get attribution { + return _objc_msgSend_324(this.pointer, _sel_attribution); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSCachedURLResponse, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + set attribution(int value) { + return _objc_msgSend_569(this.pointer, _sel_setAttribution_, value); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSCachedURLResponse, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + @override + bool get requiresDNSSECValidation { + return _objc_msgSend_7(this.pointer, _sel_requiresDNSSECValidation); } -} -late final _class_NSCachedURLResponse = objc.getClass("NSCachedURLResponse"); -late final _sel_initWithResponse_data_ = - objc.registerName("initWithResponse:data:"); -final _objc_msgSend_975 = 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)>(); + set requiresDNSSECValidation(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setRequiresDNSSECValidation_, value); + } -abstract class NSURLCacheStoragePolicy { - static const int NSURLCacheStorageAllowed = 0; - static const int NSURLCacheStorageAllowedInMemoryOnly = 1; - static const int NSURLCacheStorageNotAllowed = 2; -} + objc.NSString get HTTPMethod { + final _ret = _objc_msgSend_12(this.pointer, _sel_HTTPMethod); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -late final _sel_initWithResponse_data_userInfo_storagePolicy_ = - objc.registerName("initWithResponse:data:userInfo:storagePolicy:"); -final _objc_msgSend_976 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -final _objc_msgSend_977 = 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_978 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_cachedResponseForRequest_ = - objc.registerName("cachedResponseForRequest:"); -final _objc_msgSend_979 = 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_980 = 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_981 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_removeAllCachedResponses = - objc.registerName("removeAllCachedResponses"); -late final _sel_removeCachedResponsesSinceDate_ = - objc.registerName("removeCachedResponsesSinceDate:"); -late final _sel_memoryCapacity = objc.registerName("memoryCapacity"); -late final _sel_setMemoryCapacity_ = objc.registerName("setMemoryCapacity:"); -late final _sel_diskCapacity = objc.registerName("diskCapacity"); -late final _sel_setDiskCapacity_ = objc.registerName("setDiskCapacity:"); -late final _sel_currentMemoryUsage = objc.registerName("currentMemoryUsage"); -late final _sel_currentDiskUsage = objc.registerName("currentDiskUsage"); + set HTTPMethod(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setHTTPMethod_, value.pointer); + } -class NSURLSessionDataTask extends NSURLSessionTask { - NSURLSessionDataTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + @override + objc.NSDictionary? get allHTTPHeaderFields { + final _ret = _objc_msgSend_65(this.pointer, _sel_allHTTPHeaderFields); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a [NSURLSessionDataTask] that points to the same underlying object as [other]. - static NSURLSessionDataTask castFrom(T other) { - return NSURLSessionDataTask._(other.pointer, retain: true, release: true); + set allHTTPHeaderFields(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setAllHTTPHeaderFields_, + value?.pointer ?? ffi.nullptr); } - /// Returns a [NSURLSessionDataTask] that wraps the given raw object pointer. - static NSURLSessionDataTask castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLSessionDataTask._(other, retain: retain, release: release); + void setValue_forHTTPHeaderField_(objc.NSString? value, objc.NSString field) { + _objc_msgSend_570(this.pointer, _sel_setValue_forHTTPHeaderField_, + value?.pointer ?? ffi.nullptr, field.pointer); } - /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionDataTask); + void addValue_forHTTPHeaderField_(objc.NSString value, objc.NSString field) { + _objc_msgSend_201(this.pointer, _sel_addValue_forHTTPHeaderField_, + value.pointer, field.pointer); } @override - NSURLSessionDataTask init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionDataTask._(_ret, retain: true, release: true); + objc.NSData? get HTTPBody { + final _ret = _objc_msgSend_325(this.pointer, _sel_HTTPBody); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionDataTask new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionDataTask, _sel_new); - return NSURLSessionDataTask._(_ret, retain: false, release: true); + set HTTPBody(objc.NSData? value) { + return _objc_msgSend_571( + this.pointer, _sel_setHTTPBody_, value?.pointer ?? ffi.nullptr); } - static NSURLSessionDataTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + @override + NSInputStream? get HTTPBodyStream { + final _ret = _objc_msgSend_342(this.pointer, _sel_HTTPBodyStream); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); + } + + set HTTPBodyStream(NSInputStream? value) { + return _objc_msgSend_572( + this.pointer, _sel_setHTTPBodyStream_, value?.pointer ?? ffi.nullptr); + } + + @override + bool get HTTPShouldHandleCookies { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldHandleCookies); + } + + set HTTPShouldHandleCookies(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHTTPShouldHandleCookies_, value); + } + + @override + bool get HTTPShouldUsePipelining { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldUsePipelining); + } + + set HTTPShouldUsePipelining(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHTTPShouldUsePipelining_, value); + } + + static NSMutableURLRequest requestWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_320( + _class_NSMutableURLRequest, _sel_requestWithURL_, URL.pointer); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); + } + + static bool getSupportsSecureCoding() { + return _objc_msgSend_7( + _class_NSMutableURLRequest, _sel_supportsSecureCoding); + } + + static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + _class_NSMutableURLRequest, + _sel_requestWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableURLRequest initWithURL_(objc.NSURL URL) { final _ret = - _objc_msgSend_3(_class_NSURLSessionDataTask, _sel_allocWithZone_, zone); - return NSURLSessionDataTask._(_ret, retain: false, release: true); + _objc_msgSend_320(this.pointer, _sel_initWithURL_, URL.pointer); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - static NSURLSessionDataTask alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSessionDataTask, _sel_alloc); - return NSURLSessionDataTask._(_ret, retain: false, release: true); + @override + NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + this.pointer, + _sel_initWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableURLRequest init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableURLRequest new1() { + final _ret = _objc_msgSend_40(_class_NSMutableURLRequest, _sel_new); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); + } + + static NSMutableURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSMutableURLRequest, _sel_allocWithZone_, zone); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); + } + + static NSMutableURLRequest alloc() { + final _ret = _objc_msgSend_40(_class_NSMutableURLRequest, _sel_alloc); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionDataTask, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMutableURLRequest, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionDataTask, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMutableURLRequest, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSessionDataTask, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSMutableURLRequest, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLSessionDataTask, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSMutableURLRequest, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionDataTask, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMutableURLRequest, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionDataTask, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMutableURLRequest, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionDataTask, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMutableURLRequest, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSessionDataTask, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMutableURLRequest, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLSessionDataTask, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMutableURLRequest, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_982 = objc.msgSendPointer +late final _class_NSMutableURLRequest = objc.getClass("NSMutableURLRequest"); +late final _sel_setURL_ = objc.registerName("setURL:"); +final _objc_msgSend_566 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[ - block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_NSCachedURLResponse extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSCachedURLResponse._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSCachedURLResponse castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSCachedURLResponse._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunction( - void Function(NSCachedURLResponse?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSCachedURLResponse._(arg0, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSCachedURLResponse.listener( - void Function(NSCachedURLResponse?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSCachedURLResponse._(arg0, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSCachedURLResponse? arg0) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr); -} - -late final _sel_getCachedResponseForDataTask_completionHandler_ = - objc.registerName("getCachedResponseForDataTask:completionHandler:"); -final _objc_msgSend_983 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCachePolicy_ = objc.registerName("setCachePolicy:"); +final _objc_msgSend_567 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_568 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_569 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_570 = 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)>(); -late final _sel_removeCachedResponseForDataTask_ = - objc.registerName("removeCachedResponseForDataTask:"); -final _objc_msgSend_984 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_addValue_forHTTPHeaderField_ = + objc.registerName("addValue:forHTTPHeaderField:"); +late final _sel_setHTTPBody_ = objc.registerName("setHTTPBody:"); +final _objc_msgSend_571 = 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_572 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -49038,1275 +26644,1298 @@ final _objc_msgSend_984 = objc.msgSendPointer .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_573 = 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_574 = 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_575 = 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_576 = 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_577 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); -class NSURLConnection extends NSObject { - NSURLConnection._(ffi.Pointer pointer, +class NSXMLParser extends objc.NSObject { + NSXMLParser._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLConnection] that points to the same underlying object as [other]. - static NSURLConnection castFrom(T other) { - return NSURLConnection._(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.pointer, retain: true, release: true); - /// Returns a [NSURLConnection] that wraps the given raw object pointer. - static NSURLConnection castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLConnection._(other, retain: retain, release: release); - } + /// 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 [NSURLConnection]. + /// Returns whether [obj] is an instance of [NSXMLParser]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLConnection); + obj.pointer, _sel_isKindOfClass_, _class_NSXMLParser); } - NSURLConnection? initWithRequest_delegate_startImmediately_( - NSURLRequest request, NSObject? delegate, bool startImmediately) { - final _ret = _objc_msgSend_985( - this.pointer, - _sel_initWithRequest_delegate_startImmediately_, - request.pointer, - delegate?.pointer ?? ffi.nullptr, - startImmediately); + NSXMLParser? initWithContentsOfURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_3(this.pointer, _sel_initWithContentsOfURL_, url.pointer); return _ret.address == 0 ? null - : NSURLConnection._(_ret, retain: true, release: true); + : NSXMLParser.castFromPointer(_ret, retain: true, release: true); } - NSURLConnection? initWithRequest_delegate_( - NSURLRequest request, NSObject? delegate) { - final _ret = _objc_msgSend_986(this.pointer, _sel_initWithRequest_delegate_, - request.pointer, delegate?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURLConnection._(_ret, retain: true, release: true); + NSXMLParser initWithData_(objc.NSData data) { + final _ret = + _objc_msgSend_340(this.pointer, _sel_initWithData_, data.pointer); + return NSXMLParser.castFromPointer(_ret, retain: true, release: true); } - static NSURLConnection? connectionWithRequest_delegate_( - NSURLRequest request, NSObject? delegate) { - final _ret = _objc_msgSend_987( - _class_NSURLConnection, - _sel_connectionWithRequest_delegate_, - request.pointer, - delegate?.pointer ?? ffi.nullptr); + NSXMLParser initWithStream_(NSInputStream stream) { + final _ret = + _objc_msgSend_578(this.pointer, _sel_initWithStream_, stream.pointer); + return NSXMLParser.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); return _ret.address == 0 ? null - : NSURLConnection._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSURLRequest get originalRequest { - final _ret = _objc_msgSend_988(this.pointer, _sel_originalRequest); - return NSURLRequest._(_ret, retain: true, release: true); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - NSURLRequest get currentRequest { - final _ret = _objc_msgSend_988(this.pointer, _sel_currentRequest); - return NSURLRequest._(_ret, retain: true, release: true); + bool get shouldProcessNamespaces { + return _objc_msgSend_7(this.pointer, _sel_shouldProcessNamespaces); } - void start() { - _objc_msgSend_1(this.pointer, _sel_start); + set shouldProcessNamespaces(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldProcessNamespaces_, value); } - void cancel() { - _objc_msgSend_1(this.pointer, _sel_cancel); + bool get shouldReportNamespacePrefixes { + return _objc_msgSend_7(this.pointer, _sel_shouldReportNamespacePrefixes); } - void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_scheduleInRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); + set shouldReportNamespacePrefixes(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldReportNamespacePrefixes_, value); } - void unscheduleFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_unscheduleFromRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); + int get externalEntityResolvingPolicy { + return _objc_msgSend_579(this.pointer, _sel_externalEntityResolvingPolicy); } - void setDelegateQueue_(NSOperationQueue? queue) { - _objc_msgSend_989( - this.pointer, _sel_setDelegateQueue_, queue?.pointer ?? ffi.nullptr); + set externalEntityResolvingPolicy(int value) { + return _objc_msgSend_580( + this.pointer, _sel_setExternalEntityResolvingPolicy_, value); } - static bool canHandleRequest_(NSURLRequest request) { - return _objc_msgSend_990( - _class_NSURLConnection, _sel_canHandleRequest_, request.pointer); + objc.NSSet? get allowedExternalEntityURLs { + final _ret = + _objc_msgSend_581(this.pointer, _sel_allowedExternalEntityURLs); + return _ret.address == 0 + ? null + : objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSData? sendSynchronousRequest_returningResponse_error_( - NSURLRequest request, - ffi.Pointer> response, - ffi.Pointer> error) { - final _ret = _objc_msgSend_991( - _class_NSURLConnection, - _sel_sendSynchronousRequest_returningResponse_error_, - request.pointer, - response, - error); + set allowedExternalEntityURLs(objc.NSSet? value) { + return _objc_msgSend_582(this.pointer, _sel_setAllowedExternalEntityURLs_, + value?.pointer ?? ffi.nullptr); + } + + bool parse() { + return _objc_msgSend_7(this.pointer, _sel_parse); + } + + void abortParsing() { + _objc_msgSend_82(this.pointer, _sel_abortParsing); + } + + objc.NSError? get parserError { + final _ret = _objc_msgSend_328(this.pointer, _sel_parserError); return _ret.address == 0 ? null - : NSData._(_ret, retain: true, release: true); + : objc.NSError.castFromPointer(_ret, retain: true, release: true); } - static void sendAsynchronousRequest_queue_completionHandler_( - NSURLRequest request, - NSOperationQueue queue, - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError handler) { - _objc_msgSend_992( - _class_NSURLConnection, - _sel_sendAsynchronousRequest_queue_completionHandler_, - request.pointer, - queue.pointer, - handler.pointer); + bool get shouldResolveExternalEntities { + return _objc_msgSend_7(this.pointer, _sel_shouldResolveExternalEntities); + } + + set shouldResolveExternalEntities(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldResolveExternalEntities_, value); + } + + objc.NSString? get publicID { + final _ret = _objc_msgSend_13(this.pointer, _sel_publicID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString? get systemID { + final _ret = _objc_msgSend_13(this.pointer, _sel_systemID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + int get lineNumber { + return _objc_msgSend_114(this.pointer, _sel_lineNumber); + } + + int get columnNumber { + return _objc_msgSend_114(this.pointer, _sel_columnNumber); } @override - NSURLConnection init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLConnection._(_ret, retain: true, release: true); + NSXMLParser init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLParser.castFromPointer(_ret, retain: true, release: true); } - static NSURLConnection new1() { - final _ret = _objc_msgSend_2(_class_NSURLConnection, _sel_new); - return NSURLConnection._(_ret, retain: false, release: true); + static NSXMLParser new1() { + final _ret = _objc_msgSend_40(_class_NSXMLParser, _sel_new); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } - static NSURLConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSXMLParser allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSURLConnection, _sel_allocWithZone_, zone); - return NSURLConnection._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSXMLParser, _sel_allocWithZone_, zone); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } - static NSURLConnection alloc() { - final _ret = _objc_msgSend_2(_class_NSURLConnection, _sel_alloc); - return NSURLConnection._(_ret, retain: false, release: true); + static NSXMLParser alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLParser, _sel_alloc); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLConnection, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLParser, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLConnection, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLParser, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLConnection, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSXMLParser, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLConnection, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSXMLParser, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLConnection, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLParser, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLConnection, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLParser, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLConnection, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLParser, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLConnection, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLParser, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSURLConnection, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSXMLParser, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_985 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_initWithRequest_delegate_ = - objc.registerName("initWithRequest:delegate:"); -final _objc_msgSend_986 = objc.msgSendPointer +late final _class_NSXMLParser = objc.getClass("NSXMLParser"); +late final _sel_initWithContentsOfURL_ = + objc.registerName("initWithContentsOfURL:"); +late final _sel_initWithStream_ = objc.registerName("initWithStream:"); +final _objc_msgSend_578 = 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_987 = 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_988 = 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_989 = 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_990 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - bool Function(ffi.Pointer, + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_sendSynchronousRequest_returningResponse_error_ = - objc.registerName("sendSynchronousRequest:returningResponse:error:"); -final _objc_msgSend_991 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); -void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError - extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunction( - void Function(NSURLResponse?, NSData?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 ? null : NSURLResponse._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSData._(arg1, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.listener( - void Function(NSURLResponse?, NSData?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSURLResponse._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSData._(arg1, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; +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:"); - void call(NSURLResponse? arg0, NSData? arg1, NSError? arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, - arg0?.pointer ?? ffi.nullptr, - arg1?.pointer ?? ffi.nullptr, - arg2?.pointer ?? ffi.nullptr); +abstract class NSXMLParserExternalEntityResolvingPolicy { + static const int NSXMLParserResolveExternalEntitiesNever = 0; + static const int NSXMLParserResolveExternalEntitiesNoNetwork = 1; + static const int NSXMLParserResolveExternalEntitiesSameOriginOnly = 2; + static const int NSXMLParserResolveExternalEntitiesAlways = 3; } -late final _sel_sendAsynchronousRequest_queue_completionHandler_ = - objc.registerName("sendAsynchronousRequest:queue:completionHandler:"); -final _objc_msgSend_992 = objc.msgSendPointer +late final _sel_externalEntityResolvingPolicy = + objc.registerName("externalEntityResolvingPolicy"); +final _objc_msgSend_579 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setExternalEntityResolvingPolicy_ = + objc.registerName("setExternalEntityResolvingPolicy:"); +final _objc_msgSend_580 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_allowedExternalEntityURLs = + objc.registerName("allowedExternalEntityURLs"); +final _objc_msgSend_581 = 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_582 = 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)>(); + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_parse = objc.registerName("parse"); +late final _sel_abortParsing = objc.registerName("abortParsing"); +late final _sel_parserError = objc.registerName("parserError"); +late final _sel_shouldResolveExternalEntities = + objc.registerName("shouldResolveExternalEntities"); +late final _sel_setShouldResolveExternalEntities_ = + objc.registerName("setShouldResolveExternalEntities:"); +late final _sel_publicID = objc.registerName("publicID"); +late final _sel_systemID = objc.registerName("systemID"); +late final _sel_lineNumber = objc.registerName("lineNumber"); +late final _sel_columnNumber = objc.registerName("columnNumber"); -class NSURLCredential extends NSObject { - NSURLCredential._(ffi.Pointer pointer, +class NSFileWrapper extends objc.NSObject { + NSFileWrapper._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLCredential] that points to the same underlying object as [other]. - static NSURLCredential castFrom(T other) { - return NSURLCredential._(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.pointer, retain: true, release: true); - /// Returns a [NSURLCredential] that wraps the given raw object pointer. - static NSURLCredential castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCredential._(other, retain: retain, release: release); - } + /// 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 [NSURLCredential]. + /// Returns whether [obj] is an instance of [NSFileWrapper]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLCredential); + obj.pointer, _sel_isKindOfClass_, _class_NSFileWrapper); } - int get persistence { - return _objc_msgSend_993(this.pointer, _sel_persistence); + NSFileWrapper? initWithURL_options_error_(objc.NSURL url, int options, + ffi.Pointer> outError) { + final _ret = _objc_msgSend_583(this.pointer, + _sel_initWithURL_options_error_, url.pointer, options, outError); + return _ret.address == 0 + ? null + : NSFileWrapper.castFromPointer(_ret, retain: true, release: true); } - NSURLCredential initWithUser_password_persistence_( - NSString user, NSString password, int persistence) { - final _ret = _objc_msgSend_994( + NSFileWrapper initDirectoryWithFileWrappers_( + objc.NSDictionary childrenByPreferredName) { + final _ret = _objc_msgSend_409(this.pointer, + _sel_initDirectoryWithFileWrappers_, childrenByPreferredName.pointer); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } + + NSFileWrapper initRegularFileWithContents_(objc.NSData contents) { + final _ret = _objc_msgSend_340( + this.pointer, _sel_initRegularFileWithContents_, contents.pointer); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } + + NSFileWrapper initSymbolicLinkWithDestinationURL_(objc.NSURL url) { + final _ret = _objc_msgSend_320( + this.pointer, _sel_initSymbolicLinkWithDestinationURL_, url.pointer); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } + + NSFileWrapper? initWithSerializedRepresentation_( + objc.NSData serializeRepresentation) { + final _ret = _objc_msgSend_341( this.pointer, - _sel_initWithUser_password_persistence_, - user.pointer, - password.pointer, - persistence); - return NSURLCredential._(_ret, retain: true, release: true); + _sel_initWithSerializedRepresentation_, + serializeRepresentation.pointer); + return _ret.address == 0 + ? null + : NSFileWrapper.castFromPointer(_ret, retain: true, release: true); } - static NSURLCredential credentialWithUser_password_persistence_( - NSString user, NSString password, int persistence) { - final _ret = _objc_msgSend_995( - _class_NSURLCredential, - _sel_credentialWithUser_password_persistence_, - user.pointer, - password.pointer, - persistence); - return NSURLCredential._(_ret, retain: true, release: true); + NSFileWrapper? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); + return _ret.address == 0 + ? null + : NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } + + bool get directory { + return _objc_msgSend_7(this.pointer, _sel_isDirectory); + } + + bool get regularFile { + return _objc_msgSend_7(this.pointer, _sel_isRegularFile); + } + + bool get symbolicLink { + return _objc_msgSend_7(this.pointer, _sel_isSymbolicLink); } - NSString? get user { - final _ret = _objc_msgSend_44(this.pointer, _sel_user); + objc.NSString? get preferredFilename { + final _ret = _objc_msgSend_13(this.pointer, _sel_preferredFilename); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get password { - final _ret = _objc_msgSend_44(this.pointer, _sel_password); + set preferredFilename(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setPreferredFilename_, + value?.pointer ?? ffi.nullptr); + } + + objc.NSString? get filename { + final _ret = _objc_msgSend_13(this.pointer, _sel_filename); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool get hasPassword { - return _objc_msgSend_12(this.pointer, _sel_hasPassword); + set filename(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setFilename_, value?.pointer ?? ffi.nullptr); } - NSURLCredential initWithIdentity_certificates_persistence_( - ffi.Pointer<__SecIdentity> identity, - NSArray? certArray, - int persistence) { - final _ret = _objc_msgSend_996( + objc.NSDictionary get fileAttributes { + final _ret = _objc_msgSend_112(this.pointer, _sel_fileAttributes); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + set fileAttributes(objc.NSDictionary value) { + return _objc_msgSend_113( + this.pointer, _sel_setFileAttributes_, value.pointer); + } + + bool matchesContentsOfURL_(objc.NSURL url) { + return _objc_msgSend_305( + this.pointer, _sel_matchesContentsOfURL_, url.pointer); + } + + bool readFromURL_options_error_(objc.NSURL url, int options, + ffi.Pointer> outError) { + return _objc_msgSend_584(this.pointer, _sel_readFromURL_options_error_, + url.pointer, options, outError); + } + + bool writeToURL_options_originalContentsURL_error_( + objc.NSURL url, + int options, + objc.NSURL? originalContentsURL, + ffi.Pointer> outError) { + return _objc_msgSend_585( this.pointer, - _sel_initWithIdentity_certificates_persistence_, - identity, - certArray?.pointer ?? ffi.nullptr, - persistence); - return NSURLCredential._(_ret, retain: true, release: true); + _sel_writeToURL_options_originalContentsURL_error_, + url.pointer, + options, + originalContentsURL?.pointer ?? ffi.nullptr, + outError); } - static NSURLCredential credentialWithIdentity_certificates_persistence_( - ffi.Pointer<__SecIdentity> identity, - NSArray? certArray, - int persistence) { - final _ret = _objc_msgSend_997( - _class_NSURLCredential, - _sel_credentialWithIdentity_certificates_persistence_, - identity, - certArray?.pointer ?? ffi.nullptr, - persistence); - return NSURLCredential._(_ret, retain: true, release: true); + objc.NSData? get serializedRepresentation { + final _ret = _objc_msgSend_325(this.pointer, _sel_serializedRepresentation); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer<__SecIdentity> get identity { - return _objc_msgSend_998(this.pointer, _sel_identity); + objc.NSString addFileWrapper_(NSFileWrapper child) { + final _ret = + _objc_msgSend_586(this.pointer, _sel_addFileWrapper_, child.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString addRegularFileWithContents_preferredFilename_( + objc.NSData data, objc.NSString fileName) { + final _ret = _objc_msgSend_587( + this.pointer, + _sel_addRegularFileWithContents_preferredFilename_, + data.pointer, + fileName.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSArray get certificates { - final _ret = _objc_msgSend_85(this.pointer, _sel_certificates); - return NSArray._(_ret, retain: true, release: true); + void removeFileWrapper_(NSFileWrapper child) { + _objc_msgSend_588(this.pointer, _sel_removeFileWrapper_, child.pointer); } - NSURLCredential initWithTrust_(ffi.Pointer<__SecTrust> trust) { - final _ret = _objc_msgSend_999(this.pointer, _sel_initWithTrust_, trust); - return NSURLCredential._(_ret, retain: true, release: true); + objc.NSDictionary? get fileWrappers { + final _ret = _objc_msgSend_65(this.pointer, _sel_fileWrappers); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSURLCredential credentialForTrust_(ffi.Pointer<__SecTrust> trust) { - final _ret = _objc_msgSend_1000( - _class_NSURLCredential, _sel_credentialForTrust_, trust); - return NSURLCredential._(_ret, retain: true, release: true); + objc.NSString? keyForFileWrapper_(NSFileWrapper child) { + final _ret = + _objc_msgSend_589(this.pointer, _sel_keyForFileWrapper_, child.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSData? get regularFileContents { + final _ret = _objc_msgSend_325(this.pointer, _sel_regularFileContents); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSURL? get symbolicLinkDestinationURL { + final _ret = + _objc_msgSend_10(this.pointer, _sel_symbolicLinkDestinationURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? initWithPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject initSymbolicLinkWithDestination_(objc.NSString path) { + final _ret = _objc_msgSend_35( + this.pointer, _sel_initSymbolicLinkWithDestination_, path.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool needsToBeUpdatedFromPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_needsToBeUpdatedFromPath_, path.pointer); + } + + bool updateFromPath_(objc.NSString path) { + return _objc_msgSend_51(this.pointer, _sel_updateFromPath_, path.pointer); + } + + bool writeToFile_atomically_updateFilenames_( + objc.NSString path, bool atomicFlag, bool updateFilenamesFlag) { + return _objc_msgSend_590( + this.pointer, + _sel_writeToFile_atomically_updateFilenames_, + path.pointer, + atomicFlag, + updateFilenamesFlag); + } + + objc.NSString addFileWithPath_(objc.NSString path) { + final _ret = + _objc_msgSend_297(this.pointer, _sel_addFileWithPath_, path.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString addSymbolicLinkWithDestination_preferredFilename_( + objc.NSString path, objc.NSString filename) { + final _ret = _objc_msgSend_591( + this.pointer, + _sel_addSymbolicLinkWithDestination_preferredFilename_, + path.pointer, + filename.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString symbolicLinkDestination() { + final _ret = _objc_msgSend_12(this.pointer, _sel_symbolicLinkDestination); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } @override - NSURLCredential init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLCredential._(_ret, retain: true, release: true); + NSFileWrapper init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); } - static NSURLCredential new1() { - final _ret = _objc_msgSend_2(_class_NSURLCredential, _sel_new); - return NSURLCredential._(_ret, retain: false, release: true); + static NSFileWrapper new1() { + final _ret = _objc_msgSend_40(_class_NSFileWrapper, _sel_new); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } - static NSURLCredential allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSFileWrapper allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSURLCredential, _sel_allocWithZone_, zone); - return NSURLCredential._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSFileWrapper, _sel_allocWithZone_, zone); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } - static NSURLCredential alloc() { - final _ret = _objc_msgSend_2(_class_NSURLCredential, _sel_alloc); - return NSURLCredential._(_ret, retain: false, release: true); + static NSFileWrapper alloc() { + final _ret = _objc_msgSend_40(_class_NSFileWrapper, _sel_alloc); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLCredential, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFileWrapper, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLCredential, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFileWrapper, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLCredential, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSFileWrapper, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLCredential, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSFileWrapper, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLCredential, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFileWrapper, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLCredential, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFileWrapper, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLCredential, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFileWrapper, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLCredential, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFileWrapper, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSURLCredential, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSFileWrapper, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSURLCredential = objc.getClass("NSURLCredential"); +late final _class_NSFileWrapper = objc.getClass("NSFileWrapper"); -abstract class NSURLCredentialPersistence { - static const int NSURLCredentialPersistenceNone = 0; - static const int NSURLCredentialPersistenceForSession = 1; - static const int NSURLCredentialPersistencePermanent = 2; - static const int NSURLCredentialPersistenceSynchronizable = 3; +abstract class NSFileWrapperReadingOptions { + static const int NSFileWrapperReadingImmediate = 1; + static const int NSFileWrapperReadingWithoutMapping = 2; } -late final _sel_persistence = objc.registerName("persistence"); -final _objc_msgSend_993 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 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_994 = objc.msgSendPointer +late final _sel_initWithURL_options_error_ = + objc.registerName("initWithURL:options:error:"); +final _objc_msgSend_583 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() + ffi.Int32, + ffi.Pointer>)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_credentialWithUser_password_persistence_ = - objc.registerName("credentialWithUser:password:persistence:"); -final _objc_msgSend_995 = objc.msgSendPointer + 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_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_584 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() + ffi.Int32, + ffi.Pointer>)>>() .asFunction< - ffi.Pointer Function( + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_hasPassword = objc.registerName("hasPassword"); + int, + ffi.Pointer>)>(); -final class __SecIdentity extends ffi.Opaque {} +abstract class NSFileWrapperWritingOptions { + static const int NSFileWrapperWritingAtomic = 1; + static const int NSFileWrapperWritingWithNameUpdating = 2; +} -late final _sel_initWithIdentity_certificates_persistence_ = - objc.registerName("initWithIdentity:certificates:persistence:"); -final _objc_msgSend_996 = objc.msgSendPointer +late final _sel_writeToURL_options_originalContentsURL_error_ = + objc.registerName("writeToURL:options:originalContentsURL:error:"); +final _objc_msgSend_585 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer<__SecIdentity>, ffi.Pointer, - ffi.Int32)>>() + ffi.Int32, + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< - instancetype Function( + bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer<__SecIdentity>, ffi.Pointer, - int)>(); -late final _sel_credentialWithIdentity_certificates_persistence_ = - objc.registerName("credentialWithIdentity:certificates:persistence:"); -final _objc_msgSend_997 = objc.msgSendPointer + int, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_serializedRepresentation = + objc.registerName("serializedRepresentation"); +late final _sel_addFileWrapper_ = objc.registerName("addFileWrapper:"); +final _objc_msgSend_586 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer<__SecIdentity>, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_addRegularFileWithContents_preferredFilename_ = + objc.registerName("addRegularFileWithContents:preferredFilename:"); +final _objc_msgSend_587 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, - ffi.Int32)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer<__SecIdentity>, ffi.Pointer, - int)>(); -late final _sel_identity = objc.registerName("identity"); -final _objc_msgSend_998 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_removeFileWrapper_ = objc.registerName("removeFileWrapper:"); +final _objc_msgSend_588 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer<__SecIdentity> Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer<__SecIdentity> Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_certificates = objc.registerName("certificates"); - -final class __SecTrust extends ffi.Opaque {} - -late final _sel_initWithTrust_ = objc.registerName("initWithTrust:"); -final _objc_msgSend_999 = objc.msgSendPointer + 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_589 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<__SecTrust>)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<__SecTrust>)>(); -late final _sel_credentialForTrust_ = objc.registerName("credentialForTrust:"); -final _objc_msgSend_1000 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +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_updateFromPath_ = objc.registerName("updateFromPath:"); +late final _sel_writeToFile_atomically_updateFilenames_ = + objc.registerName("writeToFile:atomically:updateFilenames:"); +final _objc_msgSend_590 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<__SecTrust>)>>() + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Bool)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<__SecTrust>)>(); + 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:"); +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)>(); +late final _sel_symbolicLinkDestination = + objc.registerName("symbolicLinkDestination"); -class NSURLProtectionSpace extends NSObject { - NSURLProtectionSpace._(ffi.Pointer pointer, +class NSURLSession extends objc.NSObject { + NSURLSession._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLProtectionSpace] that points to the same underlying object as [other]. - static NSURLProtectionSpace castFrom(T other) { - return NSURLProtectionSpace._(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.pointer, retain: true, release: true); - /// Returns a [NSURLProtectionSpace] that wraps the given raw object pointer. - static NSURLProtectionSpace castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLProtectionSpace._(other, retain: retain, release: release); - } + /// 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 [NSURLProtectionSpace]. + /// Returns whether [obj] is an instance of [NSURLSession]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLProtectionSpace); - } - - NSURLProtectionSpace initWithHost_port_protocol_realm_authenticationMethod_( - NSString host, - int port, - NSString? protocol, - NSString? realm, - NSString? authenticationMethod) { - final _ret = _objc_msgSend_1001( - 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._(_ret, retain: true, release: true); - } - - NSURLProtectionSpace initWithProxyHost_port_type_realm_authenticationMethod_( - NSString host, - int port, - NSString? type, - NSString? realm, - NSString? authenticationMethod) { - final _ret = _objc_msgSend_1001( - 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._(_ret, retain: true, release: true); - } - - NSString? get realm { - final _ret = _objc_msgSend_44(this.pointer, _sel_realm); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - bool get receivesCredentialSecurely { - return _objc_msgSend_12(this.pointer, _sel_receivesCredentialSecurely); + obj.pointer, _sel_isKindOfClass_, _class_NSURLSession); } - bool get isProxy { - return _objc_msgSend_12(this.pointer, _sel_isProxy); + static NSURLSession getSharedSession() { + final _ret = _objc_msgSend_592(_class_NSURLSession, _sel_sharedSession); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - NSString get host { - final _ret = _objc_msgSend_21(this.pointer, _sel_host); - return NSString._(_ret, retain: true, release: true); + static NSURLSession sessionWithConfiguration_( + NSURLSessionConfiguration configuration) { + final _ret = _objc_msgSend_608(_class_NSURLSession, + _sel_sessionWithConfiguration_, configuration.pointer); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - int get port { - return _objc_msgSend_83(this.pointer, _sel_port); + static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( + NSURLSessionConfiguration configuration, + objc.NSObject? delegate, + NSOperationQueue? queue) { + final _ret = _objc_msgSend_609( + _class_NSURLSession, + _sel_sessionWithConfiguration_delegate_delegateQueue_, + configuration.pointer, + delegate?.pointer ?? ffi.nullptr, + queue?.pointer ?? ffi.nullptr); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - NSString? get proxyType { - final _ret = _objc_msgSend_44(this.pointer, _sel_proxyType); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + NSOperationQueue get delegateQueue { + final _ret = _objc_msgSend_460(this.pointer, _sel_delegateQueue); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); } - NSString? get protocol { - final _ret = _objc_msgSend_44(this.pointer, _sel_protocol); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSString get authenticationMethod { - final _ret = _objc_msgSend_21(this.pointer, _sel_authenticationMethod); - return NSString._(_ret, retain: true, release: true); + NSURLSessionConfiguration get configuration { + final _ret = _objc_msgSend_593(this.pointer, _sel_configuration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - NSArray? get distinguishedNames { - final _ret = _objc_msgSend_84(this.pointer, _sel_distinguishedNames); + objc.NSString? get sessionDescription { + final _ret = _objc_msgSend_13(this.pointer, _sel_sessionDescription); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); - } - - ffi.Pointer<__SecTrust> get serverTrust { - return _objc_msgSend_1002(this.pointer, _sel_serverTrust); - } - - @override - NSURLProtectionSpace init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLProtectionSpace._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSURLProtectionSpace new1() { - final _ret = _objc_msgSend_2(_class_NSURLProtectionSpace, _sel_new); - return NSURLProtectionSpace._(_ret, retain: false, release: true); + set sessionDescription(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setSessionDescription_, + value?.pointer ?? ffi.nullptr); } - static NSURLProtectionSpace allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSURLProtectionSpace, _sel_allocWithZone_, zone); - return NSURLProtectionSpace._(_ret, retain: false, release: true); + void finishTasksAndInvalidate() { + _objc_msgSend_82(this.pointer, _sel_finishTasksAndInvalidate); } - static NSURLProtectionSpace alloc() { - final _ret = _objc_msgSend_2(_class_NSURLProtectionSpace, _sel_alloc); - return NSURLProtectionSpace._(_ret, retain: false, release: true); + void invalidateAndCancel() { + _objc_msgSend_82(this.pointer, _sel_invalidateAndCancel); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLProtectionSpace, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + void resetWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { + _objc_msgSend_249(this.pointer, _sel_resetWithCompletionHandler_, + completionHandler.pointer); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLProtectionSpace, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + void flushWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { + _objc_msgSend_249(this.pointer, _sel_flushWithCompletionHandler_, + completionHandler.pointer); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLProtectionSpace, _sel_accessInstanceVariablesDirectly); + void getTasksWithCompletionHandler_( + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray completionHandler) { + _objc_msgSend_610(this.pointer, _sel_getTasksWithCompletionHandler_, + completionHandler.pointer); } - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLProtectionSpace, _sel_useStoredAccessor); + void getAllTasksWithCompletionHandler_( + ObjCBlock_ffiVoid_NSArray1 completionHandler) { + _objc_msgSend_611(this.pointer, _sel_getAllTasksWithCompletionHandler_, + completionHandler.pointer); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLProtectionSpace, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_612( + this.pointer, _sel_dataTaskWithRequest_, request.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLProtectionSpace, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + NSURLSessionDataTask dataTaskWithURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_613(this.pointer, _sel_dataTaskWithURL_, url.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLProtectionSpace, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( + NSURLRequest request, objc.NSURL fileURL) { + final _ret = _objc_msgSend_615(this.pointer, + _sel_uploadTaskWithRequest_fromFile_, request.pointer, fileURL.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLProtectionSpace, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + NSURLSessionUploadTask uploadTaskWithRequest_fromData_( + NSURLRequest request, objc.NSData bodyData) { + final _ret = _objc_msgSend_616( + this.pointer, + _sel_uploadTaskWithRequest_fromData_, + request.pointer, + bodyData.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLProtectionSpace, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + NSURLSessionUploadTask uploadTaskWithResumeData_(objc.NSData resumeData) { + final _ret = _objc_msgSend_617( + this.pointer, _sel_uploadTaskWithResumeData_, resumeData.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } -} - -late final _class_NSURLProtectionSpace = objc.getClass("NSURLProtectionSpace"); -late final _sel_initWithHost_port_protocol_realm_authenticationMethod_ = - objc.registerName("initWithHost:port:protocol:realm:authenticationMethod:"); -final _objc_msgSend_1001 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_initWithProxyHost_port_type_realm_authenticationMethod_ = objc - .registerName("initWithProxyHost:port:type:realm:authenticationMethod:"); -late final _sel_realm = objc.registerName("realm"); -late final _sel_receivesCredentialSecurely = - objc.registerName("receivesCredentialSecurely"); -late final _sel_isProxy = objc.registerName("isProxy"); -late final _sel_proxyType = objc.registerName("proxyType"); -late final _sel_protocol = objc.registerName("protocol"); -late final _sel_authenticationMethod = - objc.registerName("authenticationMethod"); -late final _sel_distinguishedNames = objc.registerName("distinguishedNames"); -late final _sel_serverTrust = objc.registerName("serverTrust"); -final _objc_msgSend_1002 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer<__SecTrust> Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer<__SecTrust> Function( - ffi.Pointer, ffi.Pointer)>(); -class NSURLCredentialStorage extends NSObject { - NSURLCredentialStorage._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_618( + this.pointer, _sel_uploadTaskWithStreamedRequest_, request.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); + } - /// Returns a [NSURLCredentialStorage] that points to the same underlying object as [other]. - static NSURLCredentialStorage castFrom( - T other) { - return NSURLCredentialStorage._(other.pointer, retain: true, release: true); + NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_619( + this.pointer, _sel_downloadTaskWithRequest_, request.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - /// Returns a [NSURLCredentialStorage] that wraps the given raw object pointer. - static NSURLCredentialStorage castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLCredentialStorage._(other, retain: retain, release: release); + NSURLSessionDownloadTask downloadTaskWithURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_620(this.pointer, _sel_downloadTaskWithURL_, url.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLCredentialStorage); + NSURLSessionDownloadTask downloadTaskWithResumeData_(objc.NSData resumeData) { + final _ret = _objc_msgSend_621( + this.pointer, _sel_downloadTaskWithResumeData_, resumeData.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - static NSURLCredentialStorage getSharedCredentialStorage() { - final _ret = _objc_msgSend_1003( - _class_NSURLCredentialStorage, _sel_sharedCredentialStorage); - return NSURLCredentialStorage._(_ret, retain: true, release: true); + NSURLSessionStreamTask streamTaskWithHostName_port_( + objc.NSString hostname, int port) { + final _ret = _objc_msgSend_624(this.pointer, + _sel_streamTaskWithHostName_port_, hostname.pointer, port); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } - NSDictionary? credentialsForProtectionSpace_(NSURLProtectionSpace space) { - final _ret = _objc_msgSend_1004( - this.pointer, _sel_credentialsForProtectionSpace_, space.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { + final _ret = _objc_msgSend_633( + this.pointer, _sel_streamTaskWithNetService_, service.pointer); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } - NSDictionary get allCredentials { - final _ret = _objc_msgSend_181(this.pointer, _sel_allCredentials); - return NSDictionary._(_ret, retain: true, release: true); + NSURLSessionWebSocketTask webSocketTaskWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_640( + this.pointer, _sel_webSocketTaskWithURL_, url.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - void setCredential_forProtectionSpace_( - NSURLCredential credential, NSURLProtectionSpace space) { - _objc_msgSend_1005(this.pointer, _sel_setCredential_forProtectionSpace_, - credential.pointer, space.pointer); + NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( + objc.NSURL url, objc.NSArray protocols) { + final _ret = _objc_msgSend_641(this.pointer, + _sel_webSocketTaskWithURL_protocols_, url.pointer, protocols.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - void removeCredential_forProtectionSpace_( - NSURLCredential credential, NSURLProtectionSpace space) { - _objc_msgSend_1005(this.pointer, _sel_removeCredential_forProtectionSpace_, - credential.pointer, space.pointer); + NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_642( + this.pointer, _sel_webSocketTaskWithRequest_, request.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - void removeCredential_forProtectionSpace_options_(NSURLCredential credential, - NSURLProtectionSpace space, NSDictionary? options) { - _objc_msgSend_1006( - this.pointer, - _sel_removeCredential_forProtectionSpace_options_, - credential.pointer, - space.pointer, - options?.pointer ?? ffi.nullptr); + @override + NSURLSession init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - NSURLCredential? defaultCredentialForProtectionSpace_( - NSURLProtectionSpace space) { - final _ret = _objc_msgSend_1007( - this.pointer, _sel_defaultCredentialForProtectionSpace_, space.pointer); - return _ret.address == 0 - ? null - : NSURLCredential._(_ret, retain: true, release: true); + static NSURLSession new1() { + final _ret = _objc_msgSend_40(_class_NSURLSession, _sel_new); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); } - void setDefaultCredential_forProtectionSpace_( - NSURLCredential credential, NSURLProtectionSpace space) { - _objc_msgSend_1005( + NSURLSessionDataTask dataTaskWithRequest_completionHandler_( + NSURLRequest request, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_643( this.pointer, - _sel_setDefaultCredential_forProtectionSpace_, - credential.pointer, - space.pointer); + _sel_dataTaskWithRequest_completionHandler_, + request.pointer, + completionHandler.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - void getCredentialsForProtectionSpace_task_completionHandler_( - NSURLProtectionSpace protectionSpace, - NSURLSessionTask task, - ObjCBlock_ffiVoid_NSDictionary completionHandler) { - _objc_msgSend_1008( + NSURLSessionDataTask dataTaskWithURL_completionHandler_(objc.NSURL url, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_644( this.pointer, - _sel_getCredentialsForProtectionSpace_task_completionHandler_, - protectionSpace.pointer, - task.pointer, + _sel_dataTaskWithURL_completionHandler_, + url.pointer, completionHandler.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - void setCredential_forProtectionSpace_task_(NSURLCredential credential, - NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { - _objc_msgSend_1009( + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( + NSURLRequest request, + objc.NSURL fileURL, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_645( this.pointer, - _sel_setCredential_forProtectionSpace_task_, - credential.pointer, - protectionSpace.pointer, - task.pointer); + _sel_uploadTaskWithRequest_fromFile_completionHandler_, + request.pointer, + fileURL.pointer, + completionHandler.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - void removeCredential_forProtectionSpace_options_task_( - NSURLCredential credential, - NSURLProtectionSpace protectionSpace, - NSDictionary? options, - NSURLSessionTask task) { - _objc_msgSend_1010( + NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( + NSURLRequest request, + objc.NSData? bodyData, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_646( this.pointer, - _sel_removeCredential_forProtectionSpace_options_task_, - credential.pointer, - protectionSpace.pointer, - options?.pointer ?? ffi.nullptr, - task.pointer); + _sel_uploadTaskWithRequest_fromData_completionHandler_, + request.pointer, + bodyData?.pointer ?? ffi.nullptr, + completionHandler.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - void getDefaultCredentialForProtectionSpace_task_completionHandler_( - NSURLProtectionSpace space, - NSURLSessionTask task, - ObjCBlock_ffiVoid_NSURLCredential completionHandler) { - _objc_msgSend_1011( + NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_( + objc.NSData resumeData, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_647( this.pointer, - _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_, - space.pointer, - task.pointer, + _sel_uploadTaskWithResumeData_completionHandler_, + resumeData.pointer, completionHandler.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - void setDefaultCredential_forProtectionSpace_task_(NSURLCredential credential, - NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { - _objc_msgSend_1009( + NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( + NSURLRequest request, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_648( this.pointer, - _sel_setDefaultCredential_forProtectionSpace_task_, - credential.pointer, - protectionSpace.pointer, - task.pointer); + _sel_downloadTaskWithRequest_completionHandler_, + request.pointer, + completionHandler.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - @override - NSURLCredentialStorage init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLCredentialStorage._(_ret, retain: true, release: true); + NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( + objc.NSURL url, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_649( + this.pointer, + _sel_downloadTaskWithURL_completionHandler_, + url.pointer, + completionHandler.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - static NSURLCredentialStorage new1() { - final _ret = _objc_msgSend_2(_class_NSURLCredentialStorage, _sel_new); - return NSURLCredentialStorage._(_ret, retain: false, release: true); + NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( + objc.NSData resumeData, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_650( + this.pointer, + _sel_downloadTaskWithResumeData_completionHandler_, + resumeData.pointer, + completionHandler.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - static NSURLCredentialStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSURLCredentialStorage, _sel_allocWithZone_, zone); - return NSURLCredentialStorage._(_ret, retain: false, release: true); + static NSURLSession allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLSession, _sel_allocWithZone_, zone); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); } - static NSURLCredentialStorage alloc() { - final _ret = _objc_msgSend_2(_class_NSURLCredentialStorage, _sel_alloc); - return NSURLCredentialStorage._(_ret, retain: false, release: true); + static NSURLSession alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSession, _sel_alloc); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLCredentialStorage, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSession, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLCredentialStorage, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSession, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLCredentialStorage, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLSession, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLCredentialStorage, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSURLSession, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLCredentialStorage, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSession, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLCredentialStorage, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSession, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLCredentialStorage, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSession, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLCredentialStorage, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSession, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLCredentialStorage, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLSession, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSURLCredentialStorage = - objc.getClass("NSURLCredentialStorage"); -late final _sel_sharedCredentialStorage = - objc.registerName("sharedCredentialStorage"); -final _objc_msgSend_1003 = objc.msgSendPointer +late final _class_NSURLSession = objc.getClass("NSURLSession"); +late final _sel_sharedSession = objc.registerName("sharedSession"); +final _objc_msgSend_592 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -50314,605 +27943,618 @@ final _objc_msgSend_1003 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_credentialsForProtectionSpace_ = - objc.registerName("credentialsForProtectionSpace:"); -final _objc_msgSend_1004 = 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_1005 = 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_1006 = 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_1007 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDefaultCredential_forProtectionSpace_ = - objc.registerName("setDefaultCredential:forProtectionSpace:"); -void _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSDictionary_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} -void _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[block.ref.target.address]!( - arg0); +class NSURLSessionConfiguration extends objc.NSObject { + NSURLSessionConfiguration._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -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); + /// Constructs a [NSURLSessionConfiguration] that points to the same underlying object as [other]. + NSURLSessionConfiguration.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// 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); - } + /// 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); - /// 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.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionConfiguration); + } - /// 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(NSDictionary?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSDictionary._(arg0, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; + static NSURLSessionConfiguration getDefaultSessionConfiguration() { + final _ret = _objc_msgSend_593( + _class_NSURLSessionConfiguration, _sel_defaultSessionConfiguration); + return NSURLSessionConfiguration.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.listener(void Function(NSDictionary?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSDictionary._(arg0, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; + static NSURLSessionConfiguration getEphemeralSessionConfiguration() { + final _ret = _objc_msgSend_593( + _class_NSURLSessionConfiguration, _sel_ephemeralSessionConfiguration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); + } - void call(NSDictionary? arg0) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr); -} + static NSURLSessionConfiguration + backgroundSessionConfigurationWithIdentifier_(objc.NSString identifier) { + final _ret = _objc_msgSend_594(_class_NSURLSessionConfiguration, + _sel_backgroundSessionConfigurationWithIdentifier_, identifier.pointer); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); + } -late final _sel_getCredentialsForProtectionSpace_task_completionHandler_ = objc - .registerName("getCredentialsForProtectionSpace:task:completionHandler:"); -final _objc_msgSend_1008 = 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_1009 = 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_1010 = 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); -final _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + objc.NSString? get identifier { + final _ret = _objc_msgSend_13(this.pointer, _sel_identifier); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[ - block.ref.target.address]!(arg0); + int get requestCachePolicy { + return _objc_msgSend_322(this.pointer, _sel_requestCachePolicy); + } -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); + set requestCachePolicy(int value) { + return _objc_msgSend_567(this.pointer, _sel_setRequestCachePolicy_, value); + } - /// 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); + double get timeoutIntervalForRequest { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutIntervalForRequest) + : _objc_msgSend_115(this.pointer, _sel_timeoutIntervalForRequest); } - /// 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.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + set timeoutIntervalForRequest(double value) { + return _objc_msgSend_212( + this.pointer, _sel_setTimeoutIntervalForRequest_, 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. - ObjCBlock_ffiVoid_NSURLCredential.fromFunction( - void Function(NSURLCredential?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSURLCredential._(arg0, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; + double get timeoutIntervalForResource { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutIntervalForResource) + : _objc_msgSend_115(this.pointer, _sel_timeoutIntervalForResource); + } - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURLCredential.listener(void Function(NSURLCredential?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSURLCredential._(arg0, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; + set timeoutIntervalForResource(double value) { + return _objc_msgSend_212( + this.pointer, _sel_setTimeoutIntervalForResource_, value); + } - void call(NSURLCredential? arg0) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr); -} + int get networkServiceType { + return _objc_msgSend_323(this.pointer, _sel_networkServiceType); + } -late final _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_ = - objc.registerName( - "getDefaultCredentialForProtectionSpace:task:completionHandler:"); -final _objc_msgSend_1011 = 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:"); + set networkServiceType(int value) { + return _objc_msgSend_568(this.pointer, _sel_setNetworkServiceType_, value); + } -class NSURLProtocol extends NSObject { - NSURLProtocol._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + bool get allowsCellularAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsCellularAccess); + } - /// Returns a [NSURLProtocol] that points to the same underlying object as [other]. - static NSURLProtocol castFrom(T other) { - return NSURLProtocol._(other.pointer, retain: true, release: true); + set allowsCellularAccess(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setAllowsCellularAccess_, value); } - /// Returns a [NSURLProtocol] that wraps the given raw object pointer. - static NSURLProtocol castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLProtocol._(other, retain: retain, release: release); + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsExpensiveNetworkAccess); } - /// Returns whether [obj] is an instance of [NSURLProtocol]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLProtocol); + set allowsExpensiveNetworkAccess(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); } - NSURLProtocol initWithRequest_cachedResponse_client_(NSURLRequest request, - NSCachedURLResponse? cachedResponse, NSObject? client) { - final _ret = _objc_msgSend_1012( - this.pointer, - _sel_initWithRequest_cachedResponse_client_, - request.pointer, - cachedResponse?.pointer ?? ffi.nullptr, - client?.pointer ?? ffi.nullptr); - return NSURLProtocol._(_ret, retain: true, release: true); + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsConstrainedNetworkAccess); + } + + set allowsConstrainedNetworkAccess(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); + } + + bool get requiresDNSSECValidation { + return _objc_msgSend_7(this.pointer, _sel_requiresDNSSECValidation); + } + + set requiresDNSSECValidation(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setRequiresDNSSECValidation_, value); + } + + bool get waitsForConnectivity { + return _objc_msgSend_7(this.pointer, _sel_waitsForConnectivity); } - NSObject? get client { - final _ret = _objc_msgSend_17(this.pointer, _sel_client); + set waitsForConnectivity(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setWaitsForConnectivity_, value); + } + + bool get discretionary { + return _objc_msgSend_7(this.pointer, _sel_isDiscretionary); + } + + set discretionary(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setDiscretionary_, value); + } + + objc.NSString? get sharedContainerIdentifier { + final _ret = _objc_msgSend_13(this.pointer, _sel_sharedContainerIdentifier); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSURLRequest get request { - final _ret = _objc_msgSend_988(this.pointer, _sel_request); - return NSURLRequest._(_ret, retain: true, release: true); + set sharedContainerIdentifier(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setSharedContainerIdentifier_, + value?.pointer ?? ffi.nullptr); } - NSCachedURLResponse? get cachedResponse { - final _ret = _objc_msgSend_1013(this.pointer, _sel_cachedResponse); + bool get sessionSendsLaunchEvents { + return _objc_msgSend_7(this.pointer, _sel_sessionSendsLaunchEvents); + } + + set sessionSendsLaunchEvents(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setSessionSendsLaunchEvents_, value); + } + + objc.NSDictionary? get connectionProxyDictionary { + final _ret = _objc_msgSend_65(this.pointer, _sel_connectionProxyDictionary); return _ret.address == 0 ? null - : NSCachedURLResponse._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static bool canInitWithRequest_(NSURLRequest request) { - return _objc_msgSend_990( - _class_NSURLProtocol, _sel_canInitWithRequest_, request.pointer); + set connectionProxyDictionary(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setConnectionProxyDictionary_, + value?.pointer ?? ffi.nullptr); } - static NSURLRequest canonicalRequestForRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_1014(_class_NSURLProtocol, - _sel_canonicalRequestForRequest_, request.pointer); - return NSURLRequest._(_ret, retain: true, release: true); + int get TLSMinimumSupportedProtocol { + return _objc_msgSend_595(this.pointer, _sel_TLSMinimumSupportedProtocol); } - static bool requestIsCacheEquivalent_toRequest_( - NSURLRequest a, NSURLRequest b) { - return _objc_msgSend_1015(_class_NSURLProtocol, - _sel_requestIsCacheEquivalent_toRequest_, a.pointer, b.pointer); + set TLSMinimumSupportedProtocol(int value) { + return _objc_msgSend_596( + this.pointer, _sel_setTLSMinimumSupportedProtocol_, value); } - void startLoading() { - _objc_msgSend_1(this.pointer, _sel_startLoading); + int get TLSMaximumSupportedProtocol { + return _objc_msgSend_595(this.pointer, _sel_TLSMaximumSupportedProtocol); } - void stopLoading() { - _objc_msgSend_1(this.pointer, _sel_stopLoading); + set TLSMaximumSupportedProtocol(int value) { + return _objc_msgSend_596( + this.pointer, _sel_setTLSMaximumSupportedProtocol_, value); } - static NSObject? propertyForKey_inRequest_( - NSString key, NSURLRequest request) { - final _ret = _objc_msgSend_1016(_class_NSURLProtocol, - _sel_propertyForKey_inRequest_, key.pointer, request.pointer); + int get TLSMinimumSupportedProtocolVersion { + return _objc_msgSend_597( + this.pointer, _sel_TLSMinimumSupportedProtocolVersion); + } + + set TLSMinimumSupportedProtocolVersion(int value) { + return _objc_msgSend_598( + this.pointer, _sel_setTLSMinimumSupportedProtocolVersion_, value); + } + + int get TLSMaximumSupportedProtocolVersion { + return _objc_msgSend_597( + this.pointer, _sel_TLSMaximumSupportedProtocolVersion); + } + + set TLSMaximumSupportedProtocolVersion(int value) { + return _objc_msgSend_598( + this.pointer, _sel_setTLSMaximumSupportedProtocolVersion_, value); + } + + bool get HTTPShouldUsePipelining { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldUsePipelining); + } + + set HTTPShouldUsePipelining(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHTTPShouldUsePipelining_, value); + } + + bool get HTTPShouldSetCookies { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldSetCookies); + } + + set HTTPShouldSetCookies(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setHTTPShouldSetCookies_, value); + } + + int get HTTPCookieAcceptPolicy { + return _objc_msgSend_318(this.pointer, _sel_HTTPCookieAcceptPolicy); + } + + set HTTPCookieAcceptPolicy(int value) { + return _objc_msgSend_319( + this.pointer, _sel_setHTTPCookieAcceptPolicy_, value); + } + + objc.NSDictionary? get HTTPAdditionalHeaders { + final _ret = _objc_msgSend_65(this.pointer, _sel_HTTPAdditionalHeaders); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static void setProperty_forKey_inRequest_( - NSObject value, NSString key, NSMutableURLRequest request) { - _objc_msgSend_1023(_class_NSURLProtocol, _sel_setProperty_forKey_inRequest_, - value.pointer, key.pointer, request.pointer); + set HTTPAdditionalHeaders(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setHTTPAdditionalHeaders_, + value?.pointer ?? ffi.nullptr); } - static void removePropertyForKey_inRequest_( - NSString key, NSMutableURLRequest request) { - _objc_msgSend_1024(_class_NSURLProtocol, - _sel_removePropertyForKey_inRequest_, key.pointer, request.pointer); + int get HTTPMaximumConnectionsPerHost { + return _objc_msgSend_114(this.pointer, _sel_HTTPMaximumConnectionsPerHost); } - static bool registerClass_(NSObject protocolClass) { - return _objc_msgSend_0( - _class_NSURLProtocol, _sel_registerClass_, protocolClass.pointer); + set HTTPMaximumConnectionsPerHost(int value) { + return _objc_msgSend_134( + this.pointer, _sel_setHTTPMaximumConnectionsPerHost_, value); } - static void unregisterClass_(NSObject protocolClass) { - _objc_msgSend_15( - _class_NSURLProtocol, _sel_unregisterClass_, protocolClass.pointer); + NSHTTPCookieStorage? get HTTPCookieStorage { + final _ret = _objc_msgSend_599(this.pointer, _sel_HTTPCookieStorage); + return _ret.address == 0 + ? null + : NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - static bool canInitWithTask_(NSURLSessionTask task) { - return _objc_msgSend_1025( - _class_NSURLProtocol, _sel_canInitWithTask_, task.pointer); + set HTTPCookieStorage(NSHTTPCookieStorage? value) { + return _objc_msgSend_600(this.pointer, _sel_setHTTPCookieStorage_, + value?.pointer ?? ffi.nullptr); } - NSURLProtocol initWithTask_cachedResponse_client_(NSURLSessionTask task, - NSCachedURLResponse? cachedResponse, NSObject? client) { - final _ret = _objc_msgSend_1026( - this.pointer, - _sel_initWithTask_cachedResponse_client_, - task.pointer, - cachedResponse?.pointer ?? ffi.nullptr, - client?.pointer ?? ffi.nullptr); - return NSURLProtocol._(_ret, retain: true, release: true); + NSURLCredentialStorage? get URLCredentialStorage { + final _ret = _objc_msgSend_601(this.pointer, _sel_URLCredentialStorage); + return _ret.address == 0 + ? null + : NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } - NSURLSessionTask? get task { - final _ret = _objc_msgSend_1027(this.pointer, _sel_task); + set URLCredentialStorage(NSURLCredentialStorage? value) { + return _objc_msgSend_602(this.pointer, _sel_setURLCredentialStorage_, + value?.pointer ?? ffi.nullptr); + } + + NSURLCache? get URLCache { + final _ret = _objc_msgSend_603(this.pointer, _sel_URLCache); + return _ret.address == 0 + ? null + : NSURLCache.castFromPointer(_ret, retain: true, release: true); + } + + set URLCache(NSURLCache? value) { + return _objc_msgSend_604( + this.pointer, _sel_setURLCache_, value?.pointer ?? ffi.nullptr); + } + + bool get shouldUseExtendedBackgroundIdleMode { + return _objc_msgSend_7( + this.pointer, _sel_shouldUseExtendedBackgroundIdleMode); + } + + set shouldUseExtendedBackgroundIdleMode(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldUseExtendedBackgroundIdleMode_, value); + } + + objc.NSArray? get protocolClasses { + final _ret = _objc_msgSend_69(this.pointer, _sel_protocolClasses); return _ret.address == 0 ? null - : NSURLSessionTask._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + set protocolClasses(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setProtocolClasses_, value?.pointer ?? ffi.nullptr); + } + + int get multipathServiceType { + return _objc_msgSend_606(this.pointer, _sel_multipathServiceType); + } + + set multipathServiceType(int value) { + return _objc_msgSend_607( + this.pointer, _sel_setMultipathServiceType_, value); } @override - NSURLProtocol init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLProtocol._(_ret, retain: true, release: true); + NSURLSessionConfiguration init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - static NSURLProtocol new1() { - final _ret = _objc_msgSend_2(_class_NSURLProtocol, _sel_new); - return NSURLProtocol._(_ret, retain: false, release: true); + static NSURLSessionConfiguration new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionConfiguration, _sel_new); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } - static NSURLProtocol allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSURLProtocol, _sel_allocWithZone_, zone); - return NSURLProtocol._(_ret, retain: false, release: true); + static NSURLSessionConfiguration backgroundSessionConfiguration_( + objc.NSString identifier) { + final _ret = _objc_msgSend_594(_class_NSURLSessionConfiguration, + _sel_backgroundSessionConfiguration_, identifier.pointer); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - static NSURLProtocol alloc() { - final _ret = _objc_msgSend_2(_class_NSURLProtocol, _sel_alloc); - return NSURLProtocol._(_ret, retain: false, release: true); + static NSURLSessionConfiguration allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionConfiguration, _sel_allocWithZone_, zone); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); + } + + static NSURLSessionConfiguration alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionConfiguration, _sel_alloc); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLProtocol, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionConfiguration, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLProtocol, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionConfiguration, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLProtocol, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLSessionConfiguration, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLProtocol, _sel_useStoredAccessor); + return _objc_msgSend_7( + _class_NSURLSessionConfiguration, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLProtocol, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionConfiguration, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLProtocol, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionConfiguration, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLProtocol, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionConfiguration, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLProtocol, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionConfiguration, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSURLProtocol, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionConfiguration, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_1012 = objc.msgSendPointer +late final _class_NSURLSessionConfiguration = + objc.getClass("NSURLSessionConfiguration"); +late final _sel_defaultSessionConfiguration = + objc.registerName("defaultSessionConfiguration"); +final _objc_msgSend_593 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + 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_594 = 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:"); + +abstract class SSLProtocol { + static const int kSSLProtocolUnknown = 0; + static const int kTLSProtocol1 = 4; + static const int kTLSProtocol11 = 7; + static const int kTLSProtocol12 = 8; + static const int kDTLSProtocol1 = 9; + static const int kTLSProtocol13 = 10; + static const int kDTLSProtocol12 = 11; + static const int kTLSProtocolMaxSupported = 999; + static const int kSSLProtocol2 = 1; + static const int kSSLProtocol3 = 2; + static const int kSSLProtocol3Only = 3; + static const int kTLSProtocol1Only = 5; + static const int kSSLProtocolAll = 6; +} + +late final _sel_TLSMinimumSupportedProtocol = + objc.registerName("TLSMinimumSupportedProtocol"); +final _objc_msgSend_595 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocol_ = + objc.registerName("setTLSMinimumSupportedProtocol:"); +final _objc_msgSend_596 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_TLSMaximumSupportedProtocol = + objc.registerName("TLSMaximumSupportedProtocol"); +late final _sel_setTLSMaximumSupportedProtocol_ = + objc.registerName("setTLSMaximumSupportedProtocol:"); + +abstract class tls_protocol_version_t { + static const int tls_protocol_version_TLSv10 = 769; + static const int tls_protocol_version_TLSv11 = 770; + static const int tls_protocol_version_TLSv12 = 771; + static const int tls_protocol_version_TLSv13 = 772; + static const int tls_protocol_version_DTLSv10 = -257; + static const int tls_protocol_version_DTLSv12 = -259; +} + +late final _sel_TLSMinimumSupportedProtocolVersion = + objc.registerName("TLSMinimumSupportedProtocolVersion"); +final _objc_msgSend_597 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocolVersion_ = + objc.registerName("setTLSMinimumSupportedProtocolVersion:"); +final _objc_msgSend_598 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_599 = 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_600 = 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_601 = 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_602 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void 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_1013 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_URLCache = objc.registerName("URLCache"); +final _objc_msgSend_603 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -50920,2226 +28562,1893 @@ final _objc_msgSend_1013 = objc.msgSendPointer .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_1014 = objc.msgSendPointer +late final _sel_setURLCache_ = objc.registerName("setURLCache:"); +final _objc_msgSend_604 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_requestIsCacheEquivalent_toRequest_ = - objc.registerName("requestIsCacheEquivalent:toRequest:"); -final _objc_msgSend_1015 = objc.msgSendPointer +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_605 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSURLSessionMultipathServiceType { + static const int NSURLSessionMultipathServiceTypeNone = 0; + static const int NSURLSessionMultipathServiceTypeHandover = 1; + static const int NSURLSessionMultipathServiceTypeInteractive = 2; + static const int NSURLSessionMultipathServiceTypeAggregate = 3; +} + +late final _sel_multipathServiceType = + objc.registerName("multipathServiceType"); +final _objc_msgSend_606 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setMultipathServiceType_ = + objc.registerName("setMultipathServiceType:"); +final _objc_msgSend_607 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_608 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( 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_1016 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sessionWithConfiguration_delegate_delegateQueue_ = + objc.registerName("sessionWithConfiguration:delegate:delegateQueue:"); +final _objc_msgSend_609 = 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"); +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< + 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); +final _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} -class NSMutableURLRequest extends NSURLRequest { - NSMutableURLRequest._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMutableURLRequest] that points to the same underlying object as [other]. - static NSMutableURLRequest castFrom(T other) { - return NSMutableURLRequest._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSMutableURLRequest] that wraps the given raw object pointer. - static NSMutableURLRequest castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableURLRequest._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableURLRequest]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableURLRequest); - } - - @override - NSURL? get URL { - final _ret = _objc_msgSend_45(this.pointer, _sel_URL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - set URL(NSURL? value) { - return _objc_msgSend_671( - this.pointer, _sel_setURL_, value?.pointer ?? ffi.nullptr); - } - - @override - int get cachePolicy { - return _objc_msgSend_859(this.pointer, _sel_cachePolicy); - } - - set cachePolicy(int value) { - return _objc_msgSend_1017(this.pointer, _sel_setCachePolicy_, value); - } - - @override - double get timeoutInterval { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_timeoutInterval) - : _objc_msgSend_165(this.pointer, _sel_timeoutInterval); - } - - set timeoutInterval(double value) { - return _objc_msgSend_542(this.pointer, _sel_setTimeoutInterval_, value); - } - - @override - NSURL? get mainDocumentURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_mainDocumentURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - set mainDocumentURL(NSURL? value) { - return _objc_msgSend_671( - this.pointer, _sel_setMainDocumentURL_, value?.pointer ?? ffi.nullptr); - } - - @override - int get networkServiceType { - return _objc_msgSend_860(this.pointer, _sel_networkServiceType); - } - - set networkServiceType(int value) { - return _objc_msgSend_1018(this.pointer, _sel_setNetworkServiceType_, value); - } - - @override - bool get allowsCellularAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsCellularAccess); - } - - set allowsCellularAccess(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAllowsCellularAccess_, value); - } - - @override - bool get allowsExpensiveNetworkAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsExpensiveNetworkAccess); - } - - set allowsExpensiveNetworkAccess(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); - } - - @override - bool get allowsConstrainedNetworkAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsConstrainedNetworkAccess); - } - - set allowsConstrainedNetworkAccess(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); - } - - @override - bool get assumesHTTP3Capable { - return _objc_msgSend_12(this.pointer, _sel_assumesHTTP3Capable); - } - - set assumesHTTP3Capable(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setAssumesHTTP3Capable_, value); - } - - @override - int get attribution { - return _objc_msgSend_861(this.pointer, _sel_attribution); - } - - set attribution(int value) { - return _objc_msgSend_1019(this.pointer, _sel_setAttribution_, value); - } - - @override - bool get requiresDNSSECValidation { - return _objc_msgSend_12(this.pointer, _sel_requiresDNSSECValidation); - } - - set requiresDNSSECValidation(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setRequiresDNSSECValidation_, value); - } - - NSString get HTTPMethod { - final _ret = _objc_msgSend_21(this.pointer, _sel_HTTPMethod); - return NSString._(_ret, retain: true, release: true); - } - - set HTTPMethod(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setHTTPMethod_, value.pointer); - } - - @override - NSDictionary? get allHTTPHeaderFields { - final _ret = _objc_msgSend_390(this.pointer, _sel_allHTTPHeaderFields); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - set allHTTPHeaderFields(NSDictionary? value) { - return _objc_msgSend_634(this.pointer, _sel_setAllHTTPHeaderFields_, - value?.pointer ?? ffi.nullptr); - } - - void setValue_forHTTPHeaderField_(NSString? value, NSString field) { - _objc_msgSend_1020(this.pointer, _sel_setValue_forHTTPHeaderField_, - value?.pointer ?? ffi.nullptr, field.pointer); - } - - void addValue_forHTTPHeaderField_(NSString value, NSString field) { - _objc_msgSend_551(this.pointer, _sel_addValue_forHTTPHeaderField_, - value.pointer, field.pointer); - } - - @override - NSData? get HTTPBody { - final _ret = _objc_msgSend_286(this.pointer, _sel_HTTPBody); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - set HTTPBody(NSData? value) { - return _objc_msgSend_1021( - this.pointer, _sel_setHTTPBody_, value?.pointer ?? ffi.nullptr); - } - - @override - NSInputStream? get HTTPBodyStream { - final _ret = _objc_msgSend_875(this.pointer, _sel_HTTPBodyStream); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, retain: true, release: true); - } - - set HTTPBodyStream(NSInputStream? value) { - return _objc_msgSend_1022( - this.pointer, _sel_setHTTPBodyStream_, value?.pointer ?? ffi.nullptr); - } - - @override - bool get HTTPShouldHandleCookies { - return _objc_msgSend_12(this.pointer, _sel_HTTPShouldHandleCookies); - } - - set HTTPShouldHandleCookies(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setHTTPShouldHandleCookies_, value); - } - - @override - bool get HTTPShouldUsePipelining { - return _objc_msgSend_12(this.pointer, _sel_HTTPShouldUsePipelining); - } - - set HTTPShouldUsePipelining(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setHTTPShouldUsePipelining_, value); - } - - static NSMutableURLRequest requestWithURL_(NSURL URL) { - final _ret = _objc_msgSend_262( - _class_NSMutableURLRequest, _sel_requestWithURL_, URL.pointer); - return NSMutableURLRequest._(_ret, retain: true, release: true); - } - - static bool getSupportsSecureCoding() { - return _objc_msgSend_12( - _class_NSMutableURLRequest, _sel_supportsSecureCoding); - } - - static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( - NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _objc_msgSend_858( - _class_NSMutableURLRequest, - _sel_requestWithURL_cachePolicy_timeoutInterval_, - URL.pointer, - cachePolicy, - timeoutInterval); - return NSMutableURLRequest._(_ret, retain: true, release: true); - } - - @override - NSMutableURLRequest initWithURL_(NSURL URL) { - final _ret = - _objc_msgSend_262(this.pointer, _sel_initWithURL_, URL.pointer); - return NSMutableURLRequest._(_ret, retain: true, release: true); - } +void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); - @override - NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _objc_msgSend_858( - this.pointer, - _sel_initWithURL_cachePolicy_timeoutInterval_, - URL.pointer, - cachePolicy, - timeoutInterval); - return NSMutableURLRequest._(_ret, retain: true, release: true); - } +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); - @override - NSMutableURLRequest init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableURLRequest._(_ret, retain: true, release: true); + /// 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 NSMutableURLRequest new1() { - final _ret = _objc_msgSend_2(_class_NSMutableURLRequest, _sel_new); - return NSMutableURLRequest._(_ret, retain: false, 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_NSArray_NSArray_NSArray.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _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 NSMutableURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMutableURLRequest, _sel_allocWithZone_, zone); - return NSMutableURLRequest._(_ret, 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.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + (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 NSMutableURLRequest alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableURLRequest, _sel_alloc); - return NSMutableURLRequest._(_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_NSArray_NSArray_NSArray.listener( + void Function(objc.NSArray, objc.NSArray, objc.NSArray) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + (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.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableURLRequest, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } + void call(objc.NSArray arg0, objc.NSArray arg1, objc.NSArray arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer, arg2.pointer); +} - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableURLRequest, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } +late final _sel_getTasksWithCompletionHandler_ = + objc.registerName("getTasksWithCompletionHandler:"); +final _objc_msgSend_610 = 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) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSArray1_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray1_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableURLRequest, _sel_accessInstanceVariablesDirectly); - } +void _ObjCBlock_ffiVoid_NSArray1_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSArray1_closureRegistry[block.ref.target.address]!( + arg0); - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMutableURLRequest, _sel_useStoredAccessor); - } +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); - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableURLRequest, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + /// 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 bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableURLRequest, - _sel_automaticallyNotifiesObserversForKey_, key.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_NSArray1.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableURLRequest, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } + /// 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.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray1_registerClosure( + (ffi.Pointer arg0) => fn( + objc.NSArray.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableURLRequest, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_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_NSArray1.listener(void Function(objc.NSArray) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray1_registerClosure( + (ffi.Pointer arg0) => fn( + objc.NSArray.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSMutableURLRequest, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } + 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 _class_NSMutableURLRequest = objc.getClass("NSMutableURLRequest"); -late final _sel_setURL_ = objc.registerName("setURL:"); -late final _sel_setCachePolicy_ = objc.registerName("setCachePolicy:"); -final _objc_msgSend_1017 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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_1018 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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_1019 = objc.msgSendPointer +late final _sel_getAllTasksWithCompletionHandler_ = + objc.registerName("getAllTasksWithCompletionHandler:"); +final _objc_msgSend_611 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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_1020 = 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_1021 = 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)>(); -late final _sel_setHTTPBodyStream_ = objc.registerName("setHTTPBodyStream:"); -final _objc_msgSend_1022 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dataTaskWithRequest_ = + objc.registerName("dataTaskWithRequest:"); +final _objc_msgSend_612 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, + ffi.Pointer 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_1023 = 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_1024 = 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_1025 = objc.msgSendPointer +late final _sel_dataTaskWithURL_ = objc.registerName("dataTaskWithURL:"); +final _objc_msgSend_613 = 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_initWithTask_cachedResponse_client_ = - objc.registerName("initWithTask:cachedResponse:client:"); -final _objc_msgSend_1026 = 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_1027 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -class NSXMLParser extends NSObject { - NSXMLParser._(ffi.Pointer pointer, +class NSURLSessionUploadTask extends NSURLSessionDataTask { + NSURLSessionUploadTask._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSXMLParser] that points to the same underlying object as [other]. - static NSXMLParser castFrom(T other) { - return NSXMLParser._(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.pointer, retain: true, release: true); - /// Returns a [NSXMLParser] that wraps the given raw object pointer. - static NSXMLParser castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLParser._(other, retain: retain, release: release); - } + /// 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 [NSXMLParser]. + /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSXMLParser); - } - - NSXMLParser? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSXMLParser._(_ret, retain: true, release: true); - } - - NSXMLParser initWithData_(NSData data) { - final _ret = - _objc_msgSend_279(this.pointer, _sel_initWithData_, data.pointer); - return NSXMLParser._(_ret, retain: true, release: true); - } - - NSXMLParser initWithStream_(NSInputStream stream) { - final _ret = - _objc_msgSend_1028(this.pointer, _sel_initWithStream_, stream.pointer); - return NSXMLParser._(_ret, retain: true, release: true); - } - - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); - } - - bool get shouldProcessNamespaces { - return _objc_msgSend_12(this.pointer, _sel_shouldProcessNamespaces); - } - - set shouldProcessNamespaces(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setShouldProcessNamespaces_, value); - } - - bool get shouldReportNamespacePrefixes { - return _objc_msgSend_12(this.pointer, _sel_shouldReportNamespacePrefixes); - } - - set shouldReportNamespacePrefixes(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setShouldReportNamespacePrefixes_, value); - } - - int get externalEntityResolvingPolicy { - return _objc_msgSend_1029(this.pointer, _sel_externalEntityResolvingPolicy); - } - - set externalEntityResolvingPolicy(int value) { - return _objc_msgSend_1030( - this.pointer, _sel_setExternalEntityResolvingPolicy_, value); - } - - NSSet? get allowedExternalEntityURLs { - final _ret = - _objc_msgSend_319(this.pointer, _sel_allowedExternalEntityURLs); - return _ret.address == 0 - ? null - : NSSet._(_ret, retain: true, release: true); - } - - set allowedExternalEntityURLs(NSSet? value) { - return _objc_msgSend_1031(this.pointer, _sel_setAllowedExternalEntityURLs_, - value?.pointer ?? ffi.nullptr); - } - - bool parse() { - return _objc_msgSend_12(this.pointer, _sel_parse); - } - - void abortParsing() { - _objc_msgSend_1(this.pointer, _sel_abortParsing); - } - - NSError? get parserError { - final _ret = _objc_msgSend_322(this.pointer, _sel_parserError); - return _ret.address == 0 - ? null - : NSError._(_ret, retain: true, release: true); - } - - bool get shouldResolveExternalEntities { - return _objc_msgSend_12(this.pointer, _sel_shouldResolveExternalEntities); - } - - set shouldResolveExternalEntities(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setShouldResolveExternalEntities_, value); - } - - NSString? get publicID { - final _ret = _objc_msgSend_44(this.pointer, _sel_publicID); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get systemID { - final _ret = _objc_msgSend_44(this.pointer, _sel_systemID); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - int get lineNumber { - return _objc_msgSend_83(this.pointer, _sel_lineNumber); + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionUploadTask); } - int get columnNumber { - return _objc_msgSend_83(this.pointer, _sel_columnNumber); + @override + NSURLSessionUploadTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - @override - NSXMLParser init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSXMLParser._(_ret, retain: true, release: true); + static NSURLSessionUploadTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionUploadTask, _sel_new); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } - static NSXMLParser new1() { - final _ret = _objc_msgSend_2(_class_NSXMLParser, _sel_new); - return NSXMLParser._(_ret, retain: false, release: true); + void cancelByProducingResumeData_( + ObjCBlock_ffiVoid_NSData completionHandler) { + _objc_msgSend_614(this.pointer, _sel_cancelByProducingResumeData_, + completionHandler.pointer); } - static NSXMLParser allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSXMLParser, _sel_allocWithZone_, zone); - return NSXMLParser._(_ret, retain: false, release: true); + static NSURLSessionUploadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionUploadTask, _sel_allocWithZone_, zone); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } - static NSXMLParser alloc() { - final _ret = _objc_msgSend_2(_class_NSXMLParser, _sel_alloc); - return NSXMLParser._(_ret, retain: false, release: true); + static NSURLSessionUploadTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionUploadTask, _sel_alloc); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSXMLParser, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionUploadTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSXMLParser, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionUploadTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSXMLParser, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLSessionUploadTask, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSXMLParser, _sel_useStoredAccessor); + return _objc_msgSend_7( + _class_NSURLSessionUploadTask, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSXMLParser, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionUploadTask, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSXMLParser, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionUploadTask, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSXMLParser, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionUploadTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSXMLParser, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionUploadTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSXMLParser, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionUploadTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSXMLParser = objc.getClass("NSXMLParser"); -late final _sel_initWithStream_ = objc.registerName("initWithStream:"); -final _objc_msgSend_1028 = objc.msgSendPointer +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); +final _ObjCBlock_ffiVoid_NSData_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSData_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSData_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSData_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSData_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSData_closureRegistry[block.ref.target.address]!(arg0); + +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); + + /// 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); + } + + /// 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.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_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_NSData.fromFunction(void Function(objc.NSData?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.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_NSData.listener(void Function(objc.NSData?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(objc.NSData? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_cancelByProducingResumeData_ = + objc.registerName("cancelByProducingResumeData:"); +final _objc_msgSend_614 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + 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_615 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_shouldProcessNamespaces = - objc.registerName("shouldProcessNamespaces"); -late final _sel_setShouldProcessNamespaces_ = - objc.registerName("setShouldProcessNamespaces:"); -late final _sel_shouldReportNamespacePrefixes = - objc.registerName("shouldReportNamespacePrefixes"); -late final _sel_setShouldReportNamespacePrefixes_ = - objc.registerName("setShouldReportNamespacePrefixes:"); - -abstract class NSXMLParserExternalEntityResolvingPolicy { - static const int NSXMLParserResolveExternalEntitiesNever = 0; - static const int NSXMLParserResolveExternalEntitiesNoNetwork = 1; - static const int NSXMLParserResolveExternalEntitiesSameOriginOnly = 2; - static const int NSXMLParserResolveExternalEntitiesAlways = 3; -} - -late final _sel_externalEntityResolvingPolicy = - objc.registerName("externalEntityResolvingPolicy"); -final _objc_msgSend_1029 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithRequest_fromData_ = + objc.registerName("uploadTaskWithRequest:fromData:"); +final _objc_msgSend_616 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setExternalEntityResolvingPolicy_ = - objc.registerName("setExternalEntityResolvingPolicy:"); -final _objc_msgSend_1030 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithResumeData_ = + objc.registerName("uploadTaskWithResumeData:"); +final _objc_msgSend_617 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_allowedExternalEntityURLs = - objc.registerName("allowedExternalEntityURLs"); -late final _sel_setAllowedExternalEntityURLs_ = - objc.registerName("setAllowedExternalEntityURLs:"); -final _objc_msgSend_1031 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_uploadTaskWithStreamedRequest_ = + objc.registerName("uploadTaskWithStreamedRequest:"); +final _objc_msgSend_618 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_parse = objc.registerName("parse"); -late final _sel_abortParsing = objc.registerName("abortParsing"); -late final _sel_parserError = objc.registerName("parserError"); -late final _sel_shouldResolveExternalEntities = - objc.registerName("shouldResolveExternalEntities"); -late final _sel_setShouldResolveExternalEntities_ = - objc.registerName("setShouldResolveExternalEntities:"); -late final _sel_publicID = objc.registerName("publicID"); -late final _sel_systemID = objc.registerName("systemID"); -late final _sel_lineNumber = objc.registerName("lineNumber"); -late final _sel_columnNumber = objc.registerName("columnNumber"); -class NSFileWrapper extends NSObject { - NSFileWrapper._(ffi.Pointer pointer, +class NSURLSessionDownloadTask extends NSURLSessionTask { + NSURLSessionDownloadTask._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSFileWrapper] that points to the same underlying object as [other]. - static NSFileWrapper castFrom(T other) { - return NSFileWrapper._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. + NSURLSessionDownloadTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSFileWrapper] that wraps the given raw object pointer. - static NSFileWrapper castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileWrapper._(other, retain: retain, release: release); - } + /// 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); - /// Returns whether [obj] is an instance of [NSFileWrapper]. + /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSFileWrapper); - } - - NSFileWrapper? initWithURL_options_error_(NSURL url, int options, - ffi.Pointer> outError) { - final _ret = _objc_msgSend_1032(this.pointer, - _sel_initWithURL_options_error_, url.pointer, options, outError); - return _ret.address == 0 - ? null - : NSFileWrapper._(_ret, retain: true, release: true); + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionDownloadTask); } - NSFileWrapper initDirectoryWithFileWrappers_( - NSDictionary childrenByPreferredName) { - final _ret = _objc_msgSend_159(this.pointer, - _sel_initDirectoryWithFileWrappers_, childrenByPreferredName.pointer); - return NSFileWrapper._(_ret, retain: true, release: true); + void cancelByProducingResumeData_( + ObjCBlock_ffiVoid_NSData completionHandler) { + _objc_msgSend_614(this.pointer, _sel_cancelByProducingResumeData_, + completionHandler.pointer); } - NSFileWrapper initRegularFileWithContents_(NSData contents) { - final _ret = _objc_msgSend_279( - this.pointer, _sel_initRegularFileWithContents_, contents.pointer); - return NSFileWrapper._(_ret, retain: true, release: true); + @override + NSURLSessionDownloadTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - NSFileWrapper initSymbolicLinkWithDestinationURL_(NSURL url) { - final _ret = _objc_msgSend_262( - this.pointer, _sel_initSymbolicLinkWithDestinationURL_, url.pointer); - return NSFileWrapper._(_ret, retain: true, release: true); + static NSURLSessionDownloadTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDownloadTask, _sel_new); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - NSFileWrapper? initWithSerializedRepresentation_( - NSData serializeRepresentation) { - final _ret = _objc_msgSend_874( - this.pointer, - _sel_initWithSerializedRepresentation_, - serializeRepresentation.pointer); - return _ret.address == 0 - ? null - : NSFileWrapper._(_ret, retain: true, release: true); + static NSURLSessionDownloadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionDownloadTask, _sel_allocWithZone_, zone); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - NSFileWrapper? initWithCoder_(NSCoder inCoder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, inCoder.pointer); - return _ret.address == 0 - ? null - : NSFileWrapper._(_ret, retain: true, release: true); + static NSURLSessionDownloadTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDownloadTask, _sel_alloc); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - bool get directory { - return _objc_msgSend_12(this.pointer, _sel_isDirectory); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionDownloadTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - bool get regularFile { - return _objc_msgSend_12(this.pointer, _sel_isRegularFile); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionDownloadTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - bool get symbolicLink { - return _objc_msgSend_12(this.pointer, _sel_isSymbolicLink); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionDownloadTask, _sel_accessInstanceVariablesDirectly); } - NSString? get preferredFilename { - final _ret = _objc_msgSend_44(this.pointer, _sel_preferredFilename); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionDownloadTask, _sel_useStoredAccessor); } - set preferredFilename(NSString? value) { - return _objc_msgSend_545(this.pointer, _sel_setPreferredFilename_, - value?.pointer ?? ffi.nullptr); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionDownloadTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSString? get filename { - final _ret = _objc_msgSend_44(this.pointer, _sel_filename); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionDownloadTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set filename(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setFilename_, value?.pointer ?? ffi.nullptr); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionDownloadTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSDictionary get fileAttributes { - final _ret = _objc_msgSend_181(this.pointer, _sel_fileAttributes); - return NSDictionary._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionDownloadTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set fileAttributes(NSDictionary value) { - return _objc_msgSend_182( - this.pointer, _sel_setFileAttributes_, value.pointer); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionDownloadTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - bool matchesContentsOfURL_(NSURL url) { - return _objc_msgSend_265( - this.pointer, _sel_matchesContentsOfURL_, url.pointer); - } +late final _class_NSURLSessionDownloadTask = + objc.getClass("NSURLSessionDownloadTask"); +late final _sel_downloadTaskWithRequest_ = + objc.registerName("downloadTaskWithRequest:"); +final _objc_msgSend_619 = 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_620 = 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_621 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - bool readFromURL_options_error_(NSURL url, int options, - ffi.Pointer> outError) { - return _objc_msgSend_1033(this.pointer, _sel_readFromURL_options_error_, - url.pointer, options, outError); - } +class NSURLSessionStreamTask extends NSURLSessionTask { + NSURLSessionStreamTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - bool writeToURL_options_originalContentsURL_error_( - NSURL url, - int options, - NSURL? originalContentsURL, - ffi.Pointer> outError) { - return _objc_msgSend_1034( - this.pointer, - _sel_writeToURL_options_originalContentsURL_error_, - url.pointer, - options, - originalContentsURL?.pointer ?? ffi.nullptr, - outError); - } + /// Constructs a [NSURLSessionStreamTask] that points to the same underlying object as [other]. + NSURLSessionStreamTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSData? get serializedRepresentation { - final _ret = _objc_msgSend_286(this.pointer, _sel_serializedRepresentation); - return _ret.address == 0 - ? null - : NSData._(_ret, 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); - NSString addFileWrapper_(NSFileWrapper child) { - final _ret = - _objc_msgSend_1035(this.pointer, _sel_addFileWrapper_, child.pointer); - return NSString._(_ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionStreamTask); } - NSString addRegularFileWithContents_preferredFilename_( - NSData data, NSString fileName) { - final _ret = _objc_msgSend_1036( + void readDataOfMinLength_maxLength_timeout_completionHandler_( + int minBytes, + int maxBytes, + double timeout, + ObjCBlock_ffiVoid_NSData_bool_NSError completionHandler) { + _objc_msgSend_622( this.pointer, - _sel_addRegularFileWithContents_preferredFilename_, - data.pointer, - fileName.pointer); - return NSString._(_ret, retain: true, release: true); - } - - void removeFileWrapper_(NSFileWrapper child) { - _objc_msgSend_1037(this.pointer, _sel_removeFileWrapper_, child.pointer); - } - - NSDictionary? get fileWrappers { - final _ret = _objc_msgSend_390(this.pointer, _sel_fileWrappers); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSString? keyForFileWrapper_(NSFileWrapper child) { - final _ret = _objc_msgSend_1038( - this.pointer, _sel_keyForFileWrapper_, child.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSData? get regularFileContents { - final _ret = _objc_msgSend_286(this.pointer, _sel_regularFileContents); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSURL? get symbolicLinkDestinationURL { - final _ret = - _objc_msgSend_45(this.pointer, _sel_symbolicLinkDestinationURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSObject? initWithPath_(NSString path) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_initWithPath_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject initSymbolicLinkWithDestination_(NSString path) { - final _ret = _objc_msgSend_31( - this.pointer, _sel_initSymbolicLinkWithDestination_, path.pointer); - return NSObject._(_ret, retain: true, release: true); + _sel_readDataOfMinLength_maxLength_timeout_completionHandler_, + minBytes, + maxBytes, + timeout, + completionHandler.pointer); } - bool needsToBeUpdatedFromPath_(NSString path) { - return _objc_msgSend_64( - this.pointer, _sel_needsToBeUpdatedFromPath_, path.pointer); + void writeData_timeout_completionHandler_(objc.NSData data, double timeout, + ObjCBlock_ffiVoid_NSError completionHandler) { + _objc_msgSend_623(this.pointer, _sel_writeData_timeout_completionHandler_, + data.pointer, timeout, completionHandler.pointer); } - bool updateFromPath_(NSString path) { - return _objc_msgSend_64(this.pointer, _sel_updateFromPath_, path.pointer); + void captureStreams() { + _objc_msgSend_82(this.pointer, _sel_captureStreams); } - bool writeToFile_atomically_updateFilenames_( - NSString path, bool atomicFlag, bool updateFilenamesFlag) { - return _objc_msgSend_1039( - this.pointer, - _sel_writeToFile_atomically_updateFilenames_, - path.pointer, - atomicFlag, - updateFilenamesFlag); + void closeWrite() { + _objc_msgSend_82(this.pointer, _sel_closeWrite); } - NSString addFileWithPath_(NSString path) { - final _ret = - _objc_msgSend_69(this.pointer, _sel_addFileWithPath_, path.pointer); - return NSString._(_ret, retain: true, release: true); + void closeRead() { + _objc_msgSend_82(this.pointer, _sel_closeRead); } - NSString addSymbolicLinkWithDestination_preferredFilename_( - NSString path, NSString filename) { - final _ret = _objc_msgSend_364( - this.pointer, - _sel_addSymbolicLinkWithDestination_preferredFilename_, - path.pointer, - filename.pointer); - return NSString._(_ret, retain: true, release: true); + void startSecureConnection() { + _objc_msgSend_82(this.pointer, _sel_startSecureConnection); } - NSString symbolicLinkDestination() { - final _ret = _objc_msgSend_21(this.pointer, _sel_symbolicLinkDestination); - return NSString._(_ret, retain: true, release: true); + void stopSecureConnection() { + _objc_msgSend_82(this.pointer, _sel_stopSecureConnection); } @override - NSFileWrapper init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSFileWrapper._(_ret, retain: true, release: true); + NSURLSessionStreamTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } - static NSFileWrapper new1() { - final _ret = _objc_msgSend_2(_class_NSFileWrapper, _sel_new); - return NSFileWrapper._(_ret, retain: false, release: true); + static NSURLSessionStreamTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionStreamTask, _sel_new); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } - static NSFileWrapper allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSFileWrapper, _sel_allocWithZone_, zone); - return NSFileWrapper._(_ret, retain: false, release: true); + static NSURLSessionStreamTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionStreamTask, _sel_allocWithZone_, zone); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } - static NSFileWrapper alloc() { - final _ret = _objc_msgSend_2(_class_NSFileWrapper, _sel_alloc); - return NSFileWrapper._(_ret, retain: false, release: true); + static NSURLSessionStreamTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionStreamTask, _sel_alloc); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSFileWrapper, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionStreamTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSFileWrapper, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionStreamTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSFileWrapper, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLSessionStreamTask, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSFileWrapper, _sel_useStoredAccessor); + return _objc_msgSend_7( + _class_NSURLSessionStreamTask, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSFileWrapper, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionStreamTask, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSFileWrapper, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionStreamTask, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSFileWrapper, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionStreamTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSFileWrapper, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionStreamTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSFileWrapper, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionStreamTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSFileWrapper = objc.getClass("NSFileWrapper"); - -abstract class NSFileWrapperReadingOptions { - static const int NSFileWrapperReadingImmediate = 1; - static const int NSFileWrapperReadingWithoutMapping = 2; +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); +final _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + void Function( + ffi.Pointer, bool, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -late final _sel_initWithURL_options_error_ = - objc.registerName("initWithURL:options:error:"); -final _objc_msgSend_1032 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_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_1033 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); +void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -abstract class NSFileWrapperWritingOptions { - static const int NSFileWrapperWritingAtomic = 1; - static const int NSFileWrapperWritingWithNameUpdating = 2; +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); + + /// 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); + } + + /// 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.newBlock( + _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; + + /// 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.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + (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; + + /// 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_NSData_bool_NSError.listener( + void Function(objc.NSData, bool, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Bool, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + (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.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_writeToURL_options_originalContentsURL_error_ = - objc.registerName("writeToURL:options:originalContentsURL:error:"); -final _objc_msgSend_1034 = objc.msgSendPointer +late final _sel_readDataOfMinLength_maxLength_timeout_completionHandler_ = objc + .registerName("readDataOfMinLength:maxLength:timeout:completionHandler:"); +final _objc_msgSend_622 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Double, + ffi.Pointer)>>() .asFunction< - bool Function( + void 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:"); -final _objc_msgSend_1035 = 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_1036 = objc.msgSendPointer + int, + double, + ffi.Pointer)>(); +late final _sel_writeData_timeout_completionHandler_ = + objc.registerName("writeData:timeout:completionHandler:"); +final _objc_msgSend_623 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Double, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_removeFileWrapper_ = objc.registerName("removeFileWrapper:"); -final _objc_msgSend_1037 = 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_1038 = objc.msgSendPointer + 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_624 = 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"); -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_1039 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Bool, - ffi.Bool)>>() + ffi.Long)>>() .asFunction< - bool Function( + ffi.Pointer 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"); + int)>(); -class NSURLSession extends NSObject { - NSURLSession._(ffi.Pointer pointer, +class NSNetService extends objc.NSObject { + NSNetService._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLSession] that points to the same underlying object as [other]. - static NSURLSession castFrom(T other) { - return NSURLSession._(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.pointer, retain: true, release: true); - /// Returns a [NSURLSession] that wraps the given raw object pointer. - static NSURLSession castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSession._(other, retain: retain, release: release); - } + /// 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 [NSURLSession]. + /// Returns whether [obj] is an instance of [NSNetService]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSession); - } - - static NSURLSession getSharedSession() { - final _ret = _objc_msgSend_1040(_class_NSURLSession, _sel_sharedSession); - return NSURLSession._(_ret, retain: true, release: true); - } - - static NSURLSession sessionWithConfiguration_( - NSURLSessionConfiguration configuration) { - final _ret = _objc_msgSend_1056(_class_NSURLSession, - _sel_sessionWithConfiguration_, configuration.pointer); - return NSURLSession._(_ret, retain: true, release: true); + obj.pointer, _sel_isKindOfClass_, _class_NSNetService); } - static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( - NSURLSessionConfiguration configuration, - NSObject? delegate, - NSOperationQueue? queue) { - final _ret = _objc_msgSend_1057( - _class_NSURLSession, - _sel_sessionWithConfiguration_delegate_delegateQueue_, - configuration.pointer, - delegate?.pointer ?? ffi.nullptr, - queue?.pointer ?? ffi.nullptr); - return NSURLSession._(_ret, retain: true, release: true); + NSNetService initWithDomain_type_name_port_( + objc.NSString domain, objc.NSString type, objc.NSString name, int port) { + final _ret = _objc_msgSend_625( + this.pointer, + _sel_initWithDomain_type_name_port_, + domain.pointer, + type.pointer, + name.pointer, + port); + return NSNetService.castFromPointer(_ret, retain: true, release: true); } - NSOperationQueue get delegateQueue { - final _ret = _objc_msgSend_917(this.pointer, _sel_delegateQueue); - return NSOperationQueue._(_ret, retain: true, release: true); + NSNetService initWithDomain_type_name_( + objc.NSString domain, objc.NSString type, objc.NSString name) { + final _ret = _objc_msgSend_626(this.pointer, _sel_initWithDomain_type_name_, + domain.pointer, type.pointer, name.pointer); + return NSNetService.castFromPointer(_ret, retain: true, release: true); } - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - NSURLSessionConfiguration get configuration { - final _ret = _objc_msgSend_1041(this.pointer, _sel_configuration); - return NSURLSessionConfiguration._(_ret, retain: true, release: true); + void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_removeFromRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); } - NSString? get sessionDescription { - final _ret = _objc_msgSend_44(this.pointer, _sel_sessionDescription); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set sessionDescription(NSString? value) { - return _objc_msgSend_545(this.pointer, _sel_setSessionDescription_, - value?.pointer ?? ffi.nullptr); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - void finishTasksAndInvalidate() { - _objc_msgSend_1(this.pointer, _sel_finishTasksAndInvalidate); + bool get includesPeerToPeer { + return _objc_msgSend_7(this.pointer, _sel_includesPeerToPeer); } - void invalidateAndCancel() { - _objc_msgSend_1(this.pointer, _sel_invalidateAndCancel); + set includesPeerToPeer(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setIncludesPeerToPeer_, value); } - void resetWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { - _objc_msgSend_532(this.pointer, _sel_resetWithCompletionHandler_, - completionHandler.pointer); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void flushWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { - _objc_msgSend_532(this.pointer, _sel_flushWithCompletionHandler_, - completionHandler.pointer); + objc.NSString get type { + final _ret = _objc_msgSend_12(this.pointer, _sel_type); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void getTasksWithCompletionHandler_( - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray completionHandler) { - _objc_msgSend_1058(this.pointer, _sel_getTasksWithCompletionHandler_, - completionHandler.pointer); + objc.NSString get domain { + final _ret = _objc_msgSend_12(this.pointer, _sel_domain); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void getAllTasksWithCompletionHandler_( - ObjCBlock_ffiVoid_NSArray1 completionHandler) { - _objc_msgSend_1059(this.pointer, _sel_getAllTasksWithCompletionHandler_, - completionHandler.pointer); + objc.NSString? get hostName { + final _ret = _objc_msgSend_13(this.pointer, _sel_hostName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_1060( - this.pointer, _sel_dataTaskWithRequest_, request.pointer); - return NSURLSessionDataTask._(_ret, retain: true, release: true); + objc.NSArray? get addresses { + final _ret = _objc_msgSend_69(this.pointer, _sel_addresses); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionDataTask dataTaskWithURL_(NSURL url) { - final _ret = - _objc_msgSend_1061(this.pointer, _sel_dataTaskWithURL_, url.pointer); - return NSURLSessionDataTask._(_ret, retain: true, release: true); + int get port { + return _objc_msgSend_114(this.pointer, _sel_port); } - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( - NSURLRequest request, NSURL fileURL) { - final _ret = _objc_msgSend_1063(this.pointer, - _sel_uploadTaskWithRequest_fromFile_, request.pointer, fileURL.pointer); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); + void publish() { + _objc_msgSend_82(this.pointer, _sel_publish); } - NSURLSessionUploadTask uploadTaskWithRequest_fromData_( - NSURLRequest request, NSData bodyData) { - final _ret = _objc_msgSend_1064( - this.pointer, - _sel_uploadTaskWithRequest_fromData_, - request.pointer, - bodyData.pointer); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); + void publishWithOptions_(int options) { + _objc_msgSend_627(this.pointer, _sel_publishWithOptions_, options); } - NSURLSessionUploadTask uploadTaskWithResumeData_(NSData resumeData) { - final _ret = _objc_msgSend_1065( - this.pointer, _sel_uploadTaskWithResumeData_, resumeData.pointer); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); + void resolve() { + _objc_msgSend_82(this.pointer, _sel_resolve); } - NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_1066( - this.pointer, _sel_uploadTaskWithStreamedRequest_, request.pointer); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); + void stop() { + _objc_msgSend_82(this.pointer, _sel_stop); } - NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_1067( - this.pointer, _sel_downloadTaskWithRequest_, request.pointer); - return NSURLSessionDownloadTask._(_ret, retain: true, release: true); + static objc.NSDictionary dictionaryFromTXTRecordData_(objc.NSData txtData) { + final _ret = _objc_msgSend_628(_class_NSNetService, + _sel_dictionaryFromTXTRecordData_, txtData.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionDownloadTask downloadTaskWithURL_(NSURL url) { - final _ret = _objc_msgSend_1068( - this.pointer, _sel_downloadTaskWithURL_, url.pointer); - return NSURLSessionDownloadTask._(_ret, retain: true, release: true); + static objc.NSData dataFromTXTRecordDictionary_( + objc.NSDictionary txtDictionary) { + final _ret = _objc_msgSend_629(_class_NSNetService, + _sel_dataFromTXTRecordDictionary_, txtDictionary.pointer); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData resumeData) { - final _ret = _objc_msgSend_1069( - this.pointer, _sel_downloadTaskWithResumeData_, resumeData.pointer); - return NSURLSessionDownloadTask._(_ret, retain: true, release: true); + void resolveWithTimeout_(double timeout) { + _objc_msgSend_630(this.pointer, _sel_resolveWithTimeout_, timeout); } - NSURLSessionStreamTask streamTaskWithHostName_port_( - NSString hostname, int port) { - final _ret = _objc_msgSend_1072(this.pointer, - _sel_streamTaskWithHostName_port_, hostname.pointer, port); - return NSURLSessionStreamTask._(_ret, retain: true, release: true); + bool getInputStream_outputStream_( + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _objc_msgSend_631(this.pointer, _sel_getInputStream_outputStream_, + inputStream, outputStream); } - NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { - final _ret = _objc_msgSend_1080( - this.pointer, _sel_streamTaskWithNetService_, service.pointer); - return NSURLSessionStreamTask._(_ret, retain: true, release: true); + bool setTXTRecordData_(objc.NSData? recordData) { + return _objc_msgSend_632(this.pointer, _sel_setTXTRecordData_, + recordData?.pointer ?? ffi.nullptr); } - NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL url) { - final _ret = _objc_msgSend_1087( - this.pointer, _sel_webSocketTaskWithURL_, url.pointer); - return NSURLSessionWebSocketTask._(_ret, retain: true, release: true); + objc.NSData? TXTRecordData() { + final _ret = _objc_msgSend_325(this.pointer, _sel_TXTRecordData); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( - NSURL url, NSArray protocols) { - final _ret = _objc_msgSend_1088(this.pointer, - _sel_webSocketTaskWithURL_protocols_, url.pointer, protocols.pointer); - return NSURLSessionWebSocketTask._(_ret, retain: true, release: true); + void startMonitoring() { + _objc_msgSend_82(this.pointer, _sel_startMonitoring); } - NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_1089( - this.pointer, _sel_webSocketTaskWithRequest_, request.pointer); - return NSURLSessionWebSocketTask._(_ret, retain: true, release: true); + void stopMonitoring() { + _objc_msgSend_82(this.pointer, _sel_stopMonitoring); } @override - NSURLSession init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSession._(_ret, retain: true, release: true); - } - - static NSURLSession new1() { - final _ret = _objc_msgSend_2(_class_NSURLSession, _sel_new); - return NSURLSession._(_ret, retain: false, release: true); - } - - NSURLSessionDataTask dataTaskWithRequest_completionHandler_( - NSURLRequest request, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1090( - this.pointer, - _sel_dataTaskWithRequest_completionHandler_, - request.pointer, - completionHandler.pointer); - return NSURLSessionDataTask._(_ret, retain: true, release: true); - } - - NSURLSessionDataTask dataTaskWithURL_completionHandler_(NSURL url, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1091( - this.pointer, - _sel_dataTaskWithURL_completionHandler_, - url.pointer, - completionHandler.pointer); - return NSURLSessionDataTask._(_ret, retain: true, release: true); - } - - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( - NSURLRequest request, - NSURL fileURL, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1092( - this.pointer, - _sel_uploadTaskWithRequest_fromFile_completionHandler_, - request.pointer, - fileURL.pointer, - completionHandler.pointer); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); - } - - NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( - NSURLRequest request, - NSData? bodyData, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1093( - this.pointer, - _sel_uploadTaskWithRequest_fromData_completionHandler_, - request.pointer, - bodyData?.pointer ?? ffi.nullptr, - completionHandler.pointer); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); - } - - NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_( - NSData resumeData, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1094( - this.pointer, - _sel_uploadTaskWithResumeData_completionHandler_, - resumeData.pointer, - completionHandler.pointer); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); - } - - NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( - NSURLRequest request, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1095( - this.pointer, - _sel_downloadTaskWithRequest_completionHandler_, - request.pointer, - completionHandler.pointer); - return NSURLSessionDownloadTask._(_ret, retain: true, release: true); - } - - NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_(NSURL url, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1096( - this.pointer, - _sel_downloadTaskWithURL_completionHandler_, - url.pointer, - completionHandler.pointer); - return NSURLSessionDownloadTask._(_ret, retain: true, release: true); + NSNetService init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSNetService.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( - NSData resumeData, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1097( - this.pointer, - _sel_downloadTaskWithResumeData_completionHandler_, - resumeData.pointer, - completionHandler.pointer); - return NSURLSessionDownloadTask._(_ret, retain: true, release: true); + static NSNetService new1() { + final _ret = _objc_msgSend_40(_class_NSNetService, _sel_new); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } - static NSURLSession allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSNetService allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSURLSession, _sel_allocWithZone_, zone); - return NSURLSession._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSNetService, _sel_allocWithZone_, zone); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } - static NSURLSession alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSession, _sel_alloc); - return NSURLSession._(_ret, retain: false, release: true); + static NSNetService alloc() { + final _ret = _objc_msgSend_40(_class_NSNetService, _sel_alloc); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSession, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSNetService, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSession, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSNetService, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSession, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSNetService, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLSession, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSNetService, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSession, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSNetService, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSession, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSNetService, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSession, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSNetService, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSession, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSNetService, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSURLSession, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSNetService, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSURLSession = objc.getClass("NSURLSession"); -late final _sel_sharedSession = objc.registerName("sharedSession"); -final _objc_msgSend_1040 = 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_625 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + instancetype 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_626 = 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_includesPeerToPeer = objc.registerName("includesPeerToPeer"); +late final _sel_setIncludesPeerToPeer_ = + objc.registerName("setIncludesPeerToPeer:"); +late final _sel_type = objc.registerName("type"); +late final _sel_publish = objc.registerName("publish"); -class NSURLSessionConfiguration extends NSObject { - NSURLSessionConfiguration._(ffi.Pointer pointer, +abstract class NSNetServiceOptions { + static const int NSNetServiceNoAutoRename = 1; + static const int NSNetServiceListenForConnections = 2; +} + +late final _sel_publishWithOptions_ = objc.registerName("publishWithOptions:"); +final _objc_msgSend_627 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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:"); +final _objc_msgSend_628 = 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_629 = 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_630 = 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_631 = 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_632 = 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_633 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSURLSessionWebSocketTask extends NSURLSessionTask { + NSURLSessionWebSocketTask._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLSessionConfiguration] that points to the same underlying object as [other]. - static NSURLSessionConfiguration castFrom( - T other) { - return NSURLSessionConfiguration._(other.pointer, - retain: true, release: true); - } + /// Constructs a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. + NSURLSessionWebSocketTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSURLSessionConfiguration] that wraps the given raw object pointer. - static NSURLSessionConfiguration castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLSessionConfiguration._(other, retain: retain, release: release); - } + /// 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 [NSURLSessionConfiguration]. + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionConfiguration); - } - - static NSURLSessionConfiguration getDefaultSessionConfiguration() { - final _ret = _objc_msgSend_1041( - _class_NSURLSessionConfiguration, _sel_defaultSessionConfiguration); - return NSURLSessionConfiguration._(_ret, retain: true, release: true); - } - - static NSURLSessionConfiguration getEphemeralSessionConfiguration() { - final _ret = _objc_msgSend_1041( - _class_NSURLSessionConfiguration, _sel_ephemeralSessionConfiguration); - return NSURLSessionConfiguration._(_ret, retain: true, release: true); - } - - static NSURLSessionConfiguration - backgroundSessionConfigurationWithIdentifier_(NSString identifier) { - final _ret = _objc_msgSend_1042(_class_NSURLSessionConfiguration, - _sel_backgroundSessionConfigurationWithIdentifier_, identifier.pointer); - return NSURLSessionConfiguration._(_ret, retain: true, release: true); - } - - NSString? get identifier { - final _ret = _objc_msgSend_44(this.pointer, _sel_identifier); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - int get requestCachePolicy { - return _objc_msgSend_859(this.pointer, _sel_requestCachePolicy); - } - - set requestCachePolicy(int value) { - return _objc_msgSend_1017(this.pointer, _sel_setRequestCachePolicy_, value); - } - - double get timeoutIntervalForRequest { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_timeoutIntervalForRequest) - : _objc_msgSend_165(this.pointer, _sel_timeoutIntervalForRequest); - } - - set timeoutIntervalForRequest(double value) { - return _objc_msgSend_542( - this.pointer, _sel_setTimeoutIntervalForRequest_, value); - } - - double get timeoutIntervalForResource { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_timeoutIntervalForResource) - : _objc_msgSend_165(this.pointer, _sel_timeoutIntervalForResource); - } - - set timeoutIntervalForResource(double value) { - return _objc_msgSend_542( - this.pointer, _sel_setTimeoutIntervalForResource_, value); - } - - int get networkServiceType { - return _objc_msgSend_860(this.pointer, _sel_networkServiceType); - } - - set networkServiceType(int value) { - return _objc_msgSend_1018(this.pointer, _sel_setNetworkServiceType_, value); - } - - bool get allowsCellularAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsCellularAccess); - } - - set allowsCellularAccess(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAllowsCellularAccess_, value); - } - - bool get allowsExpensiveNetworkAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsExpensiveNetworkAccess); - } - - set allowsExpensiveNetworkAccess(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); - } - - bool get allowsConstrainedNetworkAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsConstrainedNetworkAccess); - } - - set allowsConstrainedNetworkAccess(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); - } - - bool get requiresDNSSECValidation { - return _objc_msgSend_12(this.pointer, _sel_requiresDNSSECValidation); - } - - set requiresDNSSECValidation(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setRequiresDNSSECValidation_, value); - } - - bool get waitsForConnectivity { - return _objc_msgSend_12(this.pointer, _sel_waitsForConnectivity); + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketTask); } - set waitsForConnectivity(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setWaitsForConnectivity_, value); + void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, + ObjCBlock_ffiVoid_NSError completionHandler) { + _objc_msgSend_635(this.pointer, _sel_sendMessage_completionHandler_, + message.pointer, completionHandler.pointer); } - bool get discretionary { - return _objc_msgSend_12(this.pointer, _sel_isDiscretionary); + void receiveMessageWithCompletionHandler_( + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError + completionHandler) { + _objc_msgSend_636(this.pointer, _sel_receiveMessageWithCompletionHandler_, + completionHandler.pointer); } - set discretionary(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setDiscretionary_, value); + void sendPingWithPongReceiveHandler_( + ObjCBlock_ffiVoid_NSError pongReceiveHandler) { + _objc_msgSend_637(this.pointer, _sel_sendPingWithPongReceiveHandler_, + pongReceiveHandler.pointer); } - NSString? get sharedContainerIdentifier { - final _ret = _objc_msgSend_44(this.pointer, _sel_sharedContainerIdentifier); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + void cancelWithCloseCode_reason_(int closeCode, objc.NSData? reason) { + _objc_msgSend_638(this.pointer, _sel_cancelWithCloseCode_reason_, closeCode, + reason?.pointer ?? ffi.nullptr); } - set sharedContainerIdentifier(NSString? value) { - return _objc_msgSend_545(this.pointer, _sel_setSharedContainerIdentifier_, - value?.pointer ?? ffi.nullptr); + int get maximumMessageSize { + return _objc_msgSend_114(this.pointer, _sel_maximumMessageSize); } - bool get sessionSendsLaunchEvents { - return _objc_msgSend_12(this.pointer, _sel_sessionSendsLaunchEvents); + set maximumMessageSize(int value) { + return _objc_msgSend_134(this.pointer, _sel_setMaximumMessageSize_, value); } - set sessionSendsLaunchEvents(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setSessionSendsLaunchEvents_, value); + int get closeCode { + return _objc_msgSend_639(this.pointer, _sel_closeCode); } - NSDictionary? get connectionProxyDictionary { - final _ret = - _objc_msgSend_390(this.pointer, _sel_connectionProxyDictionary); + objc.NSData? get closeReason { + final _ret = _objc_msgSend_325(this.pointer, _sel_closeReason); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - set connectionProxyDictionary(NSDictionary? value) { - return _objc_msgSend_634(this.pointer, _sel_setConnectionProxyDictionary_, - value?.pointer ?? ffi.nullptr); - } - - int get TLSMinimumSupportedProtocol { - return _objc_msgSend_1043(this.pointer, _sel_TLSMinimumSupportedProtocol); - } - - set TLSMinimumSupportedProtocol(int value) { - return _objc_msgSend_1044( - this.pointer, _sel_setTLSMinimumSupportedProtocol_, value); - } - - int get TLSMaximumSupportedProtocol { - return _objc_msgSend_1043(this.pointer, _sel_TLSMaximumSupportedProtocol); - } - - set TLSMaximumSupportedProtocol(int value) { - return _objc_msgSend_1044( - this.pointer, _sel_setTLSMaximumSupportedProtocol_, value); - } - - int get TLSMinimumSupportedProtocolVersion { - return _objc_msgSend_1045( - this.pointer, _sel_TLSMinimumSupportedProtocolVersion); - } - - set TLSMinimumSupportedProtocolVersion(int value) { - return _objc_msgSend_1046( - this.pointer, _sel_setTLSMinimumSupportedProtocolVersion_, value); - } - - int get TLSMaximumSupportedProtocolVersion { - return _objc_msgSend_1045( - this.pointer, _sel_TLSMaximumSupportedProtocolVersion); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - set TLSMaximumSupportedProtocolVersion(int value) { - return _objc_msgSend_1046( - this.pointer, _sel_setTLSMaximumSupportedProtocolVersion_, value); - } - - bool get HTTPShouldUsePipelining { - return _objc_msgSend_12(this.pointer, _sel_HTTPShouldUsePipelining); - } - - set HTTPShouldUsePipelining(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setHTTPShouldUsePipelining_, value); + @override + NSURLSessionWebSocketTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - bool get HTTPShouldSetCookies { - return _objc_msgSend_12(this.pointer, _sel_HTTPShouldSetCookies); + static NSURLSessionWebSocketTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionWebSocketTask, _sel_new); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } - set HTTPShouldSetCookies(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setHTTPShouldSetCookies_, value); + static NSURLSessionWebSocketTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionWebSocketTask, _sel_allocWithZone_, zone); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } - int get HTTPCookieAcceptPolicy { - return _objc_msgSend_856(this.pointer, _sel_HTTPCookieAcceptPolicy); + static NSURLSessionWebSocketTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionWebSocketTask, _sel_alloc); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } - set HTTPCookieAcceptPolicy(int value) { - return _objc_msgSend_857( - this.pointer, _sel_setHTTPCookieAcceptPolicy_, value); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionWebSocketTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSDictionary? get HTTPAdditionalHeaders { - final _ret = _objc_msgSend_390(this.pointer, _sel_HTTPAdditionalHeaders); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionWebSocketTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set HTTPAdditionalHeaders(NSDictionary? value) { - return _objc_msgSend_634(this.pointer, _sel_setHTTPAdditionalHeaders_, - value?.pointer ?? ffi.nullptr); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionWebSocketTask, _sel_accessInstanceVariablesDirectly); } - int get HTTPMaximumConnectionsPerHost { - return _objc_msgSend_83(this.pointer, _sel_HTTPMaximumConnectionsPerHost); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionWebSocketTask, _sel_useStoredAccessor); } - set HTTPMaximumConnectionsPerHost(int value) { - return _objc_msgSend_635( - this.pointer, _sel_setHTTPMaximumConnectionsPerHost_, value); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionWebSocketTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSHTTPCookieStorage? get HTTPCookieStorage { - final _ret = _objc_msgSend_1047(this.pointer, _sel_HTTPCookieStorage); - return _ret.address == 0 - ? null - : NSHTTPCookieStorage._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionWebSocketTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set HTTPCookieStorage(NSHTTPCookieStorage? value) { - return _objc_msgSend_1048(this.pointer, _sel_setHTTPCookieStorage_, - value?.pointer ?? ffi.nullptr); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionWebSocketTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSURLCredentialStorage? get URLCredentialStorage { - final _ret = _objc_msgSend_1049(this.pointer, _sel_URLCredentialStorage); - return _ret.address == 0 - ? null - : NSURLCredentialStorage._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionWebSocketTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set URLCredentialStorage(NSURLCredentialStorage? value) { - return _objc_msgSend_1050(this.pointer, _sel_setURLCredentialStorage_, - value?.pointer ?? ffi.nullptr); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionWebSocketTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSURLCache? get URLCache { - final _ret = _objc_msgSend_1051(this.pointer, _sel_URLCache); - return _ret.address == 0 - ? null - : NSURLCache._(_ret, retain: true, release: true); - } +late final _class_NSURLSessionWebSocketTask = + objc.getClass("NSURLSessionWebSocketTask"); - set URLCache(NSURLCache? value) { - return _objc_msgSend_1052( - this.pointer, _sel_setURLCache_, value?.pointer ?? ffi.nullptr); - } +class NSURLSessionWebSocketMessage extends objc.NSObject { + NSURLSessionWebSocketMessage._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - bool get shouldUseExtendedBackgroundIdleMode { - return _objc_msgSend_12( - this.pointer, _sel_shouldUseExtendedBackgroundIdleMode); - } + /// Constructs a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. + NSURLSessionWebSocketMessage.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - set shouldUseExtendedBackgroundIdleMode(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setShouldUseExtendedBackgroundIdleMode_, value); + /// 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); + + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketMessage); } - NSArray? get protocolClasses { - final _ret = _objc_msgSend_84(this.pointer, _sel_protocolClasses); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + NSURLSessionWebSocketMessage initWithData_(objc.NSData data) { + final _ret = + _objc_msgSend_340(this.pointer, _sel_initWithData_, data.pointer); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); } - set protocolClasses(NSArray? value) { - return _objc_msgSend_1053( - this.pointer, _sel_setProtocolClasses_, value?.pointer ?? ffi.nullptr); + NSURLSessionWebSocketMessage initWithString_(objc.NSString string) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithString_, string.pointer); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); } - int get multipathServiceType { - return _objc_msgSend_1054(this.pointer, _sel_multipathServiceType); + int get type { + return _objc_msgSend_634(this.pointer, _sel_type); } - set multipathServiceType(int value) { - return _objc_msgSend_1055( - this.pointer, _sel_setMultipathServiceType_, value); + objc.NSData? get data { + final _ret = _objc_msgSend_325(this.pointer, _sel_data); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - @override - NSURLSessionConfiguration init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionConfiguration._(_ret, retain: true, release: true); + objc.NSString? get string { + final _ret = _objc_msgSend_13(this.pointer, _sel_string); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionConfiguration new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionConfiguration, _sel_new); - return NSURLSessionConfiguration._(_ret, retain: false, release: true); + @override + NSURLSessionWebSocketMessage init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); } - static NSURLSessionConfiguration backgroundSessionConfiguration_( - NSString identifier) { - final _ret = _objc_msgSend_1042(_class_NSURLSessionConfiguration, - _sel_backgroundSessionConfiguration_, identifier.pointer); - return NSURLSessionConfiguration._(_ret, retain: true, release: true); + static NSURLSessionWebSocketMessage new1() { + final _ret = + _objc_msgSend_40(_class_NSURLSessionWebSocketMessage, _sel_new); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } - static NSURLSessionConfiguration allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSURLSessionConfiguration, _sel_allocWithZone_, zone); - return NSURLSessionConfiguration._(_ret, retain: false, release: true); + static NSURLSessionWebSocketMessage allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionWebSocketMessage, _sel_allocWithZone_, zone); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } - static NSURLSessionConfiguration alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSessionConfiguration, _sel_alloc); - return NSURLSessionConfiguration._(_ret, retain: false, release: true); + static NSURLSessionWebSocketMessage alloc() { + final _ret = + _objc_msgSend_40(_class_NSURLSessionWebSocketMessage, _sel_alloc); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionConfiguration, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionWebSocketMessage, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionConfiguration, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionWebSocketMessage, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSessionConfiguration, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7(_class_NSURLSessionWebSocketMessage, + _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLSessionConfiguration, _sel_useStoredAccessor); + return _objc_msgSend_7( + _class_NSURLSessionWebSocketMessage, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionConfiguration, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionWebSocketMessage, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionConfiguration, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionWebSocketMessage, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionConfiguration, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionWebSocketMessage, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSessionConfiguration, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6(_class_NSURLSessionWebSocketMessage, + _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLSessionConfiguration, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionWebSocketMessage, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSURLSessionConfiguration = - objc.getClass("NSURLSessionConfiguration"); -late final _sel_defaultSessionConfiguration = - objc.registerName("defaultSessionConfiguration"); -final _objc_msgSend_1041 = 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_1042 = 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:"); +late final _class_NSURLSessionWebSocketMessage = + objc.getClass("NSURLSessionWebSocketMessage"); -abstract class SSLProtocol { - static const int kSSLProtocolUnknown = 0; - static const int kTLSProtocol1 = 4; - static const int kTLSProtocol11 = 7; - static const int kTLSProtocol12 = 8; - static const int kDTLSProtocol1 = 9; - static const int kTLSProtocol13 = 10; - static const int kDTLSProtocol12 = 11; - static const int kTLSProtocolMaxSupported = 999; - static const int kSSLProtocol2 = 1; - static const int kSSLProtocol3 = 2; - static const int kSSLProtocol3Only = 3; - static const int kTLSProtocol1Only = 5; - static const int kSSLProtocolAll = 6; +abstract class NSURLSessionWebSocketMessageType { + static const int NSURLSessionWebSocketMessageTypeData = 0; + static const int NSURLSessionWebSocketMessageTypeString = 1; } -late final _sel_TLSMinimumSupportedProtocol = - objc.registerName("TLSMinimumSupportedProtocol"); -final _objc_msgSend_1043 = objc.msgSendPointer +final _objc_msgSend_634 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -53147,182 +30456,236 @@ final _objc_msgSend_1043 = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setTLSMinimumSupportedProtocol_ = - objc.registerName("setTLSMinimumSupportedProtocol:"); -final _objc_msgSend_1044 = objc.msgSendPointer +late final _sel_sendMessage_completionHandler_ = + objc.registerName("sendMessage:completionHandler:"); +final _objc_msgSend_635 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_TLSMaximumSupportedProtocol = - objc.registerName("TLSMaximumSupportedProtocol"); -late final _sel_setTLSMaximumSupportedProtocol_ = - objc.registerName("setTLSMaximumSupportedProtocol:"); + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +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); +final _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + void Function( + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[id] = + fn; + return ffi.Pointer.fromAddress(id); +} -abstract class tls_protocol_version_t { - static const int tls_protocol_version_TLSv10 = 769; - static const int tls_protocol_version_TLSv11 = 770; - static const int tls_protocol_version_TLSv12 = 771; - static const int tls_protocol_version_TLSv13 = 772; - static const int tls_protocol_version_DTLSv10 = -257; - static const int tls_protocol_version_DTLSv12 = -259; +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +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); + + /// 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); + } + + /// 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.newBlock( + _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; + + /// 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.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + (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; + + /// 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_NSURLSessionWebSocketMessage_NSError.listener( + void Function(NSURLSessionWebSocketMessage?, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + (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.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURLSessionWebSocketMessage? 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_TLSMinimumSupportedProtocolVersion = - objc.registerName("TLSMinimumSupportedProtocolVersion"); -final _objc_msgSend_1045 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setTLSMinimumSupportedProtocolVersion_ = - objc.registerName("setTLSMinimumSupportedProtocolVersion:"); -final _objc_msgSend_1046 = objc.msgSendPointer +late final _sel_receiveMessageWithCompletionHandler_ = + objc.registerName("receiveMessageWithCompletionHandler:"); +final _objc_msgSend_636 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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_1047 = 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_1048 = 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_1049 = 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_1050 = 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)>(); -late final _sel_URLCache = objc.registerName("URLCache"); -final _objc_msgSend_1051 = 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_1052 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sendPingWithPongReceiveHandler_ = + objc.registerName("sendPingWithPongReceiveHandler:"); +final _objc_msgSend_637 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + 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_1053 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSURLSessionWebSocketCloseCode { + static const int NSURLSessionWebSocketCloseCodeInvalid = 0; + static const int NSURLSessionWebSocketCloseCodeNormalClosure = 1000; + static const int NSURLSessionWebSocketCloseCodeGoingAway = 1001; + static const int NSURLSessionWebSocketCloseCodeProtocolError = 1002; + static const int NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; + static const int NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; + static const int NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; + static const int NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; + static const int NSURLSessionWebSocketCloseCodePolicyViolation = 1008; + static const int NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; + static const int NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = + 1010; + static const int NSURLSessionWebSocketCloseCodeInternalServerError = 1011; + static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; +} + +late final _sel_cancelWithCloseCode_reason_ = + objc.registerName("cancelWithCloseCode:reason:"); +final _objc_msgSend_638 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSURLSessionMultipathServiceType { - static const int NSURLSessionMultipathServiceTypeNone = 0; - static const int NSURLSessionMultipathServiceTypeHandover = 1; - static const int NSURLSessionMultipathServiceTypeInteractive = 2; - static const int NSURLSessionMultipathServiceTypeAggregate = 3; -} - -late final _sel_multipathServiceType = - objc.registerName("multipathServiceType"); -final _objc_msgSend_1054 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setMultipathServiceType_ = - objc.registerName("setMultipathServiceType:"); -final _objc_msgSend_1055 = objc.msgSendPointer + 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_closeCode = objc.registerName("closeCode"); +final _objc_msgSend_639 = objc.msgSendPointer .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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_1056 = objc.msgSendPointer + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_closeReason = objc.registerName("closeReason"); +late final _sel_webSocketTaskWithURL_ = + objc.registerName("webSocketTaskWithURL:"); +final _objc_msgSend_640 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -53332,37 +30695,35 @@ final _objc_msgSend_1056 = objc.msgSendPointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_sessionWithConfiguration_delegate_delegateQueue_ = - objc.registerName("sessionWithConfiguration:delegate:delegateQueue:"); -final _objc_msgSend_1057 = objc.msgSendPointer +late final _sel_webSocketTaskWithURL_protocols_ = + objc.registerName("webSocketTaskWithURL:protocols:"); +final _objc_msgSend_641 = 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"); -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( +late final _sel_webSocketTaskWithRequest_ = + objc.registerName("webSocketTaskWithRequest:"); +final _objc_msgSend_642 = 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 arg0, ffi.Pointer arg1, @@ -53379,41 +30740,43 @@ void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline( ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry = , ffi.Pointer, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex = 0; +int _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex = 0; ffi.Pointer - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[id] = fn; + final id = + ++_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline( +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[ + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[ block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._( +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); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSArray_NSArray_NSArray castFromPointer( + static ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._(pointer, + return ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError._(pointer, retain: retain, release: release); } @@ -53422,7 +30785,7 @@ class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends objc.ObjCBlockBase { /// This block must be invoked by native 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( + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( @@ -53437,7 +30800,7 @@ class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends objc.ObjCBlockBase { ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline) + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; @@ -53447,22 +30810,21 @@ class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends objc.ObjCBlockBase { /// This block must be invoked by native 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(NSArray, NSArray, NSArray) fn) + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunction( + void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - fn(NSArray._(arg0, retain: true, release: true), NSArray._(arg1, retain: true, release: true), NSArray._(arg2, retain: true, release: true))))); + 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; /// Creates a listener block from a Dart function. @@ -53474,23 +30836,25 @@ 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(NSArray, NSArray, NSArray) fn) + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.listener( + void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) - ..keepIsolateAlive = false) + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) + ..keepIsolateAlive = false) .nativeFunction .cast(), - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - NSArray._(arg0, retain: true, release: true), - NSArray._(arg1, retain: true, release: true), - NSArray._(arg2, retain: true, release: true))))); + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( + (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.NativeCallable< ffi.Void Function( ffi.Pointer, @@ -53498,322 +30862,164 @@ class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends objc.ObjCBlockBase { ffi.Pointer, ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(NSArray arg0, NSArray arg1, NSArray arg2) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, arg0.pointer, arg1.pointer, arg2.pointer); + void call(objc.NSData? arg0, NSURLResponse? arg1, objc.NSError? arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, + arg0?.pointer ?? ffi.nullptr, + arg1?.pointer ?? ffi.nullptr, + arg2?.pointer ?? ffi.nullptr); } -late final _sel_getTasksWithCompletionHandler_ = - objc.registerName("getTasksWithCompletionHandler:"); -final _objc_msgSend_1058 = objc.msgSendPointer +late final _sel_dataTaskWithRequest_completionHandler_ = + objc.registerName("dataTaskWithRequest:completionHandler:"); +final _objc_msgSend_643 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + 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) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSArray1_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSArray1_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSArray1_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSArray1_closureRegistry[block.ref.target.address]!( - arg0); - -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); - - /// 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); - } - - /// 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.newBlock( - _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(NSArray) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSArray1_registerClosure( - (ffi.Pointer arg0) => - fn(NSArray._(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(NSArray) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSArray1_registerClosure( - (ffi.Pointer arg0) => - fn(NSArray._(arg0, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(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_1059 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_dataTaskWithURL_completionHandler_ = + objc.registerName("dataTaskWithURL:completionHandler:"); +final _objc_msgSend_644 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + 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_1060 = objc.msgSendPointer + 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_645 = 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)>(); -late final _sel_dataTaskWithURL_ = objc.registerName("dataTaskWithURL:"); -final _objc_msgSend_1061 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithRequest_fromData_completionHandler_ = + objc.registerName("uploadTaskWithRequest:fromData:completionHandler:"); +final _objc_msgSend_646 = 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)>(); - -class NSURLSessionUploadTask extends NSURLSessionDataTask { - NSURLSessionUploadTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSURLSessionUploadTask] that points to the same underlying object as [other]. - static NSURLSessionUploadTask castFrom( - T other) { - return NSURLSessionUploadTask._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSURLSessionUploadTask] that wraps the given raw object pointer. - static NSURLSessionUploadTask castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLSessionUploadTask._(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); - } - - @override - NSURLSessionUploadTask init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); - } - - static NSURLSessionUploadTask new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionUploadTask, _sel_new); - return NSURLSessionUploadTask._(_ret, retain: false, release: true); - } - - void cancelByProducingResumeData_( - ObjCBlock_ffiVoid_NSData completionHandler) { - _objc_msgSend_1062(this.pointer, _sel_cancelByProducingResumeData_, - completionHandler.pointer); - } - - static NSURLSessionUploadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSURLSessionUploadTask, _sel_allocWithZone_, zone); - return NSURLSessionUploadTask._(_ret, retain: false, release: true); - } - - static NSURLSessionUploadTask alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSessionUploadTask, _sel_alloc); - return NSURLSessionUploadTask._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionUploadTask, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionUploadTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSessionUploadTask, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLSessionUploadTask, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionUploadTask, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionUploadTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionUploadTask, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSessionUploadTask, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLSessionUploadTask, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSURLSessionUploadTask = - objc.getClass("NSURLSessionUploadTask"); -void _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => + 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_647 = 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 arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSData_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSData_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSData_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSData_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_closureRegistry[id] = fn; + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSData_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSData_closureRegistry[block.ref.target.address]!(arg0); +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_NSData extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSData._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) +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); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData castFromPointer( + static ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSData._(pointer, + return ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError._(pointer, retain: retain, release: release); } @@ -53822,16 +31028,22 @@ class ObjCBlock_ffiVoid_NSData extends objc.ObjCBlockBase { /// This block must be invoked by native 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( + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> ptr) : this._(objc.newBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_fnPtrTrampoline) + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; @@ -53841,17 +31053,21 @@ class ObjCBlock_ffiVoid_NSData extends objc.ObjCBlockBase { /// This block must be invoked by native 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(NSData?) fn) + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunction( + void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSData._(arg0, retain: true, release: true))))); + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( + (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; /// Creates a listener block from a Dart function. @@ -53863,449 +31079,568 @@ 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(NSData?) fn) + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.listener( + void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_closureTrampoline) - ..keepIsolateAlive = false) + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) + ..keepIsolateAlive = false) .nativeFunction .cast(), - _ObjCBlock_ffiVoid_NSData_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSData._(arg0, retain: true, release: true))))); + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure((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.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(NSData? 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); + void call(objc.NSURL? arg0, NSURLResponse? arg1, objc.NSError? arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, + arg0?.pointer ?? ffi.nullptr, + arg1?.pointer ?? ffi.nullptr, + arg2?.pointer ?? ffi.nullptr); } -late final _sel_cancelByProducingResumeData_ = - objc.registerName("cancelByProducingResumeData:"); -final _objc_msgSend_1062 = 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_1063 = objc.msgSendPointer +late final _sel_downloadTaskWithRequest_completionHandler_ = + objc.registerName("downloadTaskWithRequest:completionHandler:"); +final _objc_msgSend_648 = 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)>(); -late final _sel_uploadTaskWithRequest_fromData_ = - objc.registerName("uploadTaskWithRequest:fromData:"); -final _objc_msgSend_1064 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_downloadTaskWithURL_completionHandler_ = + objc.registerName("downloadTaskWithURL:completionHandler:"); +final _objc_msgSend_649 = 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)>(); -late final _sel_uploadTaskWithResumeData_ = - objc.registerName("uploadTaskWithResumeData:"); -final _objc_msgSend_1065 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_downloadTaskWithResumeData_completionHandler_ = + objc.registerName("downloadTaskWithResumeData:completionHandler:"); +final _objc_msgSend_650 = 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)>(); -late final _sel_uploadTaskWithStreamedRequest_ = - objc.registerName("uploadTaskWithStreamedRequest:"); -final _objc_msgSend_1066 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); + +class NSProtocolChecker extends 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.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_0( + obj.pointer, _sel_isKindOfClass_, _class_NSProtocolChecker); + } + + objc.Protocol get protocol { + final _ret = _objc_msgSend_651(this.pointer, _sel_protocol); + return objc.Protocol.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? get target { + final _ret = _objc_msgSend_457(this.pointer, _sel_target); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSProtocolChecker protocolCheckerWithTarget_protocol_( + objc.NSObject anObject, objc.Protocol aProtocol) { + final _ret = _objc_msgSend_652( + _class_NSProtocolChecker, + _sel_protocolCheckerWithTarget_protocol_, + anObject.pointer, + aProtocol.pointer); + return NSProtocolChecker.castFromPointer(_ret, retain: true, release: true); + } + + NSProtocolChecker initWithTarget_protocol_( + objc.NSObject anObject, objc.Protocol aProtocol) { + final _ret = _objc_msgSend_652(this.pointer, _sel_initWithTarget_protocol_, + anObject.pointer, aProtocol.pointer); + return NSProtocolChecker.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject alloc() { + final _ret = _objc_msgSend_40(_class_NSProtocolChecker, _sel_alloc); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static bool respondsToSelector_(ffi.Pointer aSelector) { + return _objc_msgSend_228( + _class_NSProtocolChecker, _sel_respondsToSelector_, aSelector); + } +} + +late final _class_NSProtocolChecker = objc.getClass("NSProtocolChecker"); +final _objc_msgSend_651 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + 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_652 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithTarget_protocol_ = + objc.registerName("initWithTarget:protocol:"); -class NSURLSessionDownloadTask extends NSURLSessionTask { - NSURLSessionDownloadTask._(ffi.Pointer pointer, +class NSTask extends objc.NSObject { + NSTask._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. - static NSURLSessionDownloadTask castFrom( - T other) { - return NSURLSessionDownloadTask._(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.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); } - /// Returns a [NSURLSessionDownloadTask] that wraps the given raw object pointer. - static NSURLSessionDownloadTask castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLSessionDownloadTask._(other, retain: retain, release: release); + @override + NSTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTask.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionDownloadTask); + objc.NSURL? get executableURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_executableURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void cancelByProducingResumeData_( - ObjCBlock_ffiVoid_NSData completionHandler) { - _objc_msgSend_1062(this.pointer, _sel_cancelByProducingResumeData_, - completionHandler.pointer); + set executableURL(objc.NSURL? value) { + return _objc_msgSend_566( + this.pointer, _sel_setExecutableURL_, value?.pointer ?? ffi.nullptr); } - @override - NSURLSessionDownloadTask init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionDownloadTask._(_ret, retain: true, release: true); + objc.NSArray? get arguments { + final _ret = _objc_msgSend_69(this.pointer, _sel_arguments); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionDownloadTask new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionDownloadTask, _sel_new); - return NSURLSessionDownloadTask._(_ret, retain: false, release: true); + set arguments(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setArguments_, value?.pointer ?? ffi.nullptr); } - static NSURLSessionDownloadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSURLSessionDownloadTask, _sel_allocWithZone_, zone); - return NSURLSessionDownloadTask._(_ret, retain: false, release: true); + objc.NSDictionary? get environment { + final _ret = _objc_msgSend_65(this.pointer, _sel_environment); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionDownloadTask alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSessionDownloadTask, _sel_alloc); - return NSURLSessionDownloadTask._(_ret, retain: false, release: true); + set environment(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, _sel_setEnvironment_, value?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionDownloadTask, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + objc.NSURL? get currentDirectoryURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_currentDirectoryURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionDownloadTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + set currentDirectoryURL(objc.NSURL? value) { + return _objc_msgSend_566(this.pointer, _sel_setCurrentDirectoryURL_, + value?.pointer ?? ffi.nullptr); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSessionDownloadTask, _sel_accessInstanceVariablesDirectly); + objc.NSData? get launchRequirementData { + final _ret = _objc_msgSend_325(this.pointer, _sel_launchRequirementData); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLSessionDownloadTask, _sel_useStoredAccessor); + set launchRequirementData(objc.NSData? value) { + return _objc_msgSend_571(this.pointer, _sel_setLaunchRequirementData_, + value?.pointer ?? ffi.nullptr); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionDownloadTask, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + objc.NSObject? get standardInput { + final _ret = _objc_msgSend_66(this.pointer, _sel_standardInput); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionDownloadTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + set standardInput(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setStandardInput_, value?.pointer ?? ffi.nullptr); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionDownloadTask, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + objc.NSObject? get standardOutput { + final _ret = _objc_msgSend_66(this.pointer, _sel_standardOutput); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSessionDownloadTask, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + set standardOutput(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setStandardOutput_, value?.pointer ?? ffi.nullptr); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLSessionDownloadTask, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + objc.NSObject? get standardError { + final _ret = _objc_msgSend_66(this.pointer, _sel_standardError); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } -} -late final _class_NSURLSessionDownloadTask = - objc.getClass("NSURLSessionDownloadTask"); -late final _sel_downloadTaskWithRequest_ = - objc.registerName("downloadTaskWithRequest:"); -final _objc_msgSend_1067 = 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_1068 = 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_1069 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + set standardError(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setStandardError_, value?.pointer ?? ffi.nullptr); + } -class NSURLSessionStreamTask extends NSURLSessionTask { - NSURLSessionStreamTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + bool launchAndReturnError_(ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_launchAndReturnError_, error); + } - /// Returns a [NSURLSessionStreamTask] that points to the same underlying object as [other]. - static NSURLSessionStreamTask castFrom( - T other) { - return NSURLSessionStreamTask._(other.pointer, retain: true, release: true); + void interrupt() { + _objc_msgSend_82(this.pointer, _sel_interrupt); } - /// Returns a [NSURLSessionStreamTask] that wraps the given raw object pointer. - static NSURLSessionStreamTask castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLSessionStreamTask._(other, retain: retain, release: release); + void terminate() { + _objc_msgSend_82(this.pointer, _sel_terminate); } - /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionStreamTask); + bool suspend() { + return _objc_msgSend_7(this.pointer, _sel_suspend); } - void readDataOfMinLength_maxLength_timeout_completionHandler_( - int minBytes, - int maxBytes, - double timeout, - ObjCBlock_ffiVoid_NSData_bool_NSError completionHandler) { - _objc_msgSend_1070( - this.pointer, - _sel_readDataOfMinLength_maxLength_timeout_completionHandler_, - minBytes, - maxBytes, - timeout, - completionHandler.pointer); + bool resume() { + return _objc_msgSend_7(this.pointer, _sel_resume); } - void writeData_timeout_completionHandler_(NSData data, double timeout, - ObjCBlock_ffiVoid_NSError completionHandler) { - _objc_msgSend_1071(this.pointer, _sel_writeData_timeout_completionHandler_, - data.pointer, timeout, completionHandler.pointer); + int get processIdentifier { + return _objc_msgSend_264(this.pointer, _sel_processIdentifier); } - void captureStreams() { - _objc_msgSend_1(this.pointer, _sel_captureStreams); + bool get running { + return _objc_msgSend_7(this.pointer, _sel_isRunning); } - void closeWrite() { - _objc_msgSend_1(this.pointer, _sel_closeWrite); + int get terminationStatus { + return _objc_msgSend_264(this.pointer, _sel_terminationStatus); } - void closeRead() { - _objc_msgSend_1(this.pointer, _sel_closeRead); + int get terminationReason { + return _objc_msgSend_653(this.pointer, _sel_terminationReason); } - void startSecureConnection() { - _objc_msgSend_1(this.pointer, _sel_startSecureConnection); + ObjCBlock_ffiVoid_NSTask? get terminationHandler { + final _ret = _objc_msgSend_654(this.pointer, _sel_terminationHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSTask.castFromPointer(_ret, + retain: true, release: true); } - void stopSecureConnection() { - _objc_msgSend_1(this.pointer, _sel_stopSecureConnection); + set terminationHandler(ObjCBlock_ffiVoid_NSTask? value) { + return _objc_msgSend_655(this.pointer, _sel_setTerminationHandler_, + value?.pointer ?? ffi.nullptr); } - @override - NSURLSessionStreamTask init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionStreamTask._(_ret, retain: true, release: true); + int get qualityOfService { + return _objc_msgSend_454(this.pointer, _sel_qualityOfService); } - static NSURLSessionStreamTask new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionStreamTask, _sel_new); - return NSURLSessionStreamTask._(_ret, retain: false, release: true); + set qualityOfService(int value) { + return _objc_msgSend_455(this.pointer, _sel_setQualityOfService_, value); } - static NSURLSessionStreamTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSURLSessionStreamTask, _sel_allocWithZone_, zone); - return NSURLSessionStreamTask._(_ret, retain: false, release: true); + static NSTask? + launchedTaskWithExecutableURL_arguments_error_terminationHandler_( + objc.NSURL url, + objc.NSArray arguments, + ffi.Pointer> error, + ObjCBlock_ffiVoid_NSTask? terminationHandler) { + final _ret = _objc_msgSend_656( + _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); } - static NSURLSessionStreamTask alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSessionStreamTask, _sel_alloc); - return NSURLSessionStreamTask._(_ret, retain: false, release: true); + void waitUntilExit() { + _objc_msgSend_82(this.pointer, _sel_waitUntilExit); + } + + objc.NSString? get launchPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_launchPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set launchPath(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setLaunchPath_, value?.pointer ?? ffi.nullptr); + } + + objc.NSString get currentDirectoryPath { + final _ret = _objc_msgSend_12(this.pointer, _sel_currentDirectoryPath); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set currentDirectoryPath(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrentDirectoryPath_, value.pointer); + } + + void launch() { + _objc_msgSend_82(this.pointer, _sel_launch); + } + + static NSTask launchedTaskWithLaunchPath_arguments_( + objc.NSString path, objc.NSArray arguments) { + final _ret = _objc_msgSend_657( + _class_NSTask, + _sel_launchedTaskWithLaunchPath_arguments_, + path.pointer, + arguments.pointer); + return NSTask.castFromPointer(_ret, retain: true, release: true); + } + + static NSTask new1() { + final _ret = _objc_msgSend_40(_class_NSTask, _sel_new); + return NSTask.castFromPointer(_ret, retain: false, release: true); + } + + static NSTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSTask, _sel_allocWithZone_, zone); + return NSTask.castFromPointer(_ret, retain: false, release: true); + } + + static NSTask alloc() { + final _ret = _objc_msgSend_40(_class_NSTask, _sel_alloc); + return NSTask.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionStreamTask, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionStreamTask, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSessionStreamTask, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7(_class_NSTask, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLSessionStreamTask, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSTask, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionStreamTask, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTask, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionStreamTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51( + _class_NSTask, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionStreamTask, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSessionStreamTask, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLSessionStreamTask, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -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) => +late final _class_NSTask = objc.getClass("NSTask"); +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_launchRequirementData = + objc.registerName("launchRequirementData"); +late final _sel_setLaunchRequirementData_ = + objc.registerName("setLaunchRequirementData:"); +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_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"); + +abstract class NSTaskTerminationReason { + static const int NSTaskTerminationReasonExit = 1; + static const int NSTaskTerminationReasonUncaughtSignal = 2; +} + +late final _sel_terminationReason = objc.registerName("terminationReason"); +final _objc_msgSend_653 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 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, - ffi.Bool arg1, ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, bool, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( - void Function( - ffi.Pointer, bool, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[id] = fn; + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSTask_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSTask_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSTask_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSTask_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSTask_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_NSTask_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSTask_closureRegistry[block.ref.target.address]!(arg0); -class ObjCBlock_ffiVoid_NSData_bool_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSData_bool_NSError._(ffi.Pointer pointer, +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); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData_bool_NSError castFromPointer( + static ObjCBlock_ffiVoid_NSTask castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSData_bool_NSError._(pointer, + return ObjCBlock_ffiVoid_NSTask._(pointer, retain: retain, release: release); } @@ -54314,20 +31649,16 @@ class ObjCBlock_ffiVoid_NSData_bool_NSError extends objc.ObjCBlockBase { /// This block must be invoked by native 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( + ObjCBlock_ffiVoid_NSTask.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Bool arg1, ffi.Pointer arg2)>> + ffi.Void Function(ffi.Pointer arg0)>> ptr) : this._(objc.newBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, + ffi.Void Function(ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline) + _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; @@ -54337,21 +31668,17 @@ class ObjCBlock_ffiVoid_NSData_bool_NSError extends objc.ObjCBlockBase { /// This block must be invoked by native 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(NSData, bool, NSError?) fn) + ObjCBlock_ffiVoid_NSTask.fromFunction(void Function(NSTask) fn) : this._(objc.newBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, + ffi.Void Function(ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + _ObjCBlock_ffiVoid_NSTask_closureTrampoline) .cast(), - _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(NSData._(arg0, retain: true, release: true), arg1, arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); + _ObjCBlock_ffiVoid_NSTask_registerClosure( + (ffi.Pointer arg0) => fn( + NSTask.castFromPointer(arg0, + retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -54363,1277 +31690,1039 @@ 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(NSData, bool, NSError?) fn) + ObjCBlock_ffiVoid_NSTask.listener(void Function(NSTask) fn) : this._(objc.newBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, + ffi.Void Function(ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + _ObjCBlock_ffiVoid_NSTask_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), - _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(NSData._(arg0, retain: true, release: true), arg1, arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); + _ObjCBlock_ffiVoid_NSTask_registerClosure( + (ffi.Pointer arg0) => fn( + NSTask.castFromPointer(arg0, + retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>? _dartFuncListenerTrampoline; + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - void call(NSData arg0, bool arg1, 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); + void call(NSTask 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_readDataOfMinLength_maxLength_timeout_completionHandler_ = objc - .registerName("readDataOfMinLength:maxLength:timeout:completionHandler:"); -final _objc_msgSend_1070 = objc.msgSendPointer +late final _sel_terminationHandler = objc.registerName("terminationHandler"); +final _objc_msgSend_654 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Double, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + 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_1071 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTerminationHandler_ = + objc.registerName("setTerminationHandler:"); +final _objc_msgSend_655 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + 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_656 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Double, + ffi.Pointer, + ffi.Pointer>, ffi.Pointer)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - double, + ffi.Pointer, + ffi.Pointer>, 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_1072 = objc.msgSendPointer +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_launch = objc.registerName("launch"); +late final _sel_launchedTaskWithLaunchPath_arguments_ = + objc.registerName("launchedTaskWithLaunchPath:arguments:"); +final _objc_msgSend_657 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Long)>>() + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int)>(); + ffi.Pointer)>(); -class NSNetService extends NSObject { - NSNetService._(ffi.Pointer pointer, +class NSXMLElement extends NSXMLNode { + NSXMLElement._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSNetService] that points to the same underlying object as [other]. - static NSNetService castFrom(T other) { - return NSNetService._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSXMLElement] that points to the same underlying object as [other]. + NSXMLElement.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSNetService] that wraps the given raw object pointer. - static NSNetService castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNetService._(other, retain: retain, release: release); - } + /// 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 [NSNetService]. + /// Returns whether [obj] is an instance of [NSXMLElement]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSNetService); + obj.pointer, _sel_isKindOfClass_, _class_NSXMLElement); } - NSNetService initWithDomain_type_name_port_( - NSString domain, NSString type, NSString name, int port) { - final _ret = _objc_msgSend_1073( - this.pointer, - _sel_initWithDomain_type_name_port_, - domain.pointer, - type.pointer, - name.pointer, - port); - return NSNetService._(_ret, retain: true, release: true); + NSXMLElement initWithName_(objc.NSString name) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithName_, name.pointer); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - NSNetService initWithDomain_type_name_( - NSString domain, NSString type, NSString name) { - final _ret = _objc_msgSend_1074( - this.pointer, - _sel_initWithDomain_type_name_, - domain.pointer, - type.pointer, - name.pointer); - return NSNetService._(_ret, retain: true, release: true); + NSXMLElement initWithName_URI_(objc.NSString name, objc.NSString? URI) { + final _ret = _objc_msgSend_694(this.pointer, _sel_initWithName_URI_, + name.pointer, URI?.pointer ?? ffi.nullptr); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_scheduleInRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); + NSXMLElement initWithName_stringValue_( + objc.NSString name, objc.NSString? string) { + final _ret = _objc_msgSend_694(this.pointer, _sel_initWithName_stringValue_, + name.pointer, string?.pointer ?? ffi.nullptr); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_removeFromRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); + NSXMLElement? initWithXMLString_error_( + objc.NSString string, ffi.Pointer> error) { + final _ret = _objc_msgSend_695( + this.pointer, _sel_initWithXMLString_error_, string.pointer, error); + return _ret.address == 0 + ? null + : NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSXMLElement initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray elementsForName_(objc.NSString name) { + final _ret = + _objc_msgSend_445(this.pointer, _sel_elementsForName_, name.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray elementsForLocalName_URI_( + objc.NSString localName, objc.NSString? URI) { + final _ret = _objc_msgSend_696(this.pointer, _sel_elementsForLocalName_URI_, + localName.pointer, URI?.pointer ?? ffi.nullptr); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + void addAttribute_(NSXMLNode attribute) { + _objc_msgSend_673(this.pointer, _sel_addAttribute_, attribute.pointer); + } + + void removeAttributeForName_(objc.NSString name) { + _objc_msgSend_98(this.pointer, _sel_removeAttributeForName_, name.pointer); } - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); + objc.NSArray? get attributes { + final _ret = _objc_msgSend_69(this.pointer, _sel_attributes); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set delegate(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); + set attributes(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setAttributes_, value?.pointer ?? ffi.nullptr); } - bool get includesPeerToPeer { - return _objc_msgSend_12(this.pointer, _sel_includesPeerToPeer); + void setAttributesWithDictionary_(objc.NSDictionary attributes) { + _objc_msgSend_697( + this.pointer, _sel_setAttributesWithDictionary_, attributes.pointer); } - set includesPeerToPeer(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setIncludesPeerToPeer_, value); + NSXMLNode? attributeForName_(objc.NSString name) { + final _ret = + _objc_msgSend_677(this.pointer, _sel_attributeForName_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - NSString get name { - final _ret = _objc_msgSend_21(this.pointer, _sel_name); - return NSString._(_ret, retain: true, release: true); + NSXMLNode? attributeForLocalName_URI_( + objc.NSString localName, objc.NSString? URI) { + final _ret = _objc_msgSend_698( + this.pointer, + _sel_attributeForLocalName_URI_, + localName.pointer, + URI?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - NSString get type { - final _ret = _objc_msgSend_21(this.pointer, _sel_type); - return NSString._(_ret, retain: true, release: true); + void addNamespace_(NSXMLNode aNamespace) { + _objc_msgSend_673(this.pointer, _sel_addNamespace_, aNamespace.pointer); } - NSString get domain { - final _ret = _objc_msgSend_21(this.pointer, _sel_domain); - return NSString._(_ret, retain: true, release: true); + void removeNamespaceForPrefix_(objc.NSString name) { + _objc_msgSend_98( + this.pointer, _sel_removeNamespaceForPrefix_, name.pointer); } - NSString? get hostName { - final _ret = _objc_msgSend_44(this.pointer, _sel_hostName); + objc.NSArray? get namespaces { + final _ret = _objc_msgSend_69(this.pointer, _sel_namespaces); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSArray? get addresses { - final _ret = _objc_msgSend_84(this.pointer, _sel_addresses); + set namespaces(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setNamespaces_, value?.pointer ?? ffi.nullptr); + } + + NSXMLNode? namespaceForPrefix_(objc.NSString name) { + final _ret = + _objc_msgSend_677(this.pointer, _sel_namespaceForPrefix_, name.pointer); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - int get port { - return _objc_msgSend_83(this.pointer, _sel_port); + NSXMLNode? resolveNamespaceForName_(objc.NSString name) { + final _ret = _objc_msgSend_677( + this.pointer, _sel_resolveNamespaceForName_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - void publish() { - _objc_msgSend_1(this.pointer, _sel_publish); + objc.NSString? resolvePrefixForNamespaceURI_(objc.NSString namespaceURI) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_resolvePrefixForNamespaceURI_, namespaceURI.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void publishWithOptions_(int options) { - _objc_msgSend_1075(this.pointer, _sel_publishWithOptions_, options); + void insertChild_atIndex_(NSXMLNode child, int index) { + _objc_msgSend_671( + this.pointer, _sel_insertChild_atIndex_, child.pointer, index); } - void resolve() { - _objc_msgSend_1(this.pointer, _sel_resolve); + void insertChildren_atIndex_(objc.NSArray children, int index) { + _objc_msgSend_672( + this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); } - void stop() { - _objc_msgSend_1(this.pointer, _sel_stop); + void removeChildAtIndex_(int index) { + _objc_msgSend_414(this.pointer, _sel_removeChildAtIndex_, index); } - static NSDictionary dictionaryFromTXTRecordData_(NSData txtData) { - final _ret = _objc_msgSend_1076(_class_NSNetService, - _sel_dictionaryFromTXTRecordData_, txtData.pointer); - return NSDictionary._(_ret, retain: true, release: true); + void setChildren_(objc.NSArray? children) { + _objc_msgSend_260( + this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); } - static NSData dataFromTXTRecordDictionary_(NSDictionary txtDictionary) { - final _ret = _objc_msgSend_1077(_class_NSNetService, - _sel_dataFromTXTRecordDictionary_, txtDictionary.pointer); - return NSData._(_ret, retain: true, release: true); + void addChild_(NSXMLNode child) { + _objc_msgSend_673(this.pointer, _sel_addChild_, child.pointer); } - void resolveWithTimeout_(double timeout) { - _objc_msgSend_541(this.pointer, _sel_resolveWithTimeout_, timeout); + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _objc_msgSend_674( + this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); } - bool getInputStream_outputStream_( - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - return _objc_msgSend_1078(this.pointer, _sel_getInputStream_outputStream_, - inputStream, outputStream); + void normalizeAdjacentTextNodesPreservingCDATA_(bool preserve) { + _objc_msgSend_336(this.pointer, + _sel_normalizeAdjacentTextNodesPreservingCDATA_, preserve); } - bool setTXTRecordData_(NSData? recordData) { - return _objc_msgSend_1079(this.pointer, _sel_setTXTRecordData_, - recordData?.pointer ?? ffi.nullptr); + void setAttributesAsDictionary_(objc.NSDictionary attributes) { + _objc_msgSend_697( + this.pointer, _sel_setAttributesAsDictionary_, attributes.pointer); + } + + @override + NSXMLElement init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSXMLElement initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLElement, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLElement, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = _objc_msgSend_35( + _class_NSXMLElement, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLElement, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLElement, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLElement, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLElement, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLElement, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSData? TXTRecordData() { - final _ret = _objc_msgSend_286(this.pointer, _sel_TXTRecordData); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLElement, _sel_DTDNodeWithXMLString_, string.pointer); return _ret.address == 0 ? null - : NSData._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void startMonitoring() { - _objc_msgSend_1(this.pointer, _sel_startMonitoring); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLElement, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void stopMonitoring() { - _objc_msgSend_1(this.pointer, _sel_stopMonitoring); + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_14( + _class_NSXMLElement, _sel_prefixForName_, name.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSNetService init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSNetService._(_ret, retain: true, release: true); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLElement, _sel_predefinedNamespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSNetService new1() { - final _ret = _objc_msgSend_2(_class_NSNetService, _sel_new); - return NSNetService._(_ret, retain: false, release: true); + static NSXMLElement new1() { + final _ret = _objc_msgSend_40(_class_NSXMLElement, _sel_new); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } - static NSNetService allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSXMLElement allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSNetService, _sel_allocWithZone_, zone); - return NSNetService._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSXMLElement, _sel_allocWithZone_, zone); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } - static NSNetService alloc() { - final _ret = _objc_msgSend_2(_class_NSNetService, _sel_alloc); - return NSNetService._(_ret, retain: false, release: true); + static NSXMLElement alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLElement, _sel_alloc); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSNetService, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLElement, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSNetService, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLElement, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSNetService, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSXMLElement, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSNetService, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSXMLElement, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSNetService, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLElement, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSNetService, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLElement, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSNetService, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLElement, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSNetService, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLElement, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSNetService, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSXMLElement, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_1073 = 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:"); -final _objc_msgSend_1074 = 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_includesPeerToPeer = objc.registerName("includesPeerToPeer"); -late final _sel_setIncludesPeerToPeer_ = - objc.registerName("setIncludesPeerToPeer:"); -late final _sel_type = objc.registerName("type"); +late final _class_NSXMLElement = objc.getClass("NSXMLElement"); -abstract class NSNetServiceOptions { - static const int NSNetServiceNoAutoRename = 1; - static const int NSNetServiceListenForConnections = 2; -} +class NSXMLNode extends objc.NSObject { + NSXMLNode._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -late final _sel_publishWithOptions_ = objc.registerName("publishWithOptions:"); -final _objc_msgSend_1075 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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:"); -final _objc_msgSend_1076 = 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_1077 = 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:"); -late final _sel_getInputStream_outputStream_ = - objc.registerName("getInputStream:outputStream:"); -final _objc_msgSend_1078 = 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_1079 = 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_1080 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + /// Constructs a [NSXMLNode] that points to the same underlying object as [other]. + NSXMLNode.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class NSURLSessionWebSocketTask extends NSURLSessionTask { - NSURLSessionWebSocketTask._(ffi.Pointer pointer, + /// Constructs a [NSXMLNode] that wraps the given raw object pointer. + NSXMLNode.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. - static NSURLSessionWebSocketTask castFrom( - T other) { - return NSURLSessionWebSocketTask._(other.pointer, - retain: true, release: true); + /// Returns whether [obj] is an instance of [NSXMLNode]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSXMLNode); } - /// Returns a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. - static NSURLSessionWebSocketTask castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLSessionWebSocketTask._(other, retain: retain, release: release); + @override + NSXMLNode init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketTask); + NSXMLNode initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, - ObjCBlock_ffiVoid_NSError completionHandler) { - _objc_msgSend_1082(this.pointer, _sel_sendMessage_completionHandler_, - message.pointer, completionHandler.pointer); + NSXMLNode initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - void receiveMessageWithCompletionHandler_( - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError - completionHandler) { - _objc_msgSend_1083(this.pointer, _sel_receiveMessageWithCompletionHandler_, - completionHandler.pointer); + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLNode, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void sendPingWithPongReceiveHandler_( - ObjCBlock_ffiVoid_NSError pongReceiveHandler) { - _objc_msgSend_1084(this.pointer, _sel_sendPingWithPongReceiveHandler_, - pongReceiveHandler.pointer); + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLNode, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { - _objc_msgSend_1085(this.pointer, _sel_cancelWithCloseCode_reason_, - closeCode, reason?.pointer ?? ffi.nullptr); + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = + _objc_msgSend_35(_class_NSXMLNode, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get maximumMessageSize { - return _objc_msgSend_83(this.pointer, _sel_maximumMessageSize); + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661( + _class_NSXMLNode, _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set maximumMessageSize(int value) { - return _objc_msgSend_635(this.pointer, _sel_setMaximumMessageSize_, value); + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLNode, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get closeCode { - return _objc_msgSend_1086(this.pointer, _sel_closeCode); + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLNode, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLNode, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLNode, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLNode, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLNode, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLNode, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLNode, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSData? get closeReason { - final _ret = _objc_msgSend_286(this.pointer, _sel_closeReason); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLNode, _sel_DTDNodeWithXMLString_, string.pointer); return _ret.address == 0 ? null - : NSData._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - @override - NSURLSessionWebSocketTask init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionWebSocketTask._(_ret, retain: true, release: true); + int get kind { + return _objc_msgSend_663(this.pointer, _sel_kind); } - static NSURLSessionWebSocketTask new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionWebSocketTask, _sel_new); - return NSURLSessionWebSocketTask._(_ret, retain: false, release: true); + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionWebSocketTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSURLSessionWebSocketTask, _sel_allocWithZone_, zone); - return NSURLSessionWebSocketTask._(_ret, retain: false, release: true); + set name(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); } - static NSURLSessionWebSocketTask alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSessionWebSocketTask, _sel_alloc); - return NSURLSessionWebSocketTask._(_ret, retain: false, release: true); + objc.NSObject? get objectValue { + final _ret = _objc_msgSend_66(this.pointer, _sel_objectValue); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionWebSocketTask, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + set objectValue(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setObjectValue_, value?.pointer ?? ffi.nullptr); + } + + objc.NSString? get stringValue { + final _ret = _objc_msgSend_13(this.pointer, _sel_stringValue); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set stringValue(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setStringValue_, value?.pointer ?? ffi.nullptr); + } + + void setStringValue_resolvingEntities_(objc.NSString string, bool resolve) { + _objc_msgSend_664(this.pointer, _sel_setStringValue_resolvingEntities_, + string.pointer, resolve); + } + + int get index { + return _objc_msgSend_29(this.pointer, _sel_index); + } + + int get level { + return _objc_msgSend_29(this.pointer, _sel_level); + } + + NSXMLDocument? get rootDocument { + final _ret = _objc_msgSend_688(this.pointer, _sel_rootDocument); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + } + + NSXMLNode? get parent { + final _ret = _objc_msgSend_689(this.pointer, _sel_parent); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } + + int get childCount { + return _objc_msgSend_29(this.pointer, _sel_childCount); + } + + objc.NSArray? get children { + final _ret = _objc_msgSend_69(this.pointer, _sel_children); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSXMLNode? childAtIndex_(int index) { + final _ret = _objc_msgSend_690(this.pointer, _sel_childAtIndex_, index); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionWebSocketTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + NSXMLNode? get previousSibling { + final _ret = _objc_msgSend_689(this.pointer, _sel_previousSibling); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSessionWebSocketTask, _sel_accessInstanceVariablesDirectly); + NSXMLNode? get nextSibling { + final _ret = _objc_msgSend_689(this.pointer, _sel_nextSibling); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLSessionWebSocketTask, _sel_useStoredAccessor); + NSXMLNode? get previousNode { + final _ret = _objc_msgSend_689(this.pointer, _sel_previousNode); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionWebSocketTask, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + NSXMLNode? get nextNode { + final _ret = _objc_msgSend_689(this.pointer, _sel_nextNode); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionWebSocketTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + void detach() { + _objc_msgSend_82(this.pointer, _sel_detach); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionWebSocketTask, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + objc.NSString? get XPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_XPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSessionWebSocketTask, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + objc.NSString? get localName { + final _ret = _objc_msgSend_13(this.pointer, _sel_localName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLSessionWebSocketTask, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + objc.NSString? get prefix { + final _ret = _objc_msgSend_13(this.pointer, _sel_prefix); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } -} -late final _class_NSURLSessionWebSocketTask = - objc.getClass("NSURLSessionWebSocketTask"); + objc.NSString? get URI { + final _ret = _objc_msgSend_13(this.pointer, _sel_URI); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -class NSURLSessionWebSocketMessage extends NSObject { - NSURLSessionWebSocketMessage._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + set URI(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setURI_, value?.pointer ?? ffi.nullptr); + } - /// Returns a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. - static NSURLSessionWebSocketMessage castFrom( - T other) { - return NSURLSessionWebSocketMessage._(other.pointer, - retain: true, release: true); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLNode, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. - static NSURLSessionWebSocketMessage castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLSessionWebSocketMessage._(other, - retain: retain, release: release); + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = + _objc_msgSend_14(_class_NSXMLNode, _sel_prefixForName_, name.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketMessage); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLNode, _sel_predefinedNamespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionWebSocketMessage initWithData_(NSData data) { - final _ret = - _objc_msgSend_279(this.pointer, _sel_initWithData_, data.pointer); - return NSURLSessionWebSocketMessage._(_ret, retain: true, release: true); + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionWebSocketMessage initWithString_(NSString string) { + objc.NSString get XMLString { + final _ret = _objc_msgSend_12(this.pointer, _sel_XMLString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString XMLStringWithOptions_(int options) { final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithString_, string.pointer); - return NSURLSessionWebSocketMessage._(_ret, retain: true, release: true); + _objc_msgSend_691(this.pointer, _sel_XMLStringWithOptions_, options); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get type { - return _objc_msgSend_1081(this.pointer, _sel_type); + objc.NSString canonicalXMLStringPreservingComments_(bool comments) { + final _ret = _objc_msgSend_692( + this.pointer, _sel_canonicalXMLStringPreservingComments_, comments); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSData? get data { - final _ret = _objc_msgSend_286(this.pointer, _sel_data); + objc.NSArray? nodesForXPath_error_( + objc.NSString xpath, ffi.Pointer> error) { + final _ret = _objc_msgSend_281( + this.pointer, _sel_nodesForXPath_error_, xpath.pointer, error); return _ret.address == 0 ? null - : NSData._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? get string { - final _ret = _objc_msgSend_44(this.pointer, _sel_string); + objc.NSArray? objectsForXQuery_constants_error_( + objc.NSString xquery, + objc.NSDictionary? constants, + ffi.Pointer> error) { + final _ret = _objc_msgSend_693( + this.pointer, + _sel_objectsForXQuery_constants_error_, + xquery.pointer, + constants?.pointer ?? ffi.nullptr, + error); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - @override - NSURLSessionWebSocketMessage init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionWebSocketMessage._(_ret, retain: true, release: true); + objc.NSArray? objectsForXQuery_error_( + objc.NSString xquery, ffi.Pointer> error) { + final _ret = _objc_msgSend_281( + this.pointer, _sel_objectsForXQuery_error_, xquery.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionWebSocketMessage new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionWebSocketMessage, _sel_new); - return NSURLSessionWebSocketMessage._(_ret, retain: false, release: true); + static NSXMLNode new1() { + final _ret = _objc_msgSend_40(_class_NSXMLNode, _sel_new); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); } - static NSURLSessionWebSocketMessage allocWithZone_( - ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSURLSessionWebSocketMessage, _sel_allocWithZone_, zone); - return NSURLSessionWebSocketMessage._(_ret, retain: false, release: true); + static NSXMLNode allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSXMLNode, _sel_allocWithZone_, zone); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); } - static NSURLSessionWebSocketMessage alloc() { - final _ret = - _objc_msgSend_2(_class_NSURLSessionWebSocketMessage, _sel_alloc); - return NSURLSessionWebSocketMessage._(_ret, retain: false, release: true); + static NSXMLNode alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLNode, _sel_alloc); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionWebSocketMessage, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLNode, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionWebSocketMessage, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLNode, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12(_class_NSURLSessionWebSocketMessage, - _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSXMLNode, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLSessionWebSocketMessage, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSXMLNode, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionWebSocketMessage, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLNode, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionWebSocketMessage, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLNode, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionWebSocketMessage, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLNode, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85(_class_NSURLSessionWebSocketMessage, - _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLSessionWebSocketMessage, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSXMLNode, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } -} - -late final _class_NSURLSessionWebSocketMessage = - objc.getClass("NSURLSessionWebSocketMessage"); - -abstract class NSURLSessionWebSocketMessageType { - static const int NSURLSessionWebSocketMessageTypeData = 0; - static const int NSURLSessionWebSocketMessageTypeString = 1; -} - -final _objc_msgSend_1081 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_sendMessage_completionHandler_ = - objc.registerName("sendMessage:completionHandler:"); -final _objc_msgSend_1082 = 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 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); -final _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( - void Function( - ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[id] = - fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -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); - /// 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.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLNode, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_NSURLSessionWebSocketMessage_NSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _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; - - /// 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?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(arg0.address == 0 ? null : NSURLSessionWebSocketMessage._(arg0, retain: true, release: true), arg1.address == 0 ? null : NSError._(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_NSURLSessionWebSocketMessage_NSError.listener( - void Function(NSURLSessionWebSocketMessage?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSURLSessionWebSocketMessage._(arg0, - retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSURLSessionWebSocketMessage? arg0, 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_receiveMessageWithCompletionHandler_ = - objc.registerName("receiveMessageWithCompletionHandler:"); -final _objc_msgSend_1083 = 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_1084 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSURLSessionWebSocketCloseCode { - static const int NSURLSessionWebSocketCloseCodeInvalid = 0; - static const int NSURLSessionWebSocketCloseCodeNormalClosure = 1000; - static const int NSURLSessionWebSocketCloseCodeGoingAway = 1001; - static const int NSURLSessionWebSocketCloseCodeProtocolError = 1002; - static const int NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; - static const int NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; - static const int NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; - static const int NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; - static const int NSURLSessionWebSocketCloseCodePolicyViolation = 1008; - static const int NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; - static const int NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = - 1010; - static const int NSURLSessionWebSocketCloseCodeInternalServerError = 1011; - static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; -} - -late final _sel_cancelWithCloseCode_reason_ = - objc.registerName("cancelWithCloseCode:reason:"); -final _objc_msgSend_1085 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_closeCode = objc.registerName("closeCode"); -final _objc_msgSend_1086 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_closeReason = objc.registerName("closeReason"); -late final _sel_webSocketTaskWithURL_ = - objc.registerName("webSocketTaskWithURL:"); -final _objc_msgSend_1087 = 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_1088 = 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_1089 = 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 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); -final _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -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); - - /// 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); - } - - /// 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.newBlock( - _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; - - /// 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(NSData?, NSURLResponse?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 ? null : NSData._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSURLResponse._(arg1, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; +late final _class_NSXMLNode = objc.getClass("NSXMLNode"); - /// 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_NSData_NSURLResponse_NSError.listener( - void Function(NSData?, NSURLResponse?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSData._(arg0, retain: true, release: true), - arg1.address == 0 - ? null - : NSURLResponse._(arg1, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; +abstract class NSXMLNodeKind { + static const int NSXMLInvalidKind = 0; + static const int NSXMLDocumentKind = 1; + static const int NSXMLElementKind = 2; + static const int NSXMLAttributeKind = 3; + static const int NSXMLNamespaceKind = 4; + static const int NSXMLProcessingInstructionKind = 5; + static const int NSXMLCommentKind = 6; + static const int NSXMLTextKind = 7; + static const int NSXMLDTDKind = 8; + static const int NSXMLEntityDeclarationKind = 9; + static const int NSXMLAttributeDeclarationKind = 10; + static const int NSXMLElementDeclarationKind = 11; + static const int NSXMLNotationDeclarationKind = 12; +} - void call(NSData? arg0, NSURLResponse? arg1, NSError? arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, - arg0?.pointer ?? ffi.nullptr, - arg1?.pointer ?? ffi.nullptr, - arg2?.pointer ?? ffi.nullptr); +late final _sel_initWithKind_ = objc.registerName("initWithKind:"); +final _objc_msgSend_658 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSXMLNodeOptions { + static const int NSXMLNodeOptionsNone = 0; + static const int NSXMLNodeIsCDATA = 1; + static const int NSXMLNodeExpandEmptyElement = 2; + static const int NSXMLNodeCompactEmptyElement = 4; + static const int NSXMLNodeUseSingleQuotes = 8; + static const int NSXMLNodeUseDoubleQuotes = 16; + static const int NSXMLNodeNeverEscapeContents = 32; + static const int NSXMLDocumentTidyHTML = 512; + static const int NSXMLDocumentTidyXML = 1024; + static const int NSXMLDocumentValidate = 8192; + static const int NSXMLNodeLoadExternalEntitiesAlways = 16384; + static const int NSXMLNodeLoadExternalEntitiesSameOriginOnly = 32768; + static const int NSXMLNodeLoadExternalEntitiesNever = 524288; + static const int NSXMLDocumentXInclude = 65536; + static const int NSXMLNodePrettyPrint = 131072; + static const int NSXMLDocumentIncludeContentTypeDeclaration = 262144; + static const int NSXMLNodePreserveNamespaceOrder = 1048576; + static const int NSXMLNodePreserveAttributeOrder = 2097152; + static const int NSXMLNodePreserveEntities = 4194304; + static const int NSXMLNodePreservePrefixes = 8388608; + static const int NSXMLNodePreserveCDATA = 16777216; + static const int NSXMLNodePreserveWhitespace = 33554432; + static const int NSXMLNodePreserveDTD = 67108864; + static const int NSXMLNodePreserveCharacterReferences = 134217728; + static const int NSXMLNodePromoteSignificantWhitespace = 268435456; + static const int NSXMLNodePreserveEmptyElements = 6; + static const int NSXMLNodePreserveQuotes = 24; + static const int NSXMLNodePreserveAll = 4293918750; } -late final _sel_dataTaskWithRequest_completionHandler_ = - objc.registerName("dataTaskWithRequest:completionHandler:"); -final _objc_msgSend_1090 = objc.msgSendPointer +late final _sel_initWithKind_options_ = + objc.registerName("initWithKind:options:"); +final _objc_msgSend_659 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Int32)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_dataTaskWithURL_completionHandler_ = - objc.registerName("dataTaskWithURL:completionHandler:"); -final _objc_msgSend_1091 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_document = objc.registerName("document"); +late final _sel_documentWithRootElement_ = + objc.registerName("documentWithRootElement:"); +final _objc_msgSend_660 = 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)>(); -late final _sel_uploadTaskWithRequest_fromFile_completionHandler_ = - objc.registerName("uploadTaskWithRequest:fromFile:completionHandler:"); -final _objc_msgSend_1092 = objc.msgSendPointer + 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_661 = 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_uploadTaskWithRequest_fromData_completionHandler_ = - objc.registerName("uploadTaskWithRequest:fromData:completionHandler:"); -final _objc_msgSend_1093 = objc.msgSendPointer + 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_662 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -55641,669 +32730,1327 @@ final _objc_msgSend_1093 = 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)>(); -late final _sel_uploadTaskWithResumeData_completionHandler_ = - objc.registerName("uploadTaskWithResumeData:completionHandler:"); -final _objc_msgSend_1094 = objc.msgSendPointer + 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:"); +late final _sel_kind = objc.registerName("kind"); +final _objc_msgSend_663 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Int32 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_664 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -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); -final _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + bool)>(); +late final _sel_index = objc.registerName("index"); +late final _sel_level = objc.registerName("level"); -void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); +class NSXMLDocument extends NSXMLNode { + NSXMLDocument._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -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); + /// Constructs a [NSXMLDocument] that points to the same underlying object as [other]. + NSXMLDocument.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// 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); + /// 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); + + /// Returns whether [obj] is an instance of [NSXMLDocument]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSXMLDocument); } - /// 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.newBlock( - _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; + @override + NSXMLDocument init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLDocument.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. - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunction( - void Function(NSURL?, NSURLResponse?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 ? null : NSURL._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSURLResponse._(arg1, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; + NSXMLDocument? initWithXMLString_options_error_(objc.NSString string, + int mask, ffi.Pointer> error) { + final _ret = _objc_msgSend_665(this.pointer, + _sel_initWithXMLString_options_error_, string.pointer, mask, error); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + } + + NSXMLDocument? initWithContentsOfURL_options_error_(objc.NSURL url, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_666(this.pointer, + _sel_initWithContentsOfURL_options_error_, url.pointer, mask, error); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + } + + NSXMLDocument? initWithData_options_error_(objc.NSData data, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_667(this.pointer, + _sel_initWithData_options_error_, data.pointer, mask, error); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + } + + NSXMLDocument initWithRootElement_(NSXMLElement? element) { + final _ret = _objc_msgSend_668(this.pointer, _sel_initWithRootElement_, + element?.pointer ?? ffi.nullptr); + return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject replacementClassForClass_(objc.NSObject cls) { + final _ret = _objc_msgSend_387( + _class_NSXMLDocument, _sel_replacementClassForClass_, cls.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString? get characterEncoding { + final _ret = _objc_msgSend_13(this.pointer, _sel_characterEncoding); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set characterEncoding(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setCharacterEncoding_, + value?.pointer ?? ffi.nullptr); + } + + objc.NSString? get version { + final _ret = _objc_msgSend_13(this.pointer, _sel_version); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set version(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setVersion_, value?.pointer ?? ffi.nullptr); + } + + bool get standalone { + return _objc_msgSend_7(this.pointer, _sel_isStandalone); + } + + set standalone(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setStandalone_, value); + } + + int get documentContentKind { + return _objc_msgSend_669(this.pointer, _sel_documentContentKind); + } + + set documentContentKind(int value) { + return _objc_msgSend_670(this.pointer, _sel_setDocumentContentKind_, value); + } + + objc.NSString? get MIMEType { + final _ret = _objc_msgSend_13(this.pointer, _sel_MIMEType); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set MIMEType(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setMIMEType_, value?.pointer ?? ffi.nullptr); + } + + NSXMLDTD? get DTD { + final _ret = _objc_msgSend_680(this.pointer, _sel_DTD); + return _ret.address == 0 + ? null + : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); + } + + set DTD(NSXMLDTD? value) { + return _objc_msgSend_681( + this.pointer, _sel_setDTD_, value?.pointer ?? ffi.nullptr); + } + + void setRootElement_(NSXMLElement root) { + _objc_msgSend_682(this.pointer, _sel_setRootElement_, root.pointer); + } + + NSXMLElement? rootElement() { + final _ret = _objc_msgSend_683(this.pointer, _sel_rootElement); + return _ret.address == 0 + ? null + : NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } + + void insertChild_atIndex_(NSXMLNode child, int index) { + _objc_msgSend_671( + this.pointer, _sel_insertChild_atIndex_, child.pointer, index); + } + + void insertChildren_atIndex_(objc.NSArray children, int index) { + _objc_msgSend_672( + this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); + } + + void removeChildAtIndex_(int index) { + _objc_msgSend_414(this.pointer, _sel_removeChildAtIndex_, index); + } + + void setChildren_(objc.NSArray? children) { + _objc_msgSend_260( + this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); + } + + void addChild_(NSXMLNode child) { + _objc_msgSend_673(this.pointer, _sel_addChild_, child.pointer); + } + + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _objc_msgSend_674( + this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); + } + + objc.NSData get XMLData { + final _ret = _objc_msgSend_104(this.pointer, _sel_XMLData); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSData XMLDataWithOptions_(int options) { + final _ret = + _objc_msgSend_684(this.pointer, _sel_XMLDataWithOptions_, options); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? objectByApplyingXSLT_arguments_error_( + objc.NSData xslt, + objc.NSDictionary? arguments, + ffi.Pointer> error) { + final _ret = _objc_msgSend_685( + this.pointer, + _sel_objectByApplyingXSLT_arguments_error_, + xslt.pointer, + arguments?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? objectByApplyingXSLTString_arguments_error_( + objc.NSString xslt, + objc.NSDictionary? arguments, + ffi.Pointer> error) { + final _ret = _objc_msgSend_686( + this.pointer, + _sel_objectByApplyingXSLTString_arguments_error_, + xslt.pointer, + arguments?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? objectByApplyingXSLTAtURL_arguments_error_( + objc.NSURL xsltURL, + objc.NSDictionary? argument, + ffi.Pointer> error) { + final _ret = _objc_msgSend_687( + this.pointer, + _sel_objectByApplyingXSLTAtURL_arguments_error_, + xsltURL.pointer, + argument?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool validateAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_validateAndReturnError_, error); + } + + @override + NSXMLDocument initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSXMLDocument initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLDocument, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLDocument, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = _objc_msgSend_35( + _class_NSXMLDocument, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLDocument, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLDocument, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLDocument, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35(_class_NSXMLDocument, + _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDocument, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLDocument, _sel_DTDNodeWithXMLString_, string.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLDocument, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_14( + _class_NSXMLDocument, _sel_prefixForName_, name.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLDocument, _sel_predefinedNamespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } + + static NSXMLDocument new1() { + final _ret = _objc_msgSend_40(_class_NSXMLDocument, _sel_new); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); + } + + static NSXMLDocument allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSXMLDocument, _sel_allocWithZone_, zone); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); + } + + static NSXMLDocument alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLDocument, _sel_alloc); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLDocument, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLDocument, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLDocument, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLDocument, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLDocument, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLDocument, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLDocument, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.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_NSURL_NSURLResponse_NSError.listener( - void Function(NSURL?, NSURLResponse?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSURL._(arg0, retain: true, release: true), - arg1.address == 0 - ? null - : NSURLResponse._(arg1, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLDocument, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } - void call(NSURL? arg0, NSURLResponse? arg1, NSError? arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, - arg0?.pointer ?? ffi.nullptr, - arg1?.pointer ?? ffi.nullptr, - arg2?.pointer ?? ffi.nullptr); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLDocument, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } } -late final _sel_downloadTaskWithRequest_completionHandler_ = - objc.registerName("downloadTaskWithRequest:completionHandler:"); -final _objc_msgSend_1095 = objc.msgSendPointer +late final _class_NSXMLDocument = objc.getClass("NSXMLDocument"); +late final _sel_initWithXMLString_options_error_ = + objc.registerName("initWithXMLString:options:error:"); +final _objc_msgSend_665 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32, + ffi.Pointer>)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_downloadTaskWithURL_completionHandler_ = - objc.registerName("downloadTaskWithURL:completionHandler:"); -final _objc_msgSend_1096 = objc.msgSendPointer + int, + ffi.Pointer>)>(); +late final _sel_initWithContentsOfURL_options_error_ = + objc.registerName("initWithContentsOfURL:options:error:"); +final _objc_msgSend_666 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32, + ffi.Pointer>)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_downloadTaskWithResumeData_completionHandler_ = - objc.registerName("downloadTaskWithResumeData:completionHandler:"); -final _objc_msgSend_1097 = objc.msgSendPointer + int, + ffi.Pointer>)>(); +late final _sel_initWithData_options_error_ = + objc.registerName("initWithData:options:error:"); +final _objc_msgSend_667 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32, + ffi.Pointer>)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + int, + ffi.Pointer>)>(); +late final _sel_initWithRootElement_ = + objc.registerName("initWithRootElement:"); +final _objc_msgSend_668 = 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:"); +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:"); -class NSProtocolChecker extends NSProxy { - NSProtocolChecker._(ffi.Pointer pointer, +abstract class NSXMLDocumentContentKind { + static const int NSXMLDocumentXMLKind = 0; + static const int NSXMLDocumentXHTMLKind = 1; + static const int NSXMLDocumentHTMLKind = 2; + static const int NSXMLDocumentTextKind = 3; +} + +late final _sel_documentContentKind = objc.registerName("documentContentKind"); +final _objc_msgSend_669 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDocumentContentKind_ = + objc.registerName("setDocumentContentKind:"); +final _objc_msgSend_670 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setMIMEType_ = objc.registerName("setMIMEType:"); + +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}) - : super._(pointer, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [NSProtocolChecker] that points to the same underlying object as [other]. - static NSProtocolChecker castFrom(T other) { - return NSProtocolChecker._(other.pointer, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSXMLDTD]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSXMLDTD); } - /// Returns a [NSProtocolChecker] that wraps the given raw object pointer. - static NSProtocolChecker castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProtocolChecker._(other, retain: retain, release: release); + @override + NSXMLDTD init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSProtocolChecker]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSProtocolChecker); + @override + NSXMLDTD initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - Protocol get protocol { - final _ret = _objc_msgSend_1098(this.pointer, _sel_protocol); - return Protocol._(_ret, retain: true, release: true); + NSXMLDTD? initWithContentsOfURL_options_error_(objc.NSURL url, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_666(this.pointer, + _sel_initWithContentsOfURL_options_error_, url.pointer, mask, error); + return _ret.address == 0 + ? null + : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - NSObject? get target { - final _ret = _objc_msgSend_914(this.pointer, _sel_target); + NSXMLDTD? initWithData_options_error_(objc.NSData data, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_667(this.pointer, + _sel_initWithData_options_error_, data.pointer, mask, error); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - static NSProtocolChecker protocolCheckerWithTarget_protocol_( - NSObject anObject, Protocol aProtocol) { - final _ret = _objc_msgSend_1099( - _class_NSProtocolChecker, - _sel_protocolCheckerWithTarget_protocol_, - anObject.pointer, - aProtocol.pointer); - return NSProtocolChecker._(_ret, retain: true, release: true); + objc.NSString? get publicID { + final _ret = _objc_msgSend_13(this.pointer, _sel_publicID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSProtocolChecker initWithTarget_protocol_( - NSObject anObject, Protocol aProtocol) { - final _ret = _objc_msgSend_1099(this.pointer, _sel_initWithTarget_protocol_, - anObject.pointer, aProtocol.pointer); - return NSProtocolChecker._(_ret, retain: true, release: true); + set publicID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setPublicID_, value?.pointer ?? ffi.nullptr); } - static NSObject alloc() { - final _ret = _objc_msgSend_2(_class_NSProtocolChecker, _sel_alloc); - return NSObject._(_ret, retain: false, release: true); + objc.NSString? get systemID { + final _ret = _objc_msgSend_13(this.pointer, _sel_systemID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool respondsToSelector_(ffi.Pointer aSelector) { - return _objc_msgSend_4( - _class_NSProtocolChecker, _sel_respondsToSelector_, aSelector); + set systemID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setSystemID_, value?.pointer ?? ffi.nullptr); } -} -late final _class_NSProtocolChecker = objc.getClass("NSProtocolChecker"); -final _objc_msgSend_1098 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_protocolCheckerWithTarget_protocol_ = - objc.registerName("protocolCheckerWithTarget:protocol:"); -final _objc_msgSend_1099 = 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:"); + void insertChild_atIndex_(NSXMLNode child, int index) { + _objc_msgSend_671( + this.pointer, _sel_insertChild_atIndex_, child.pointer, index); + } -class NSTask extends NSObject { - NSTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + void insertChildren_atIndex_(objc.NSArray children, int index) { + _objc_msgSend_672( + this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); + } - /// Returns a [NSTask] that points to the same underlying object as [other]. - static NSTask castFrom(T other) { - return NSTask._(other.pointer, retain: true, release: true); + void removeChildAtIndex_(int index) { + _objc_msgSend_414(this.pointer, _sel_removeChildAtIndex_, index); } - /// Returns a [NSTask] that wraps the given raw object pointer. - static NSTask castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSTask._(other, retain: retain, release: release); + void setChildren_(objc.NSArray? children) { + _objc_msgSend_260( + this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); } - /// Returns whether [obj] is an instance of [NSTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTask); + void addChild_(NSXMLNode child) { + _objc_msgSend_673(this.pointer, _sel_addChild_, child.pointer); } - @override - NSTask init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSTask._(_ret, retain: true, release: true); + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _objc_msgSend_674( + this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); } - NSURL? get executableURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_executableURL); + NSXMLDTDNode? entityDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678( + this.pointer, _sel_entityDeclarationForName_, name.pointer); return _ret.address == 0 ? null - : NSURL._(_ret, retain: true, release: true); + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - set executableURL(NSURL? value) { - return _objc_msgSend_671( - this.pointer, _sel_setExecutableURL_, value?.pointer ?? ffi.nullptr); + NSXMLDTDNode? notationDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678( + this.pointer, _sel_notationDeclarationForName_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - NSArray? get arguments { - final _ret = _objc_msgSend_84(this.pointer, _sel_arguments); + NSXMLDTDNode? elementDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678( + this.pointer, _sel_elementDeclarationForName_, name.pointer); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - set arguments(NSArray? value) { - return _objc_msgSend_1053( - this.pointer, _sel_setArguments_, value?.pointer ?? ffi.nullptr); + NSXMLDTDNode? attributeDeclarationForName_elementName_( + objc.NSString name, objc.NSString elementName) { + final _ret = _objc_msgSend_679( + this.pointer, + _sel_attributeDeclarationForName_elementName_, + name.pointer, + elementName.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get environment { - final _ret = _objc_msgSend_390(this.pointer, _sel_environment); + static NSXMLDTDNode? predefinedEntityDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678(_class_NSXMLDTD, + _sel_predefinedEntityDeclarationForName_, name.pointer); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - set environment(NSDictionary? value) { - return _objc_msgSend_634( - this.pointer, _sel_setEnvironment_, value?.pointer ?? ffi.nullptr); + @override + NSXMLDTD initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - NSURL? get currentDirectoryURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_currentDirectoryURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLDTD, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set currentDirectoryURL(NSURL? value) { - return _objc_msgSend_671(this.pointer, _sel_setCurrentDirectoryURL_, - value?.pointer ?? ffi.nullptr); + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLDTD, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSData? get launchRequirementData { - final _ret = _objc_msgSend_286(this.pointer, _sel_launchRequirementData); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = + _objc_msgSend_35(_class_NSXMLDTD, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set launchRequirementData(NSData? value) { - return _objc_msgSend_1021(this.pointer, _sel_setLaunchRequirementData_, - value?.pointer ?? ffi.nullptr); + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661( + _class_NSXMLDTD, _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSObject? get standardInput { - final _ret = _objc_msgSend_17(this.pointer, _sel_standardInput); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLDTD, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set standardInput(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setStandardInput_, value?.pointer ?? ffi.nullptr); + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLDTD, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTD, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLDTD, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTD, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLDTD, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTD, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTD, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSObject? get standardOutput { - final _ret = _objc_msgSend_17(this.pointer, _sel_standardOutput); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLDTD, _sel_DTDNodeWithXMLString_, string.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set standardOutput(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setStandardOutput_, value?.pointer ?? ffi.nullptr); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLDTD, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject? get standardError { - final _ret = _objc_msgSend_17(this.pointer, _sel_standardError); + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = + _objc_msgSend_14(_class_NSXMLDTD, _sel_prefixForName_, name.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set standardError(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setStandardError_, value?.pointer ?? ffi.nullptr); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLDTD, _sel_predefinedNamespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - bool launchAndReturnError_(ffi.Pointer> error) { - return _objc_msgSend_255(this.pointer, _sel_launchAndReturnError_, error); + static NSXMLDTD new1() { + final _ret = _objc_msgSend_40(_class_NSXMLDTD, _sel_new); + return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } - void interrupt() { - _objc_msgSend_1(this.pointer, _sel_interrupt); + static NSXMLDTD allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSXMLDTD, _sel_allocWithZone_, zone); + return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } - void terminate() { - _objc_msgSend_1(this.pointer, _sel_terminate); + static NSXMLDTD alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLDTD, _sel_alloc); + return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } - bool suspend() { - return _objc_msgSend_12(this.pointer, _sel_suspend); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLDTD, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - bool resume() { - return _objc_msgSend_12(this.pointer, _sel_resume); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLDTD, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - int get processIdentifier { - return _objc_msgSend_237(this.pointer, _sel_processIdentifier); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLDTD, _sel_accessInstanceVariablesDirectly); } - bool get running { - return _objc_msgSend_12(this.pointer, _sel_isRunning); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLDTD, _sel_useStoredAccessor); } - int get terminationStatus { - return _objc_msgSend_237(this.pointer, _sel_terminationStatus); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLDTD, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - int get terminationReason { - return _objc_msgSend_1100(this.pointer, _sel_terminationReason); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLDTD, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - ObjCBlock_ffiVoid_NSTask? get terminationHandler { - final _ret = _objc_msgSend_1101(this.pointer, _sel_terminationHandler); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLDTD, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSXMLDTD, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLDTD, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_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_671 = 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_672 = 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_673 = 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_674 = 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)>(); + +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); + } + + NSXMLDTDNode? initWithXMLString_(objc.NSString string) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithXMLString_, string.pointer); return _ret.address == 0 ? null - : ObjCBlock_ffiVoid_NSTask._(_ret, retain: true, release: true); + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - set terminationHandler(ObjCBlock_ffiVoid_NSTask? value) { - return _objc_msgSend_1102(this.pointer, _sel_setTerminationHandler_, - value?.pointer ?? ffi.nullptr); + @override + NSXMLDTDNode initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - int get qualityOfService { - return _objc_msgSend_543(this.pointer, _sel_qualityOfService); + @override + NSXMLDTDNode init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - set qualityOfService(int value) { - return _objc_msgSend_544(this.pointer, _sel_setQualityOfService_, value); + int get DTDKind { + return _objc_msgSend_675(this.pointer, _sel_DTDKind); } - static NSTask? - launchedTaskWithExecutableURL_arguments_error_terminationHandler_( - NSURL url, - NSArray arguments, - ffi.Pointer> error, - ObjCBlock_ffiVoid_NSTask? terminationHandler) { - final _ret = _objc_msgSend_1103( - _class_NSTask, - _sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_, - url.pointer, - arguments.pointer, - error, - terminationHandler?.pointer ?? ffi.nullptr); + set DTDKind(int value) { + return _objc_msgSend_676(this.pointer, _sel_setDTDKind_, value); + } + + bool get external1 { + return _objc_msgSend_7(this.pointer, _sel_isExternal); + } + + objc.NSString? get publicID { + final _ret = _objc_msgSend_13(this.pointer, _sel_publicID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set publicID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setPublicID_, value?.pointer ?? ffi.nullptr); + } + + objc.NSString? get systemID { + final _ret = _objc_msgSend_13(this.pointer, _sel_systemID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set systemID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setSystemID_, value?.pointer ?? ffi.nullptr); + } + + objc.NSString? get notationName { + final _ret = _objc_msgSend_13(this.pointer, _sel_notationName); return _ret.address == 0 ? null - : NSTask._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set notationName(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setNotationName_, value?.pointer ?? ffi.nullptr); + } + + @override + NSXMLDTDNode initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLDTDNode, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLDTDNode, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTDNode, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, + _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLDTDNode, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLDTDNode, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void waitUntilExit() { - _objc_msgSend_1(this.pointer, _sel_waitUntilExit); + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSString? get launchPath { - final _ret = _objc_msgSend_44(this.pointer, _sel_launchPath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLDTDNode, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set launchPath(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setLaunchPath_, value?.pointer ?? ffi.nullptr); + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTDNode, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSString get currentDirectoryPath { - final _ret = _objc_msgSend_21(this.pointer, _sel_currentDirectoryPath); - return NSString._(_ret, retain: true, release: true); + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTDNode, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set currentDirectoryPath(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setCurrentDirectoryPath_, value.pointer); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLDTDNode, _sel_DTDNodeWithXMLString_, string.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void launch() { - _objc_msgSend_1(this.pointer, _sel_launch); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLDTDNode, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSTask launchedTaskWithLaunchPath_arguments_( - NSString path, NSArray arguments) { - final _ret = _objc_msgSend_1104( - _class_NSTask, - _sel_launchedTaskWithLaunchPath_arguments_, - path.pointer, - arguments.pointer); - return NSTask._(_ret, retain: true, release: true); + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_14( + _class_NSXMLDTDNode, _sel_prefixForName_, name.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSTask new1() { - final _ret = _objc_msgSend_2(_class_NSTask, _sel_new); - return NSTask._(_ret, retain: false, release: true); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLDTDNode, _sel_predefinedNamespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSTask, _sel_allocWithZone_, zone); - return NSTask._(_ret, retain: false, release: true); + static NSXMLDTDNode new1() { + final _ret = _objc_msgSend_40(_class_NSXMLDTDNode, _sel_new); + return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } - static NSTask alloc() { - final _ret = _objc_msgSend_2(_class_NSTask, _sel_alloc); - return NSTask._(_ret, retain: false, release: true); + static NSXMLDTDNode allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSXMLDTDNode, _sel_allocWithZone_, zone); + return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); + } + + static NSXMLDTDNode alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLDTDNode, _sel_alloc); + return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSTask, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLDTDNode, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSTask, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLDTDNode, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSTask, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSXMLDTDNode, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSTask, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSXMLDTDNode, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSTask, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLDTDNode, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64( - _class_NSTask, _sel_automaticallyNotifiesObserversForKey_, key.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLDTDNode, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSTask, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLDTDNode, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSTask, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLDTDNode, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSTask, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLDTDNode, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSTask = objc.getClass("NSTask"); -late final _sel_setExecutableURL_ = objc.registerName("setExecutableURL:"); -late final _sel_setEnvironment_ = objc.registerName("setEnvironment:"); -late final _sel_currentDirectoryURL = objc.registerName("currentDirectoryURL"); -late final _sel_setCurrentDirectoryURL_ = - objc.registerName("setCurrentDirectoryURL:"); -late final _sel_launchRequirementData = - objc.registerName("launchRequirementData"); -late final _sel_setLaunchRequirementData_ = - objc.registerName("setLaunchRequirementData:"); -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_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"); +late final _class_NSXMLDTDNode = objc.getClass("NSXMLDTDNode"); +late final _sel_initWithXMLString_ = objc.registerName("initWithXMLString:"); -abstract class NSTaskTerminationReason { - static const int NSTaskTerminationReasonExit = 1; - static const int NSTaskTerminationReasonUncaughtSignal = 2; +abstract class NSXMLDTDNodeKind { + static const int NSXMLEntityGeneralKind = 1; + static const int NSXMLEntityParsedKind = 2; + static const int NSXMLEntityUnparsedKind = 3; + static const int NSXMLEntityParameterKind = 4; + static const int NSXMLEntityPredefined = 5; + static const int NSXMLAttributeCDATAKind = 6; + static const int NSXMLAttributeIDKind = 7; + static const int NSXMLAttributeIDRefKind = 8; + static const int NSXMLAttributeIDRefsKind = 9; + static const int NSXMLAttributeEntityKind = 10; + static const int NSXMLAttributeEntitiesKind = 11; + static const int NSXMLAttributeNMTokenKind = 12; + static const int NSXMLAttributeNMTokensKind = 13; + static const int NSXMLAttributeEnumerationKind = 14; + static const int NSXMLAttributeNotationKind = 15; + static const int NSXMLElementDeclarationUndefinedKind = 16; + static const int NSXMLElementDeclarationEmptyKind = 17; + static const int NSXMLElementDeclarationAnyKind = 18; + static const int NSXMLElementDeclarationMixedKind = 19; + static const int NSXMLElementDeclarationElementKind = 20; } -late final _sel_terminationReason = objc.registerName("terminationReason"); -final _objc_msgSend_1100 = objc.msgSendPointer +late final _sel_DTDKind = objc.registerName("DTDKind"); +final _objc_msgSend_675 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -56311,162 +34058,325 @@ final _objc_msgSend_1100 = objc.msgSendPointer .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); -final _ObjCBlock_ffiVoid_NSTask_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSTask_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSTask_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSTask_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSTask_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSTask_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSTask_closureRegistry[block.ref.target.address]!(arg0); - -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); - - /// 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); - } - - /// 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.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTask_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_NSTask.fromFunction(void Function(NSTask) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTask_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSTask_registerClosure( - (ffi.Pointer arg0) => - fn(NSTask._(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_NSTask.listener(void Function(NSTask) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSTask_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSTask_registerClosure( - (ffi.Pointer arg0) => - fn(NSTask._(arg0, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSTask 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_terminationHandler = objc.registerName("terminationHandler"); -final _objc_msgSend_1101 = objc.msgSendPointer +late final _sel_setDTDKind_ = objc.registerName("setDTDKind:"); +final _objc_msgSend_676 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_677 = 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_678 = 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_679 = 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_680 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setTerminationHandler_ = - objc.registerName("setTerminationHandler:"); -final _objc_msgSend_1102 = objc.msgSendPointer +late final _sel_setDTD_ = objc.registerName("setDTD:"); +final _objc_msgSend_681 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + 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_1103 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setRootElement_ = objc.registerName("setRootElement:"); +final _objc_msgSend_682 = 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_683 = 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_684 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_objectByApplyingXSLT_arguments_error_ = + objc.registerName("objectByApplyingXSLT:arguments:error:"); +final _objc_msgSend_685 = 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_686 = 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_687 = 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_688 = 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_689 = 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_690 = 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_691 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_canonicalXMLStringPreservingComments_ = + objc.registerName("canonicalXMLStringPreservingComments:"); +final _objc_msgSend_692 = 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_693 = 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:"); +late final _sel_initWithName_URI_ = objc.registerName("initWithName:URI:"); +final _objc_msgSend_694 = 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_695 = 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_elementsForName_ = objc.registerName("elementsForName:"); +late final _sel_elementsForLocalName_URI_ = + objc.registerName("elementsForLocalName:URI:"); +final _objc_msgSend_696 = 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_addAttribute_ = objc.registerName("addAttribute:"); +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:"); +final _objc_msgSend_697 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, 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_launch = objc.registerName("launch"); -late final _sel_launchedTaskWithLaunchPath_arguments_ = - objc.registerName("launchedTaskWithLaunchPath:arguments:"); -final _objc_msgSend_1104 = objc.msgSendPointer + 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_698 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -56480,921 +34390,456 @@ final _objc_msgSend_1104 = objc.msgSendPointer ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); +late final _sel_addNamespace_ = objc.registerName("addNamespace:"); +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:"); -class NSXMLElement extends NSXMLNode { - NSXMLElement._(ffi.Pointer pointer, +class NSScriptClassDescription extends NSClassDescription { + NSScriptClassDescription._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSXMLElement] that points to the same underlying object as [other]. - static NSXMLElement castFrom(T other) { - return NSXMLElement._(other.pointer, 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); - /// Returns a [NSXMLElement] that wraps the given raw object pointer. - static NSXMLElement castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLElement._(other, retain: retain, release: release); - } + /// 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 [NSXMLElement]. + /// Returns whether [obj] is an instance of [NSScriptClassDescription]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSXMLElement); - } - - NSXMLElement initWithName_(NSString name) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithName_, name.pointer); - return NSXMLElement._(_ret, retain: true, release: true); - } - - NSXMLElement initWithName_URI_(NSString name, NSString? URI) { - final _ret = _objc_msgSend_1141(this.pointer, _sel_initWithName_URI_, - name.pointer, URI?.pointer ?? ffi.nullptr); - return NSXMLElement._(_ret, retain: true, release: true); - } - - NSXMLElement initWithName_stringValue_(NSString name, NSString? string) { - final _ret = _objc_msgSend_1141( - this.pointer, - _sel_initWithName_stringValue_, - name.pointer, - string?.pointer ?? ffi.nullptr); - return NSXMLElement._(_ret, retain: true, release: true); + obj.pointer, _sel_isKindOfClass_, _class_NSScriptClassDescription); } - NSXMLElement? initWithXMLString_error_( - NSString string, ffi.Pointer> error) { - final _ret = _objc_msgSend_303( - this.pointer, _sel_initWithXMLString_error_, string.pointer, error); + static NSScriptClassDescription? classDescriptionForClass_( + objc.NSObject aClass) { + final _ret = _objc_msgSend_701(_class_NSScriptClassDescription, + _sel_classDescriptionForClass_, aClass.pointer); return _ret.address == 0 ? null - : NSXMLElement._(_ret, retain: true, release: true); - } - - @override - NSXMLElement initWithKind_options_(int kind, int options) { - final _ret = _objc_msgSend_1106( - this.pointer, _sel_initWithKind_options_, kind, options); - return NSXMLElement._(_ret, retain: true, release: true); - } - - NSArray elementsForName_(NSString name) { - final _ret = - _objc_msgSend_358(this.pointer, _sel_elementsForName_, name.pointer); - return NSArray._(_ret, retain: true, release: true); + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - NSArray elementsForLocalName_URI_(NSString localName, NSString? URI) { - final _ret = _objc_msgSend_1142( + NSScriptClassDescription? initWithSuiteName_className_dictionary_( + objc.NSString suiteName, + objc.NSString className, + objc.NSDictionary? classDeclaration) { + final _ret = _objc_msgSend_702( this.pointer, - _sel_elementsForLocalName_URI_, - localName.pointer, - URI?.pointer ?? ffi.nullptr); - return NSArray._(_ret, retain: true, release: true); - } - - void addAttribute_(NSXMLNode attribute) { - _objc_msgSend_1120(this.pointer, _sel_addAttribute_, attribute.pointer); - } - - void removeAttributeForName_(NSString name) { - _objc_msgSend_247(this.pointer, _sel_removeAttributeForName_, name.pointer); - } - - NSArray? get attributes { - final _ret = _objc_msgSend_84(this.pointer, _sel_attributes); + _sel_initWithSuiteName_className_dictionary_, + suiteName.pointer, + className.pointer, + classDeclaration?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - set attributes(NSArray? value) { - return _objc_msgSend_1053( - this.pointer, _sel_setAttributes_, value?.pointer ?? ffi.nullptr); + objc.NSString? get suiteName { + final _ret = _objc_msgSend_13(this.pointer, _sel_suiteName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void setAttributesWithDictionary_(NSDictionary attributes) { - _objc_msgSend_509( - this.pointer, _sel_setAttributesWithDictionary_, attributes.pointer); + objc.NSString? get className { + final _ret = _objc_msgSend_13(this.pointer, _sel_className); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLNode? attributeForName_(NSString name) { - final _ret = - _objc_msgSend_1124(this.pointer, _sel_attributeForName_, name.pointer); + objc.NSString? get implementationClassName { + final _ret = _objc_msgSend_13(this.pointer, _sel_implementationClassName); return _ret.address == 0 ? null - : NSXMLNode._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLNode? attributeForLocalName_URI_(NSString localName, NSString? URI) { - final _ret = _objc_msgSend_1143( - this.pointer, - _sel_attributeForLocalName_URI_, - localName.pointer, - URI?.pointer ?? ffi.nullptr); + NSScriptClassDescription? get superclassDescription { + final _ret = _objc_msgSend_703(this.pointer, _sel_superclassDescription); return _ret.address == 0 ? null - : NSXMLNode._(_ret, retain: true, release: true); + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - void addNamespace_(NSXMLNode aNamespace) { - _objc_msgSend_1120(this.pointer, _sel_addNamespace_, aNamespace.pointer); + int get appleEventCode { + return _objc_msgSend_704(this.pointer, _sel_appleEventCode); } - void removeNamespaceForPrefix_(NSString name) { - _objc_msgSend_247( - this.pointer, _sel_removeNamespaceForPrefix_, name.pointer); + bool matchesAppleEventCode_(int appleEventCode) { + return _objc_msgSend_705( + this.pointer, _sel_matchesAppleEventCode_, appleEventCode); } - NSArray? get namespaces { - final _ret = _objc_msgSend_84(this.pointer, _sel_namespaces); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + bool supportsCommand_(NSScriptCommandDescription commandDescription) { + return _objc_msgSend_747( + this.pointer, _sel_supportsCommand_, commandDescription.pointer); } - set namespaces(NSArray? value) { - return _objc_msgSend_1053( - this.pointer, _sel_setNamespaces_, value?.pointer ?? ffi.nullptr); + ffi.Pointer selectorForCommand_( + NSScriptCommandDescription commandDescription) { + return _objc_msgSend_748( + this.pointer, _sel_selectorForCommand_, commandDescription.pointer); } - NSXMLNode? namespaceForPrefix_(NSString name) { - final _ret = _objc_msgSend_1124( - this.pointer, _sel_namespaceForPrefix_, name.pointer); + objc.NSString? typeForKey_(objc.NSString key) { + final _ret = _objc_msgSend_14(this.pointer, _sel_typeForKey_, key.pointer); return _ret.address == 0 ? null - : NSXMLNode._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLNode? resolveNamespaceForName_(NSString name) { - final _ret = _objc_msgSend_1124( - this.pointer, _sel_resolveNamespaceForName_, name.pointer); + NSScriptClassDescription? classDescriptionForKey_(objc.NSString key) { + final _ret = _objc_msgSend_749( + this.pointer, _sel_classDescriptionForKey_, key.pointer); return _ret.address == 0 ? null - : NSXMLNode._(_ret, retain: true, release: true); + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - NSString? resolvePrefixForNamespaceURI_(NSString namespaceURI) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_resolvePrefixForNamespaceURI_, namespaceURI.pointer); + int appleEventCodeForKey_(objc.NSString key) { + return _objc_msgSend_706( + this.pointer, _sel_appleEventCodeForKey_, key.pointer); + } + + objc.NSString? keyWithAppleEventCode_(int appleEventCode) { + final _ret = _objc_msgSend_750( + this.pointer, _sel_keyWithAppleEventCode_, appleEventCode); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void insertChild_atIndex_(NSXMLNode child, int index) { - _objc_msgSend_1118( - this.pointer, _sel_insertChild_atIndex_, child.pointer, index); + objc.NSString? get defaultSubcontainerAttributeKey { + final _ret = + _objc_msgSend_13(this.pointer, _sel_defaultSubcontainerAttributeKey); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void insertChildren_atIndex_(NSArray children, int index) { - _objc_msgSend_1119( - this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); + bool isLocationRequiredToCreateForKey_(objc.NSString toManyRelationshipKey) { + return _objc_msgSend_51(this.pointer, + _sel_isLocationRequiredToCreateForKey_, toManyRelationshipKey.pointer); } - void removeChildAtIndex_(int index) { - _objc_msgSend_470(this.pointer, _sel_removeChildAtIndex_, index); + bool hasPropertyForKey_(objc.NSString key) { + return _objc_msgSend_51(this.pointer, _sel_hasPropertyForKey_, key.pointer); } - void setChildren_(NSArray? children) { - _objc_msgSend_843( - this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); + bool hasOrderedToManyRelationshipForKey_(objc.NSString key) { + return _objc_msgSend_51( + this.pointer, _sel_hasOrderedToManyRelationshipForKey_, key.pointer); } - void addChild_(NSXMLNode child) { - _objc_msgSend_1120(this.pointer, _sel_addChild_, child.pointer); + bool hasReadablePropertyForKey_(objc.NSString key) { + return _objc_msgSend_51( + this.pointer, _sel_hasReadablePropertyForKey_, key.pointer); } - void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { - _objc_msgSend_1121( - this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); + bool hasWritablePropertyForKey_(objc.NSString key) { + return _objc_msgSend_51( + this.pointer, _sel_hasWritablePropertyForKey_, key.pointer); } - void normalizeAdjacentTextNodesPreservingCDATA_(bool preserve) { - _objc_msgSend_870(this.pointer, - _sel_normalizeAdjacentTextNodesPreservingCDATA_, preserve); + bool isReadOnlyKey_(objc.NSString key) { + return _objc_msgSend_51(this.pointer, _sel_isReadOnlyKey_, key.pointer); } - void setAttributesAsDictionary_(NSDictionary attributes) { - _objc_msgSend_509( - this.pointer, _sel_setAttributesAsDictionary_, attributes.pointer); + static void registerClassDescription_forClass_( + NSClassDescription description, objc.NSObject aClass) { + _objc_msgSend_699( + _class_NSScriptClassDescription, + _sel_registerClassDescription_forClass_, + description.pointer, + aClass.pointer); } - @override - NSXMLElement init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSXMLElement._(_ret, retain: true, release: true); + static void invalidateClassDescriptionCache() { + _objc_msgSend_82( + _class_NSScriptClassDescription, _sel_invalidateClassDescriptionCache); } @override - NSXMLElement initWithKind_(int kind) { - final _ret = _objc_msgSend_1105(this.pointer, _sel_initWithKind_, kind); - return NSXMLElement._(_ret, retain: true, release: true); - } - - static NSObject document() { - final _ret = _objc_msgSend_2(_class_NSXMLElement, _sel_document); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_1107( - _class_NSXMLElement, _sel_documentWithRootElement_, element.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject elementWithName_(NSString name) { - final _ret = _objc_msgSend_31( - _class_NSXMLElement, _sel_elementWithName_, name.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject elementWithName_URI_(NSString name, NSString URI) { - final _ret = _objc_msgSend_1108(_class_NSXMLElement, - _sel_elementWithName_URI_, name.pointer, URI.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject elementWithName_stringValue_(NSString name, NSString string) { - final _ret = _objc_msgSend_1108(_class_NSXMLElement, - _sel_elementWithName_stringValue_, name.pointer, string.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject elementWithName_children_attributes_( - NSString name, NSArray? children, NSArray? attributes) { - final _ret = _objc_msgSend_1109( - _class_NSXMLElement, - _sel_elementWithName_children_attributes_, - name.pointer, - children?.pointer ?? ffi.nullptr, - attributes?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject attributeWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLElement, - _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject attributeWithName_URI_stringValue_( - NSString name, NSString URI, NSString stringValue) { - final _ret = _objc_msgSend_1074( - _class_NSXMLElement, - _sel_attributeWithName_URI_stringValue_, - name.pointer, - URI.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject namespaceWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLElement, - _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject processingInstructionWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108( - _class_NSXMLElement, - _sel_processingInstructionWithName_stringValue_, - name.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject commentWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLElement, _sel_commentWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject textWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLElement, _sel_textWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject? DTDNodeWithXMLString_(NSString string) { - final _ret = _objc_msgSend_38( - _class_NSXMLElement, _sel_DTDNodeWithXMLString_, string.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSString localNameForName_(NSString name) { - final _ret = _objc_msgSend_69( - _class_NSXMLElement, _sel_localNameForName_, name.pointer); - return NSString._(_ret, retain: true, release: true); - } - - static NSString? prefixForName_(NSString name) { - final _ret = _objc_msgSend_186( - _class_NSXMLElement, _sel_prefixForName_, name.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - static NSXMLNode? predefinedNamespaceForPrefix_(NSString name) { - final _ret = _objc_msgSend_1124( - _class_NSXMLElement, _sel_predefinedNamespaceForPrefix_, name.pointer); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); + NSScriptClassDescription init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLElement new1() { - final _ret = _objc_msgSend_2(_class_NSXMLElement, _sel_new); - return NSXMLElement._(_ret, retain: false, release: true); + static NSScriptClassDescription new1() { + final _ret = _objc_msgSend_40(_class_NSScriptClassDescription, _sel_new); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); } - static NSXMLElement allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSXMLElement, _sel_allocWithZone_, zone); - return NSXMLElement._(_ret, retain: false, release: true); + static NSScriptClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSScriptClassDescription, _sel_allocWithZone_, zone); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); } - static NSXMLElement alloc() { - final _ret = _objc_msgSend_2(_class_NSXMLElement, _sel_alloc); - return NSXMLElement._(_ret, retain: false, release: true); + static NSScriptClassDescription alloc() { + final _ret = _objc_msgSend_40(_class_NSScriptClassDescription, _sel_alloc); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSXMLElement, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptClassDescription, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSXMLElement, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptClassDescription, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSXMLElement, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSScriptClassDescription, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSXMLElement, _sel_useStoredAccessor); + return _objc_msgSend_7( + _class_NSScriptClassDescription, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSXMLElement, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptClassDescription, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSXMLElement, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptClassDescription, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSXMLElement, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptClassDescription, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSXMLElement, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptClassDescription, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSXMLElement, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSScriptClassDescription, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSXMLElement = objc.getClass("NSXMLElement"); +late final _class_NSScriptClassDescription = + objc.getClass("NSScriptClassDescription"); -class NSXMLNode extends NSObject { - NSXMLNode._(ffi.Pointer pointer, +class NSClassDescription extends objc.NSObject { + NSClassDescription._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSXMLNode] that points to the same underlying object as [other]. - static NSXMLNode castFrom(T other) { - return NSXMLNode._(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.pointer, retain: true, release: true); - /// Returns a [NSXMLNode] that wraps the given raw object pointer. - static NSXMLNode castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLNode._(other, retain: retain, release: release); - } + /// 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 [NSXMLNode]. + /// Returns whether [obj] is an instance of [NSClassDescription]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSXMLNode); - } - - @override - NSXMLNode init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSXMLNode._(_ret, retain: true, release: true); - } - - NSXMLNode initWithKind_(int kind) { - final _ret = _objc_msgSend_1105(this.pointer, _sel_initWithKind_, kind); - return NSXMLNode._(_ret, retain: true, release: true); - } - - NSXMLNode initWithKind_options_(int kind, int options) { - final _ret = _objc_msgSend_1106( - this.pointer, _sel_initWithKind_options_, kind, options); - return NSXMLNode._(_ret, retain: true, release: true); - } - - static NSObject document() { - final _ret = _objc_msgSend_2(_class_NSXMLNode, _sel_document); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_1107( - _class_NSXMLNode, _sel_documentWithRootElement_, element.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject elementWithName_(NSString name) { - final _ret = - _objc_msgSend_31(_class_NSXMLNode, _sel_elementWithName_, name.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject elementWithName_URI_(NSString name, NSString URI) { - final _ret = _objc_msgSend_1108( - _class_NSXMLNode, _sel_elementWithName_URI_, name.pointer, URI.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject elementWithName_stringValue_(NSString name, NSString string) { - final _ret = _objc_msgSend_1108(_class_NSXMLNode, - _sel_elementWithName_stringValue_, name.pointer, string.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject elementWithName_children_attributes_( - NSString name, NSArray? children, NSArray? attributes) { - final _ret = _objc_msgSend_1109( - _class_NSXMLNode, - _sel_elementWithName_children_attributes_, - name.pointer, - children?.pointer ?? ffi.nullptr, - attributes?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject attributeWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLNode, - _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject attributeWithName_URI_stringValue_( - NSString name, NSString URI, NSString stringValue) { - final _ret = _objc_msgSend_1074( - _class_NSXMLNode, - _sel_attributeWithName_URI_stringValue_, - name.pointer, - URI.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject namespaceWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLNode, - _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject processingInstructionWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108( - _class_NSXMLNode, - _sel_processingInstructionWithName_stringValue_, - name.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject commentWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLNode, _sel_commentWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject textWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLNode, _sel_textWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject? DTDNodeWithXMLString_(NSString string) { - final _ret = _objc_msgSend_38( - _class_NSXMLNode, _sel_DTDNodeWithXMLString_, string.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - int get kind { - return _objc_msgSend_1110(this.pointer, _sel_kind); - } - - NSString? get name { - final _ret = _objc_msgSend_44(this.pointer, _sel_name); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set name(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); - } - - NSObject? get objectValue { - final _ret = _objc_msgSend_17(this.pointer, _sel_objectValue); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set objectValue(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setObjectValue_, value?.pointer ?? ffi.nullptr); - } - - NSString? get stringValue { - final _ret = _objc_msgSend_44(this.pointer, _sel_stringValue); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set stringValue(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setStringValue_, value?.pointer ?? ffi.nullptr); - } - - void setStringValue_resolvingEntities_(NSString string, bool resolve) { - _objc_msgSend_1111(this.pointer, _sel_setStringValue_resolvingEntities_, - string.pointer, resolve); - } - - int get index { - return _objc_msgSend_10(this.pointer, _sel_index); - } - - int get level { - return _objc_msgSend_10(this.pointer, _sel_level); - } - - NSXMLDocument? get rootDocument { - final _ret = _objc_msgSend_1135(this.pointer, _sel_rootDocument); - return _ret.address == 0 - ? null - : NSXMLDocument._(_ret, retain: true, release: true); - } - - NSXMLNode? get parent { - final _ret = _objc_msgSend_1136(this.pointer, _sel_parent); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); - } - - int get childCount { - return _objc_msgSend_10(this.pointer, _sel_childCount); - } - - NSArray? get children { - final _ret = _objc_msgSend_84(this.pointer, _sel_children); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSXMLNode? childAtIndex_(int index) { - final _ret = _objc_msgSend_1137(this.pointer, _sel_childAtIndex_, index); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); - } - - NSXMLNode? get previousSibling { - final _ret = _objc_msgSend_1136(this.pointer, _sel_previousSibling); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); - } - - NSXMLNode? get nextSibling { - final _ret = _objc_msgSend_1136(this.pointer, _sel_nextSibling); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); - } - - NSXMLNode? get previousNode { - final _ret = _objc_msgSend_1136(this.pointer, _sel_previousNode); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); - } - - NSXMLNode? get nextNode { - final _ret = _objc_msgSend_1136(this.pointer, _sel_nextNode); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); - } - - void detach() { - _objc_msgSend_1(this.pointer, _sel_detach); - } - - NSString? get XPath { - final _ret = _objc_msgSend_44(this.pointer, _sel_XPath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSClassDescription); } - NSString? get localName { - final _ret = _objc_msgSend_44(this.pointer, _sel_localName); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static void registerClassDescription_forClass_( + NSClassDescription description, objc.NSObject aClass) { + _objc_msgSend_699( + _class_NSClassDescription, + _sel_registerClassDescription_forClass_, + description.pointer, + aClass.pointer); } - NSString? get prefix { - final _ret = _objc_msgSend_44(this.pointer, _sel_prefix); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static void invalidateClassDescriptionCache() { + _objc_msgSend_82( + _class_NSClassDescription, _sel_invalidateClassDescriptionCache); } - NSString? get URI { - final _ret = _objc_msgSend_44(this.pointer, _sel_URI); + static NSClassDescription? classDescriptionForClass_(objc.NSObject aClass) { + final _ret = _objc_msgSend_700(_class_NSClassDescription, + _sel_classDescriptionForClass_, aClass.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSClassDescription.castFromPointer(_ret, retain: true, release: true); } - set URI(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setURI_, value?.pointer ?? ffi.nullptr); + objc.NSArray get attributeKeys { + final _ret = _objc_msgSend_6(this.pointer, _sel_attributeKeys); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSString localNameForName_(NSString name) { - final _ret = _objc_msgSend_69( - _class_NSXMLNode, _sel_localNameForName_, name.pointer); - return NSString._(_ret, retain: true, release: true); + objc.NSArray get toOneRelationshipKeys { + final _ret = _objc_msgSend_6(this.pointer, _sel_toOneRelationshipKeys); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSString? prefixForName_(NSString name) { - final _ret = - _objc_msgSend_186(_class_NSXMLNode, _sel_prefixForName_, name.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + objc.NSArray get toManyRelationshipKeys { + final _ret = _objc_msgSend_6(this.pointer, _sel_toManyRelationshipKeys); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSXMLNode? predefinedNamespaceForPrefix_(NSString name) { - final _ret = _objc_msgSend_1124( - _class_NSXMLNode, _sel_predefinedNamespaceForPrefix_, name.pointer); + objc.NSString? inverseForRelationshipKey_(objc.NSString relationshipKey) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_inverseForRelationshipKey_, relationshipKey.pointer); return _ret.address == 0 ? null - : NSXMLNode._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); + @override + NSClassDescription init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSClassDescription.castFromPointer(_ret, + retain: true, release: true); } - NSString get XMLString { - final _ret = _objc_msgSend_21(this.pointer, _sel_XMLString); - return NSString._(_ret, retain: true, release: true); + static NSClassDescription new1() { + final _ret = _objc_msgSend_40(_class_NSClassDescription, _sel_new); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } - NSString XMLStringWithOptions_(int options) { + static NSClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_1138(this.pointer, _sel_XMLStringWithOptions_, options); - return NSString._(_ret, retain: true, release: true); - } - - NSString canonicalXMLStringPreservingComments_(bool comments) { - final _ret = _objc_msgSend_1139( - this.pointer, _sel_canonicalXMLStringPreservingComments_, comments); - return NSString._(_ret, retain: true, release: true); - } - - NSArray? nodesForXPath_error_( - NSString xpath, ffi.Pointer> error) { - final _ret = _objc_msgSend_443( - this.pointer, _sel_nodesForXPath_error_, xpath.pointer, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSArray? objectsForXQuery_constants_error_( - NSString xquery, - NSDictionary? constants, - ffi.Pointer> error) { - final _ret = _objc_msgSend_1140( - this.pointer, - _sel_objectsForXQuery_constants_error_, - xquery.pointer, - constants?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSArray? objectsForXQuery_error_( - NSString xquery, ffi.Pointer> error) { - final _ret = _objc_msgSend_443( - this.pointer, _sel_objectsForXQuery_error_, xquery.pointer, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - static NSXMLNode new1() { - final _ret = _objc_msgSend_2(_class_NSXMLNode, _sel_new); - return NSXMLNode._(_ret, retain: false, release: true); - } - - static NSXMLNode allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSXMLNode, _sel_allocWithZone_, zone); - return NSXMLNode._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSClassDescription, _sel_allocWithZone_, zone); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } - static NSXMLNode alloc() { - final _ret = _objc_msgSend_2(_class_NSXMLNode, _sel_alloc); - return NSXMLNode._(_ret, retain: false, release: true); + static NSClassDescription alloc() { + final _ret = _objc_msgSend_40(_class_NSClassDescription, _sel_alloc); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSXMLNode, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSClassDescription, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSXMLNode, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSClassDescription, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSXMLNode, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSXMLNode, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSXMLNode, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSXMLNode, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSXMLNode, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSXMLNode, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSXMLNode, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + return _objc_msgSend_7( + _class_NSClassDescription, _sel_accessInstanceVariablesDirectly); } -} - -late final _class_NSXMLNode = objc.getClass("NSXMLNode"); -abstract class NSXMLNodeKind { - static const int NSXMLInvalidKind = 0; - static const int NSXMLDocumentKind = 1; - static const int NSXMLElementKind = 2; - static const int NSXMLAttributeKind = 3; - static const int NSXMLNamespaceKind = 4; - static const int NSXMLProcessingInstructionKind = 5; - static const int NSXMLCommentKind = 6; - static const int NSXMLTextKind = 7; - static const int NSXMLDTDKind = 8; - static const int NSXMLEntityDeclarationKind = 9; - static const int NSXMLAttributeDeclarationKind = 10; - static const int NSXMLElementDeclarationKind = 11; - static const int NSXMLNotationDeclarationKind = 12; -} + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSClassDescription, _sel_useStoredAccessor); + } -late final _sel_initWithKind_ = objc.registerName("initWithKind:"); -final _objc_msgSend_1105 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int)>(); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSClassDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } -abstract class NSXMLNodeOptions { - static const int NSXMLNodeOptionsNone = 0; - static const int NSXMLNodeIsCDATA = 1; - static const int NSXMLNodeExpandEmptyElement = 2; - static const int NSXMLNodeCompactEmptyElement = 4; - static const int NSXMLNodeUseSingleQuotes = 8; - static const int NSXMLNodeUseDoubleQuotes = 16; - static const int NSXMLNodeNeverEscapeContents = 32; - static const int NSXMLDocumentTidyHTML = 512; - static const int NSXMLDocumentTidyXML = 1024; - static const int NSXMLDocumentValidate = 8192; - static const int NSXMLNodeLoadExternalEntitiesAlways = 16384; - static const int NSXMLNodeLoadExternalEntitiesSameOriginOnly = 32768; - static const int NSXMLNodeLoadExternalEntitiesNever = 524288; - static const int NSXMLDocumentXInclude = 65536; - static const int NSXMLNodePrettyPrint = 131072; - static const int NSXMLDocumentIncludeContentTypeDeclaration = 262144; - static const int NSXMLNodePreserveNamespaceOrder = 1048576; - static const int NSXMLNodePreserveAttributeOrder = 2097152; - static const int NSXMLNodePreserveEntities = 4194304; - static const int NSXMLNodePreservePrefixes = 8388608; - static const int NSXMLNodePreserveCDATA = 16777216; - static const int NSXMLNodePreserveWhitespace = 33554432; - static const int NSXMLNodePreserveDTD = 67108864; - static const int NSXMLNodePreserveCharacterReferences = 134217728; - static const int NSXMLNodePromoteSignificantWhitespace = 268435456; - static const int NSXMLNodePreserveEmptyElements = 6; - static const int NSXMLNodePreserveQuotes = 24; - static const int NSXMLNodePreserveAll = 4293918750; + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSClassDescription, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSClassDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSClassDescription, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSClassDescription, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } } -late final _sel_initWithKind_options_ = - objc.registerName("initWithKind:options:"); -final _objc_msgSend_1106 = objc.msgSendPointer +late final _class_NSClassDescription = objc.getClass("NSClassDescription"); +late final _sel_registerClassDescription_forClass_ = + objc.registerName("registerClassDescription:forClass:"); +final _objc_msgSend_699 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Int32, ffi.Int32)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int, int)>(); -late final _sel_document = objc.registerName("document"); -late final _sel_documentWithRootElement_ = - objc.registerName("documentWithRootElement:"); -final _objc_msgSend_1107 = objc.msgSendPointer + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_invalidateClassDescriptionCache = + objc.registerName("invalidateClassDescriptionCache"); +late final _sel_classDescriptionForClass_ = + objc.registerName("classDescriptionForClass:"); +final _objc_msgSend_700 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -57404,578 +34849,574 @@ final _objc_msgSend_1107 = objc.msgSendPointer .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_1108 = objc.msgSendPointer +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:"); +final _objc_msgSend_701 = 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_1109 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithSuiteName_className_dictionary_ = + objc.registerName("initWithSuiteName:className:dictionary:"); +final _objc_msgSend_702 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( 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_1110 = objc.msgSendPointer +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_703 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + 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_704 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt 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_setStringValue_ = objc.registerName("setStringValue:"); -late final _sel_setStringValue_resolvingEntities_ = - objc.registerName("setStringValue:resolvingEntities:"); -final _objc_msgSend_1111 = objc.msgSendPointer +late final _sel_matchesAppleEventCode_ = + objc.registerName("matchesAppleEventCode:"); +final _objc_msgSend_705 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_index = objc.registerName("index"); -late final _sel_level = objc.registerName("level"); + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); -class NSXMLDocument extends NSXMLNode { - NSXMLDocument._(ffi.Pointer pointer, +class NSScriptCommandDescription extends objc.NSObject { + NSScriptCommandDescription._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSXMLDocument] that points to the same underlying object as [other]. - static NSXMLDocument castFrom(T other) { - return NSXMLDocument._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSScriptCommandDescription] that points to the same underlying object as [other]. + NSScriptCommandDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSXMLDocument] that wraps the given raw object pointer. - static NSXMLDocument castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLDocument._(other, retain: retain, release: release); - } + /// 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); - /// Returns whether [obj] is an instance of [NSXMLDocument]. + /// Returns whether [obj] is an instance of [NSScriptCommandDescription]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSXMLDocument); + obj.pointer, _sel_isKindOfClass_, _class_NSScriptCommandDescription); } @override - NSXMLDocument init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSXMLDocument._(_ret, retain: true, release: true); + objc.NSObject init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSXMLDocument? initWithXMLString_options_error_(NSString string, int mask, - ffi.Pointer> error) { - final _ret = _objc_msgSend_1112(this.pointer, - _sel_initWithXMLString_options_error_, string.pointer, mask, error); + NSScriptCommandDescription? initWithSuiteName_commandName_dictionary_( + objc.NSString suiteName, + objc.NSString commandName, + objc.NSDictionary? commandDeclaration) { + final _ret = _objc_msgSend_702( + this.pointer, + _sel_initWithSuiteName_commandName_dictionary_, + suiteName.pointer, + commandName.pointer, + commandDeclaration?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSXMLDocument._(_ret, retain: true, release: true); + : NSScriptCommandDescription.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDocument? initWithContentsOfURL_options_error_( - NSURL url, int mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_1113(this.pointer, - _sel_initWithContentsOfURL_options_error_, url.pointer, mask, error); + NSScriptCommandDescription? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); return _ret.address == 0 ? null - : NSXMLDocument._(_ret, retain: true, release: true); + : NSScriptCommandDescription.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDocument? initWithData_options_error_( - NSData data, int mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_1114(this.pointer, - _sel_initWithData_options_error_, data.pointer, mask, error); - return _ret.address == 0 - ? null - : NSXMLDocument._(_ret, retain: true, release: true); + objc.NSString get suiteName { + final _ret = _objc_msgSend_12(this.pointer, _sel_suiteName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLDocument initWithRootElement_(NSXMLElement? element) { - final _ret = _objc_msgSend_1115(this.pointer, _sel_initWithRootElement_, - element?.pointer ?? ffi.nullptr); - return NSXMLDocument._(_ret, retain: true, release: true); + objc.NSString get commandName { + final _ret = _objc_msgSend_12(this.pointer, _sel_commandName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject replacementClassForClass_(NSObject cls) { - final _ret = _objc_msgSend_124( - _class_NSXMLDocument, _sel_replacementClassForClass_, cls.pointer); - return NSObject._(_ret, retain: true, release: true); + int get appleEventClassCode { + return _objc_msgSend_704(this.pointer, _sel_appleEventClassCode); } - NSString? get characterEncoding { - final _ret = _objc_msgSend_44(this.pointer, _sel_characterEncoding); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + int get appleEventCode { + return _objc_msgSend_704(this.pointer, _sel_appleEventCode); } - set characterEncoding(NSString? value) { - return _objc_msgSend_545(this.pointer, _sel_setCharacterEncoding_, - value?.pointer ?? ffi.nullptr); + objc.NSString get commandClassName { + final _ret = _objc_msgSend_12(this.pointer, _sel_commandClassName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get version { - final _ret = _objc_msgSend_44(this.pointer, _sel_version); + objc.NSString? get returnType { + final _ret = _objc_msgSend_13(this.pointer, _sel_returnType); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); - } - - set version(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setVersion_, value?.pointer ?? ffi.nullptr); - } - - bool get standalone { - return _objc_msgSend_12(this.pointer, _sel_isStandalone); - } - - set standalone(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setStandalone_, value); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get documentContentKind { - return _objc_msgSend_1116(this.pointer, _sel_documentContentKind); + int get appleEventCodeForReturnType { + return _objc_msgSend_704(this.pointer, _sel_appleEventCodeForReturnType); } - set documentContentKind(int value) { - return _objc_msgSend_1117( - this.pointer, _sel_setDocumentContentKind_, value); + objc.NSArray get argumentNames { + final _ret = _objc_msgSend_6(this.pointer, _sel_argumentNames); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? get MIMEType { - final _ret = _objc_msgSend_44(this.pointer, _sel_MIMEType); + objc.NSString? typeForArgumentWithName_(objc.NSString argumentName) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_typeForArgumentWithName_, argumentName.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set MIMEType(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setMIMEType_, value?.pointer ?? ffi.nullptr); + int appleEventCodeForArgumentWithName_(objc.NSString argumentName) { + return _objc_msgSend_706(this.pointer, + _sel_appleEventCodeForArgumentWithName_, argumentName.pointer); } - NSXMLDTD? get DTD { - final _ret = _objc_msgSend_1127(this.pointer, _sel_DTD); - return _ret.address == 0 - ? null - : NSXMLDTD._(_ret, retain: true, release: true); + bool isOptionalArgumentWithName_(objc.NSString argumentName) { + return _objc_msgSend_51( + this.pointer, _sel_isOptionalArgumentWithName_, argumentName.pointer); } - set DTD(NSXMLDTD? value) { - return _objc_msgSend_1128( - this.pointer, _sel_setDTD_, value?.pointer ?? ffi.nullptr); + NSScriptCommand createCommandInstance() { + final _ret = _objc_msgSend_745(this.pointer, _sel_createCommandInstance); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - void setRootElement_(NSXMLElement root) { - _objc_msgSend_1129(this.pointer, _sel_setRootElement_, root.pointer); + NSScriptCommand createCommandInstanceWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_746( + this.pointer, _sel_createCommandInstanceWithZone_, zone); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - NSXMLElement? rootElement() { - final _ret = _objc_msgSend_1130(this.pointer, _sel_rootElement); - return _ret.address == 0 - ? null - : NSXMLElement._(_ret, retain: true, release: true); + static NSScriptCommandDescription new1() { + final _ret = _objc_msgSend_40(_class_NSScriptCommandDescription, _sel_new); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } - void insertChild_atIndex_(NSXMLNode child, int index) { - _objc_msgSend_1118( - this.pointer, _sel_insertChild_atIndex_, child.pointer, index); + static NSScriptCommandDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSScriptCommandDescription, _sel_allocWithZone_, zone); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } - void insertChildren_atIndex_(NSArray children, int index) { - _objc_msgSend_1119( - this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); + static NSScriptCommandDescription alloc() { + final _ret = + _objc_msgSend_40(_class_NSScriptCommandDescription, _sel_alloc); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } - void removeChildAtIndex_(int index) { - _objc_msgSend_470(this.pointer, _sel_removeChildAtIndex_, index); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptCommandDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - void setChildren_(NSArray? children) { - _objc_msgSend_843( - this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptCommandDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - void addChild_(NSXMLNode child) { - _objc_msgSend_1120(this.pointer, _sel_addChild_, child.pointer); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSScriptCommandDescription, + _sel_accessInstanceVariablesDirectly); } - void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { - _objc_msgSend_1121( - this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSScriptCommandDescription, _sel_useStoredAccessor); } - NSData get XMLData { - final _ret = _objc_msgSend_43(this.pointer, _sel_XMLData); - return NSData._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptCommandDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSData XMLDataWithOptions_(int options) { - final _ret = - _objc_msgSend_1131(this.pointer, _sel_XMLDataWithOptions_, options); - return NSData._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptCommandDescription, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSObject? objectByApplyingXSLT_arguments_error_( - NSData xslt, - NSDictionary? arguments, - ffi.Pointer> error) { - final _ret = _objc_msgSend_1132( - this.pointer, - _sel_objectByApplyingXSLT_arguments_error_, - xslt.pointer, - arguments?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptCommandDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSObject? objectByApplyingXSLTString_arguments_error_( - NSString xslt, - NSDictionary? arguments, - ffi.Pointer> error) { - final _ret = _objc_msgSend_1133( - this.pointer, - _sel_objectByApplyingXSLTString_arguments_error_, - xslt.pointer, - arguments?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptCommandDescription, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSObject? objectByApplyingXSLTAtURL_arguments_error_(NSURL xsltURL, - NSDictionary? argument, ffi.Pointer> error) { - final _ret = _objc_msgSend_1134( - this.pointer, - _sel_objectByApplyingXSLTAtURL_arguments_error_, - xsltURL.pointer, - argument?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSScriptCommandDescription, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - bool validateAndReturnError_( - ffi.Pointer> error) { - return _objc_msgSend_255(this.pointer, _sel_validateAndReturnError_, error); - } +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_706 = 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:"); - @override - NSXMLDocument initWithKind_(int kind) { - final _ret = _objc_msgSend_1105(this.pointer, _sel_initWithKind_, kind); - return NSXMLDocument._(_ret, retain: true, release: true); - } +class NSScriptCommand extends objc.NSObject { + NSScriptCommand._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - @override - NSXMLDocument initWithKind_options_(int kind, int options) { - final _ret = _objc_msgSend_1106( - this.pointer, _sel_initWithKind_options_, kind, options); - return NSXMLDocument._(_ret, retain: true, release: true); - } + /// Constructs a [NSScriptCommand] that points to the same underlying object as [other]. + NSScriptCommand.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static NSObject document() { - final _ret = _objc_msgSend_2(_class_NSXMLDocument, _sel_document); - return NSObject._(_ret, 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); - static NSObject documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_1107( - _class_NSXMLDocument, _sel_documentWithRootElement_, element.pointer); - return NSObject._(_ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSScriptCommand]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSScriptCommand); } - static NSObject elementWithName_(NSString name) { - final _ret = _objc_msgSend_31( - _class_NSXMLDocument, _sel_elementWithName_, name.pointer); - return NSObject._(_ret, retain: true, release: true); + NSScriptCommand initWithCommandDescription_( + NSScriptCommandDescription commandDef) { + final _ret = _objc_msgSend_707( + this.pointer, _sel_initWithCommandDescription_, commandDef.pointer); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_URI_(NSString name, NSString URI) { - final _ret = _objc_msgSend_1108(_class_NSXMLDocument, - _sel_elementWithName_URI_, name.pointer, URI.pointer); - return NSObject._(_ret, retain: true, release: true); + NSScriptCommand? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); + return _ret.address == 0 + ? null + : NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_stringValue_(NSString name, NSString string) { - final _ret = _objc_msgSend_1108(_class_NSXMLDocument, - _sel_elementWithName_stringValue_, name.pointer, string.pointer); - return NSObject._(_ret, retain: true, release: true); + NSScriptCommandDescription get commandDescription { + final _ret = _objc_msgSend_708(this.pointer, _sel_commandDescription); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: true, release: true); } - static NSObject elementWithName_children_attributes_( - NSString name, NSArray? children, NSArray? attributes) { - final _ret = _objc_msgSend_1109( - _class_NSXMLDocument, - _sel_elementWithName_children_attributes_, - name.pointer, - children?.pointer ?? ffi.nullptr, - attributes?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); + objc.NSObject? get directParameter { + final _ret = _objc_msgSend_66(this.pointer, _sel_directParameter); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject attributeWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLDocument, - _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + set directParameter(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDirectParameter_, value?.pointer ?? ffi.nullptr); } - static NSObject attributeWithName_URI_stringValue_( - NSString name, NSString URI, NSString stringValue) { - final _ret = _objc_msgSend_1074( - _class_NSXMLDocument, - _sel_attributeWithName_URI_stringValue_, - name.pointer, - URI.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + NSScriptObjectSpecifier? get receiversSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_receiversSpecifier); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - static NSObject namespaceWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLDocument, - _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + set receiversSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_738(this.pointer, _sel_setReceiversSpecifier_, + value?.pointer ?? ffi.nullptr); } - static NSObject processingInstructionWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108( - _class_NSXMLDocument, - _sel_processingInstructionWithName_stringValue_, - name.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + objc.NSObject? get evaluatedReceivers { + final _ret = _objc_msgSend_66(this.pointer, _sel_evaluatedReceivers); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject commentWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31(_class_NSXMLDocument, - _sel_commentWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + objc.NSDictionary? get arguments { + final _ret = _objc_msgSend_65(this.pointer, _sel_arguments); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSObject textWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLDocument, _sel_textWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + set arguments(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, _sel_setArguments_, value?.pointer ?? ffi.nullptr); } - static NSObject? DTDNodeWithXMLString_(NSString string) { - final _ret = _objc_msgSend_38( - _class_NSXMLDocument, _sel_DTDNodeWithXMLString_, string.pointer); + objc.NSDictionary? get evaluatedArguments { + final _ret = _objc_msgSend_65(this.pointer, _sel_evaluatedArguments); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSString localNameForName_(NSString name) { - final _ret = _objc_msgSend_69( - _class_NSXMLDocument, _sel_localNameForName_, name.pointer); - return NSString._(_ret, retain: true, release: true); + bool get wellFormed { + return _objc_msgSend_7(this.pointer, _sel_isWellFormed); } - static NSString? prefixForName_(NSString name) { - final _ret = _objc_msgSend_186( - _class_NSXMLDocument, _sel_prefixForName_, name.pointer); + objc.NSObject? performDefaultImplementation() { + final _ret = + _objc_msgSend_66(this.pointer, _sel_performDefaultImplementation); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSXMLNode? predefinedNamespaceForPrefix_(NSString name) { - final _ret = _objc_msgSend_1124( - _class_NSXMLDocument, _sel_predefinedNamespaceForPrefix_, name.pointer); + objc.NSObject? executeCommand() { + final _ret = _objc_msgSend_66(this.pointer, _sel_executeCommand); return _ret.address == 0 ? null - : NSXMLNode._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSXMLDocument new1() { - final _ret = _objc_msgSend_2(_class_NSXMLDocument, _sel_new); - return NSXMLDocument._(_ret, retain: false, release: true); + int get scriptErrorNumber { + return _objc_msgSend_114(this.pointer, _sel_scriptErrorNumber); } - static NSXMLDocument allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSXMLDocument, _sel_allocWithZone_, zone); - return NSXMLDocument._(_ret, retain: false, release: true); + set scriptErrorNumber(int value) { + return _objc_msgSend_134(this.pointer, _sel_setScriptErrorNumber_, value); } - static NSXMLDocument alloc() { - final _ret = _objc_msgSend_2(_class_NSXMLDocument, _sel_alloc); - return NSXMLDocument._(_ret, retain: false, release: true); + NSAppleEventDescriptor? get scriptErrorOffendingObjectDescriptor { + final _ret = _objc_msgSend_742( + this.pointer, _sel_scriptErrorOffendingObjectDescriptor); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSXMLDocument, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + set scriptErrorOffendingObjectDescriptor(NSAppleEventDescriptor? value) { + return _objc_msgSend_743( + this.pointer, + _sel_setScriptErrorOffendingObjectDescriptor_, + value?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSXMLDocument, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + NSAppleEventDescriptor? get scriptErrorExpectedTypeDescriptor { + final _ret = + _objc_msgSend_742(this.pointer, _sel_scriptErrorExpectedTypeDescriptor); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSXMLDocument, _sel_accessInstanceVariablesDirectly); + set scriptErrorExpectedTypeDescriptor(NSAppleEventDescriptor? value) { + return _objc_msgSend_743( + this.pointer, + _sel_setScriptErrorExpectedTypeDescriptor_, + value?.pointer ?? ffi.nullptr); } - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSXMLDocument, _sel_useStoredAccessor); + objc.NSString? get scriptErrorString { + final _ret = _objc_msgSend_13(this.pointer, _sel_scriptErrorString); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSXMLDocument, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + set scriptErrorString(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setScriptErrorString_, + value?.pointer ?? ffi.nullptr); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSXMLDocument, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + static NSScriptCommand? currentCommand() { + final _ret = _objc_msgSend_744(_class_NSScriptCommand, _sel_currentCommand); + return _ret.address == 0 + ? null + : NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSXMLDocument, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + NSAppleEventDescriptor? get appleEvent { + final _ret = _objc_msgSend_742(this.pointer, _sel_appleEvent); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSXMLDocument, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + void suspendExecution() { + _objc_msgSend_82(this.pointer, _sel_suspendExecution); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSXMLDocument, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + void resumeExecutionWithResult_(objc.NSObject? result) { + _objc_msgSend_215(this.pointer, _sel_resumeExecutionWithResult_, + result?.pointer ?? ffi.nullptr); } -} -late final _class_NSXMLDocument = objc.getClass("NSXMLDocument"); -late final _sel_initWithXMLString_options_error_ = - objc.registerName("initWithXMLString:options:error:"); -final _objc_msgSend_1112 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -final _objc_msgSend_1113 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_1114 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_initWithRootElement_ = - objc.registerName("initWithRootElement:"); -final _objc_msgSend_1115 = objc.msgSendPointer + @override + NSScriptCommand init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); + } + + static NSScriptCommand new1() { + final _ret = _objc_msgSend_40(_class_NSScriptCommand, _sel_new); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); + } + + static NSScriptCommand allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSScriptCommand, _sel_allocWithZone_, zone); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); + } + + static NSScriptCommand alloc() { + final _ret = _objc_msgSend_40(_class_NSScriptCommand, _sel_alloc); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptCommand, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptCommand, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSScriptCommand, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSScriptCommand, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptCommand, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptCommand, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptCommand, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptCommand, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSScriptCommand, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSScriptCommand = objc.getClass("NSScriptCommand"); +late final _sel_initWithCommandDescription_ = + objc.registerName("initWithCommandDescription:"); +final _objc_msgSend_707 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -57985,792 +35426,1192 @@ final _objc_msgSend_1115 = objc.msgSendPointer .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_replacementClassForClass_ = - objc.registerName("replacementClassForClass:"); -late final _sel_characterEncoding = objc.registerName("characterEncoding"); -late final _sel_setCharacterEncoding_ = - objc.registerName("setCharacterEncoding:"); -late final _sel_isStandalone = objc.registerName("isStandalone"); -late final _sel_setStandalone_ = objc.registerName("setStandalone:"); - -abstract class NSXMLDocumentContentKind { - static const int NSXMLDocumentXMLKind = 0; - static const int NSXMLDocumentXHTMLKind = 1; - static const int NSXMLDocumentHTMLKind = 2; - static const int NSXMLDocumentTextKind = 3; -} - -late final _sel_documentContentKind = objc.registerName("documentContentKind"); -final _objc_msgSend_1116 = objc.msgSendPointer +late final _sel_commandDescription = objc.registerName("commandDescription"); +final _objc_msgSend_708 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDocumentContentKind_ = - objc.registerName("setDocumentContentKind:"); -final _objc_msgSend_1117 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_setMIMEType_ = objc.registerName("setMIMEType:"); +late final _sel_directParameter = objc.registerName("directParameter"); +late final _sel_setDirectParameter_ = objc.registerName("setDirectParameter:"); -class NSXMLDTD extends NSXMLNode { - NSXMLDTD._(ffi.Pointer pointer, +class NSScriptObjectSpecifier extends objc.NSObject { + NSScriptObjectSpecifier._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSXMLDTD] that points to the same underlying object as [other]. - static NSXMLDTD castFrom(T other) { - return NSXMLDTD._(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.pointer, retain: true, release: true); - /// Returns a [NSXMLDTD] that wraps the given raw object pointer. - static NSXMLDTD castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLDTD._(other, retain: retain, release: release); - } + /// 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 [NSXMLDTD]. + /// Returns whether [obj] is an instance of [NSScriptObjectSpecifier]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSXMLDTD); + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSScriptObjectSpecifier); } - @override - NSXMLDTD init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSXMLDTD._(_ret, retain: true, release: true); + static NSScriptObjectSpecifier? objectSpecifierWithDescriptor_( + NSAppleEventDescriptor descriptor) { + final _ret = _objc_msgSend_734(_class_NSScriptObjectSpecifier, + _sel_objectSpecifierWithDescriptor_, descriptor.pointer); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - @override - NSXMLDTD initWithKind_options_(int kind, int options) { - final _ret = _objc_msgSend_1106( - this.pointer, _sel_initWithKind_options_, kind, options); - return NSXMLDTD._(_ret, retain: true, release: true); + NSScriptObjectSpecifier initWithContainerSpecifier_key_( + NSScriptObjectSpecifier container, objc.NSString property) { + final _ret = _objc_msgSend_735( + this.pointer, + _sel_initWithContainerSpecifier_key_, + container.pointer, + property.pointer); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDTD? initWithContentsOfURL_options_error_( - NSURL url, int mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_1113(this.pointer, - _sel_initWithContentsOfURL_options_error_, url.pointer, mask, error); - return _ret.address == 0 - ? null - : NSXMLDTD._(_ret, retain: true, release: true); + NSScriptObjectSpecifier + initWithContainerClassDescription_containerSpecifier_key_( + NSScriptClassDescription classDesc, + NSScriptObjectSpecifier? container, + objc.NSString property) { + final _ret = _objc_msgSend_736( + this.pointer, + _sel_initWithContainerClassDescription_containerSpecifier_key_, + classDesc.pointer, + container?.pointer ?? ffi.nullptr, + property.pointer); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDTD? initWithData_options_error_( - NSData data, int mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_1114(this.pointer, - _sel_initWithData_options_error_, data.pointer, mask, error); + NSScriptObjectSpecifier? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); return _ret.address == 0 ? null - : NSXMLDTD._(_ret, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - NSString? get publicID { - final _ret = _objc_msgSend_44(this.pointer, _sel_publicID); + NSScriptObjectSpecifier? get childSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_childSpecifier); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - set publicID(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setPublicID_, value?.pointer ?? ffi.nullptr); + set childSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_738( + this.pointer, _sel_setChildSpecifier_, value?.pointer ?? ffi.nullptr); } - NSString? get systemID { - final _ret = _objc_msgSend_44(this.pointer, _sel_systemID); + NSScriptObjectSpecifier? get containerSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_containerSpecifier); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - set systemID(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setSystemID_, value?.pointer ?? ffi.nullptr); + set containerSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_738(this.pointer, _sel_setContainerSpecifier_, + value?.pointer ?? ffi.nullptr); } - void insertChild_atIndex_(NSXMLNode child, int index) { - _objc_msgSend_1118( - this.pointer, _sel_insertChild_atIndex_, child.pointer, index); + bool get containerIsObjectBeingTested { + return _objc_msgSend_7(this.pointer, _sel_containerIsObjectBeingTested); } - void insertChildren_atIndex_(NSArray children, int index) { - _objc_msgSend_1119( - this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); + set containerIsObjectBeingTested(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setContainerIsObjectBeingTested_, value); } - void removeChildAtIndex_(int index) { - _objc_msgSend_470(this.pointer, _sel_removeChildAtIndex_, index); + bool get containerIsRangeContainerObject { + return _objc_msgSend_7(this.pointer, _sel_containerIsRangeContainerObject); } - void setChildren_(NSArray? children) { - _objc_msgSend_843( - this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); + set containerIsRangeContainerObject(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setContainerIsRangeContainerObject_, value); } - void addChild_(NSXMLNode child) { - _objc_msgSend_1120(this.pointer, _sel_addChild_, child.pointer); + objc.NSString get key { + final _ret = _objc_msgSend_12(this.pointer, _sel_key); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { - _objc_msgSend_1121( - this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); + set key(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setKey_, value.pointer); } - NSXMLDTDNode? entityDeclarationForName_(NSString name) { - final _ret = _objc_msgSend_1125( - this.pointer, _sel_entityDeclarationForName_, name.pointer); + NSScriptClassDescription? get containerClassDescription { + final _ret = + _objc_msgSend_703(this.pointer, _sel_containerClassDescription); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, retain: true, release: true); + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDTDNode? notationDeclarationForName_(NSString name) { - final _ret = _objc_msgSend_1125( - this.pointer, _sel_notationDeclarationForName_, name.pointer); + set containerClassDescription(NSScriptClassDescription? value) { + return _objc_msgSend_739(this.pointer, _sel_setContainerClassDescription_, + value?.pointer ?? ffi.nullptr); + } + + NSScriptClassDescription? get keyClassDescription { + final _ret = _objc_msgSend_703(this.pointer, _sel_keyClassDescription); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, retain: true, release: true); + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDTDNode? elementDeclarationForName_(NSString name) { - final _ret = _objc_msgSend_1125( - this.pointer, _sel_elementDeclarationForName_, name.pointer); + ffi.Pointer indicesOfObjectsByEvaluatingWithContainer_count_( + objc.NSObject container, ffi.Pointer count) { + return _objc_msgSend_740( + this.pointer, + _sel_indicesOfObjectsByEvaluatingWithContainer_count_, + container.pointer, + count); + } + + objc.NSObject? objectsByEvaluatingWithContainers_(objc.NSObject containers) { + final _ret = _objc_msgSend_741(this.pointer, + _sel_objectsByEvaluatingWithContainers_, containers.pointer); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSXMLDTDNode? attributeDeclarationForName_elementName_( - NSString name, NSString elementName) { - final _ret = _objc_msgSend_1126( - this.pointer, - _sel_attributeDeclarationForName_elementName_, - name.pointer, - elementName.pointer); + objc.NSObject? get objectsByEvaluatingSpecifier { + final _ret = + _objc_msgSend_66(this.pointer, _sel_objectsByEvaluatingSpecifier); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSXMLDTDNode? predefinedEntityDeclarationForName_(NSString name) { - final _ret = _objc_msgSend_1125(_class_NSXMLDTD, - _sel_predefinedEntityDeclarationForName_, name.pointer); + int get evaluationErrorNumber { + return _objc_msgSend_114(this.pointer, _sel_evaluationErrorNumber); + } + + set evaluationErrorNumber(int value) { + return _objc_msgSend_134( + this.pointer, _sel_setEvaluationErrorNumber_, value); + } + + NSScriptObjectSpecifier? get evaluationErrorSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_evaluationErrorSpecifier); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); + } + + NSAppleEventDescriptor? get descriptor { + final _ret = _objc_msgSend_742(this.pointer, _sel_descriptor); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } @override - NSXMLDTD initWithKind_(int kind) { - final _ret = _objc_msgSend_1105(this.pointer, _sel_initWithKind_, kind); - return NSXMLDTD._(_ret, retain: true, release: true); + NSScriptObjectSpecifier init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - static NSObject document() { - final _ret = _objc_msgSend_2(_class_NSXMLDTD, _sel_document); - return NSObject._(_ret, retain: true, release: true); + static NSScriptObjectSpecifier new1() { + final _ret = _objc_msgSend_40(_class_NSScriptObjectSpecifier, _sel_new); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - static NSObject documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_1107( - _class_NSXMLDTD, _sel_documentWithRootElement_, element.pointer); - return NSObject._(_ret, retain: true, release: true); + static NSScriptObjectSpecifier allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSScriptObjectSpecifier, _sel_allocWithZone_, zone); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - static NSObject elementWithName_(NSString name) { - final _ret = - _objc_msgSend_31(_class_NSXMLDTD, _sel_elementWithName_, name.pointer); - return NSObject._(_ret, retain: true, release: true); + static NSScriptObjectSpecifier alloc() { + final _ret = _objc_msgSend_40(_class_NSScriptObjectSpecifier, _sel_alloc); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - static NSObject elementWithName_URI_(NSString name, NSString URI) { - final _ret = _objc_msgSend_1108( - _class_NSXMLDTD, _sel_elementWithName_URI_, name.pointer, URI.pointer); - return NSObject._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptObjectSpecifier, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static NSObject elementWithName_stringValue_(NSString name, NSString string) { - final _ret = _objc_msgSend_1108(_class_NSXMLDTD, - _sel_elementWithName_stringValue_, name.pointer, string.pointer); - return NSObject._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptObjectSpecifier, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static NSObject elementWithName_children_attributes_( - NSString name, NSArray? children, NSArray? attributes) { - final _ret = _objc_msgSend_1109( - _class_NSXMLDTD, - _sel_elementWithName_children_attributes_, - name.pointer, - children?.pointer ?? ffi.nullptr, - attributes?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSScriptObjectSpecifier, _sel_accessInstanceVariablesDirectly); } - static NSObject attributeWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLDTD, - _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSScriptObjectSpecifier, _sel_useStoredAccessor); } - static NSObject attributeWithName_URI_stringValue_( - NSString name, NSString URI, NSString stringValue) { - final _ret = _objc_msgSend_1074( - _class_NSXMLDTD, - _sel_attributeWithName_URI_stringValue_, - name.pointer, - URI.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptObjectSpecifier, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSObject namespaceWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLDTD, - _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptObjectSpecifier, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSObject processingInstructionWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108( - _class_NSXMLDTD, - _sel_processingInstructionWithName_stringValue_, - name.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptObjectSpecifier, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSObject commentWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLDTD, _sel_commentWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptObjectSpecifier, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject textWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLDTD, _sel_textWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSScriptObjectSpecifier, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - static NSObject? DTDNodeWithXMLString_(NSString string) { - final _ret = _objc_msgSend_38( - _class_NSXMLDTD, _sel_DTDNodeWithXMLString_, string.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); +late final _class_NSScriptObjectSpecifier = + objc.getClass("NSScriptObjectSpecifier"); + +class NSAppleEventDescriptor extends objc.NSObject { + NSAppleEventDescriptor._(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 [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 [NSAppleEventDescriptor]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSAppleEventDescriptor); } - static NSString localNameForName_(NSString name) { + static NSAppleEventDescriptor nullDescriptor() { final _ret = - _objc_msgSend_69(_class_NSXMLDTD, _sel_localNameForName_, name.pointer); - return NSString._(_ret, retain: true, release: true); + _objc_msgSend_709(_class_NSAppleEventDescriptor, _sel_nullDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSString? prefixForName_(NSString name) { - final _ret = - _objc_msgSend_186(_class_NSXMLDTD, _sel_prefixForName_, name.pointer); + static NSAppleEventDescriptor? descriptorWithDescriptorType_bytes_length_( + int descriptorType, ffi.Pointer bytes, int byteCount) { + final _ret = _objc_msgSend_710( + _class_NSAppleEventDescriptor, + _sel_descriptorWithDescriptorType_bytes_length_, + descriptorType, + bytes, + byteCount); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLNode? predefinedNamespaceForPrefix_(NSString name) { - final _ret = _objc_msgSend_1124( - _class_NSXMLDTD, _sel_predefinedNamespaceForPrefix_, name.pointer); + static NSAppleEventDescriptor? descriptorWithDescriptorType_data_( + int descriptorType, objc.NSData? data) { + final _ret = _objc_msgSend_711( + _class_NSAppleEventDescriptor, + _sel_descriptorWithDescriptorType_data_, + descriptorType, + data?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSXMLNode._(_ret, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTD new1() { - final _ret = _objc_msgSend_2(_class_NSXMLDTD, _sel_new); - return NSXMLDTD._(_ret, retain: false, release: true); + static NSAppleEventDescriptor descriptorWithBoolean_(int boolean) { + final _ret = _objc_msgSend_712( + _class_NSAppleEventDescriptor, _sel_descriptorWithBoolean_, boolean); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTD allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSXMLDTD, _sel_allocWithZone_, zone); - return NSXMLDTD._(_ret, retain: false, release: true); + static NSAppleEventDescriptor descriptorWithEnumCode_(int enumerator) { + final _ret = _objc_msgSend_713(_class_NSAppleEventDescriptor, + _sel_descriptorWithEnumCode_, enumerator); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTD alloc() { - final _ret = _objc_msgSend_2(_class_NSXMLDTD, _sel_alloc); - return NSXMLDTD._(_ret, retain: false, release: true); + static NSAppleEventDescriptor descriptorWithInt32_(int signedInt) { + final _ret = _objc_msgSend_714( + _class_NSAppleEventDescriptor, _sel_descriptorWithInt32_, signedInt); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSXMLDTD, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + static NSAppleEventDescriptor descriptorWithDouble_(double doubleValue) { + final _ret = _objc_msgSend_715( + _class_NSAppleEventDescriptor, _sel_descriptorWithDouble_, doubleValue); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSXMLDTD, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + static NSAppleEventDescriptor descriptorWithTypeCode_(int typeCode) { + final _ret = _objc_msgSend_713( + _class_NSAppleEventDescriptor, _sel_descriptorWithTypeCode_, typeCode); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSXMLDTD, _sel_accessInstanceVariablesDirectly); + static NSAppleEventDescriptor descriptorWithString_(objc.NSString string) { + final _ret = _objc_msgSend_716(_class_NSAppleEventDescriptor, + _sel_descriptorWithString_, string.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSXMLDTD, _sel_useStoredAccessor); + static NSAppleEventDescriptor descriptorWithDate_(objc.NSDate date) { + final _ret = _objc_msgSend_717( + _class_NSAppleEventDescriptor, _sel_descriptorWithDate_, date.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSXMLDTD, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + static NSAppleEventDescriptor descriptorWithFileURL_(objc.NSURL fileURL) { + final _ret = _objc_msgSend_718(_class_NSAppleEventDescriptor, + _sel_descriptorWithFileURL_, fileURL.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSXMLDTD, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + static NSAppleEventDescriptor + appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_( + int eventClass, + int eventID, + NSAppleEventDescriptor? targetDescriptor, + int returnID, + int transactionID) { + final _ret = _objc_msgSend_719( + _class_NSAppleEventDescriptor, + _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_, + eventClass, + eventID, + targetDescriptor?.pointer ?? ffi.nullptr, + returnID, + transactionID); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSXMLDTD, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + static NSAppleEventDescriptor listDescriptor() { + final _ret = + _objc_msgSend_709(_class_NSAppleEventDescriptor, _sel_listDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver() { + static NSAppleEventDescriptor recordDescriptor() { final _ret = - _objc_msgSend_85(_class_NSXMLDTD, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + _objc_msgSend_709(_class_NSAppleEventDescriptor, _sel_recordDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSXMLDTD, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static NSAppleEventDescriptor currentProcessDescriptor() { + final _ret = _objc_msgSend_709( + _class_NSAppleEventDescriptor, _sel_currentProcessDescriptor); + return NSAppleEventDescriptor.castFromPointer(_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_1118 = 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_1119 = 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_1120 = 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_1121 = 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)>(); + static NSAppleEventDescriptor descriptorWithProcessIdentifier_( + int processIdentifier) { + final _ret = _objc_msgSend_714(_class_NSAppleEventDescriptor, + _sel_descriptorWithProcessIdentifier_, processIdentifier); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } -class NSXMLDTDNode extends NSXMLNode { - NSXMLDTDNode._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + static NSAppleEventDescriptor descriptorWithBundleIdentifier_( + objc.NSString bundleIdentifier) { + final _ret = _objc_msgSend_716(_class_NSAppleEventDescriptor, + _sel_descriptorWithBundleIdentifier_, bundleIdentifier.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } - /// Returns a [NSXMLDTDNode] that points to the same underlying object as [other]. - static NSXMLDTDNode castFrom(T other) { - return NSXMLDTDNode._(other.pointer, retain: true, release: true); + static NSAppleEventDescriptor descriptorWithApplicationURL_( + objc.NSURL applicationURL) { + final _ret = _objc_msgSend_718(_class_NSAppleEventDescriptor, + _sel_descriptorWithApplicationURL_, applicationURL.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// Returns a [NSXMLDTDNode] that wraps the given raw object pointer. - static NSXMLDTDNode castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLDTDNode._(other, retain: retain, release: release); + NSAppleEventDescriptor initWithAEDescNoCopy_(ffi.Pointer aeDesc) { + final _ret = + _objc_msgSend_720(this.pointer, _sel_initWithAEDescNoCopy_, aeDesc); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } - /// Returns whether [obj] is an instance of [NSXMLDTDNode]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSXMLDTDNode); + NSAppleEventDescriptor? initWithDescriptorType_bytes_length_( + int descriptorType, ffi.Pointer bytes, int byteCount) { + final _ret = _objc_msgSend_721( + this.pointer, + _sel_initWithDescriptorType_bytes_length_, + descriptorType, + bytes, + byteCount); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDTDNode? initWithXMLString_(NSString string) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_initWithXMLString_, string.pointer); + NSAppleEventDescriptor? initWithDescriptorType_data_( + int descriptorType, objc.NSData? data) { + final _ret = _objc_msgSend_722( + this.pointer, + _sel_initWithDescriptorType_data_, + descriptorType, + data?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - @override - NSXMLDTDNode initWithKind_options_(int kind, int options) { - final _ret = _objc_msgSend_1106( - this.pointer, _sel_initWithKind_options_, kind, options); - return NSXMLDTDNode._(_ret, retain: true, release: true); + NSAppleEventDescriptor + initWithEventClass_eventID_targetDescriptor_returnID_transactionID_( + int eventClass, + int eventID, + NSAppleEventDescriptor? targetDescriptor, + int returnID, + int transactionID) { + final _ret = _objc_msgSend_723( + this.pointer, + _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_, + eventClass, + eventID, + targetDescriptor?.pointer ?? ffi.nullptr, + returnID, + transactionID); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - @override - NSXMLDTDNode init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSXMLDTDNode._(_ret, retain: true, release: true); + NSAppleEventDescriptor initListDescriptor() { + final _ret = _objc_msgSend_40(this.pointer, _sel_initListDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - int get DTDKind { - return _objc_msgSend_1122(this.pointer, _sel_DTDKind); + NSAppleEventDescriptor initRecordDescriptor() { + final _ret = _objc_msgSend_40(this.pointer, _sel_initRecordDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - set DTDKind(int value) { - return _objc_msgSend_1123(this.pointer, _sel_setDTDKind_, value); + ffi.Pointer get aeDesc { + return _objc_msgSend_724(this.pointer, _sel_aeDesc); } - bool get external1 { - return _objc_msgSend_12(this.pointer, _sel_isExternal); + int get descriptorType { + return _objc_msgSend_704(this.pointer, _sel_descriptorType); + } + + objc.NSData get data { + final _ret = _objc_msgSend_104(this.pointer, _sel_data); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + int get booleanValue { + return _objc_msgSend_725(this.pointer, _sel_booleanValue); + } + + int get enumCodeValue { + return _objc_msgSend_704(this.pointer, _sel_enumCodeValue); + } + + int get int32Value { + return _objc_msgSend_264(this.pointer, _sel_int32Value); + } + + double get doubleValue { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_doubleValue) + : _objc_msgSend_115(this.pointer, _sel_doubleValue); + } + + int get typeCodeValue { + return _objc_msgSend_704(this.pointer, _sel_typeCodeValue); } - NSString? get publicID { - final _ret = _objc_msgSend_44(this.pointer, _sel_publicID); + objc.NSString? get stringValue { + final _ret = _objc_msgSend_13(this.pointer, _sel_stringValue); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set publicID(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setPublicID_, value?.pointer ?? ffi.nullptr); + objc.NSDate? get dateValue { + final _ret = _objc_msgSend_116(this.pointer, _sel_dateValue); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSString? get systemID { - final _ret = _objc_msgSend_44(this.pointer, _sel_systemID); + objc.NSURL? get fileURLValue { + final _ret = _objc_msgSend_10(this.pointer, _sel_fileURLValue); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - set systemID(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setSystemID_, value?.pointer ?? ffi.nullptr); + int get eventClass { + return _objc_msgSend_704(this.pointer, _sel_eventClass); } - NSString? get notationName { - final _ret = _objc_msgSend_44(this.pointer, _sel_notationName); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + int get eventID { + return _objc_msgSend_704(this.pointer, _sel_eventID); } - set notationName(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setNotationName_, value?.pointer ?? ffi.nullptr); + int get returnID { + return _objc_msgSend_726(this.pointer, _sel_returnID); } - @override - NSXMLDTDNode initWithKind_(int kind) { - final _ret = _objc_msgSend_1105(this.pointer, _sel_initWithKind_, kind); - return NSXMLDTDNode._(_ret, retain: true, release: true); + int get transactionID { + return _objc_msgSend_264(this.pointer, _sel_transactionID); } - static NSObject document() { - final _ret = _objc_msgSend_2(_class_NSXMLDTDNode, _sel_document); - return NSObject._(_ret, retain: true, release: true); + void setParamDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_727(this.pointer, _sel_setParamDescriptor_forKeyword_, + descriptor.pointer, keyword); } - static NSObject documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_1107( - _class_NSXMLDTDNode, _sel_documentWithRootElement_, element.pointer); - return NSObject._(_ret, retain: true, release: true); + NSAppleEventDescriptor? paramDescriptorForKeyword_(int keyword) { + final _ret = _objc_msgSend_728( + this.pointer, _sel_paramDescriptorForKeyword_, keyword); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject elementWithName_(NSString name) { - final _ret = _objc_msgSend_31( - _class_NSXMLDTDNode, _sel_elementWithName_, name.pointer); - return NSObject._(_ret, retain: true, release: true); + void removeParamDescriptorWithKeyword_(int keyword) { + _objc_msgSend_729( + this.pointer, _sel_removeParamDescriptorWithKeyword_, keyword); } - static NSObject elementWithName_URI_(NSString name, NSString URI) { - final _ret = _objc_msgSend_1108(_class_NSXMLDTDNode, - _sel_elementWithName_URI_, name.pointer, URI.pointer); - return NSObject._(_ret, retain: true, release: true); + void setAttributeDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_727(this.pointer, _sel_setAttributeDescriptor_forKeyword_, + descriptor.pointer, keyword); } - static NSObject elementWithName_stringValue_(NSString name, NSString string) { - final _ret = _objc_msgSend_1108(_class_NSXMLDTDNode, - _sel_elementWithName_stringValue_, name.pointer, string.pointer); - return NSObject._(_ret, retain: true, release: true); + NSAppleEventDescriptor? attributeDescriptorForKeyword_(int keyword) { + final _ret = _objc_msgSend_728( + this.pointer, _sel_attributeDescriptorForKeyword_, keyword); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject elementWithName_children_attributes_( - NSString name, NSArray? children, NSArray? attributes) { - final _ret = _objc_msgSend_1109( - _class_NSXMLDTDNode, - _sel_elementWithName_children_attributes_, - name.pointer, - children?.pointer ?? ffi.nullptr, - attributes?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); + NSAppleEventDescriptor? sendEventWithOptions_timeout_error_( + int sendOptions, + double timeoutInSeconds, + ffi.Pointer> error) { + final _ret = _objc_msgSend_730( + this.pointer, + _sel_sendEventWithOptions_timeout_error_, + sendOptions, + timeoutInSeconds, + error); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject attributeWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLDTDNode, - _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + bool get isRecordDescriptor { + return _objc_msgSend_7(this.pointer, _sel_isRecordDescriptor); } - static NSObject attributeWithName_URI_stringValue_( - NSString name, NSString URI, NSString stringValue) { - final _ret = _objc_msgSend_1074( - _class_NSXMLDTDNode, - _sel_attributeWithName_URI_stringValue_, - name.pointer, - URI.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + int get numberOfItems { + return _objc_msgSend_114(this.pointer, _sel_numberOfItems); } - static NSObject namespaceWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLDTDNode, - _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + void insertDescriptor_atIndex_(NSAppleEventDescriptor descriptor, int index) { + _objc_msgSend_731(this.pointer, _sel_insertDescriptor_atIndex_, + descriptor.pointer, index); } - static NSObject processingInstructionWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108( - _class_NSXMLDTDNode, - _sel_processingInstructionWithName_stringValue_, - name.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + NSAppleEventDescriptor? descriptorAtIndex_(int index) { + final _ret = + _objc_msgSend_732(this.pointer, _sel_descriptorAtIndex_, index); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject commentWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLDTDNode, _sel_commentWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + void removeDescriptorAtIndex_(int index) { + _objc_msgSend_135(this.pointer, _sel_removeDescriptorAtIndex_, index); } - static NSObject textWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLDTDNode, _sel_textWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + void setDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_727(this.pointer, _sel_setDescriptor_forKeyword_, + descriptor.pointer, keyword); } - static NSObject? DTDNodeWithXMLString_(NSString string) { - final _ret = _objc_msgSend_38( - _class_NSXMLDTDNode, _sel_DTDNodeWithXMLString_, string.pointer); + NSAppleEventDescriptor? descriptorForKeyword_(int keyword) { + final _ret = + _objc_msgSend_728(this.pointer, _sel_descriptorForKeyword_, keyword); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSString localNameForName_(NSString name) { - final _ret = _objc_msgSend_69( - _class_NSXMLDTDNode, _sel_localNameForName_, name.pointer); - return NSString._(_ret, retain: true, release: true); + void removeDescriptorWithKeyword_(int keyword) { + _objc_msgSend_729(this.pointer, _sel_removeDescriptorWithKeyword_, keyword); } - static NSString? prefixForName_(NSString name) { - final _ret = _objc_msgSend_186( - _class_NSXMLDTDNode, _sel_prefixForName_, name.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + int keywordForDescriptorAtIndex_(int index) { + return _objc_msgSend_733( + this.pointer, _sel_keywordForDescriptorAtIndex_, index); } - static NSXMLNode? predefinedNamespaceForPrefix_(NSString name) { - final _ret = _objc_msgSend_1124( - _class_NSXMLDTDNode, _sel_predefinedNamespaceForPrefix_, name.pointer); + NSAppleEventDescriptor? coerceToDescriptorType_(int descriptorType) { + final _ret = _objc_msgSend_728( + this.pointer, _sel_coerceToDescriptorType_, descriptorType); return _ret.address == 0 ? null - : NSXMLNode._(_ret, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTDNode new1() { - final _ret = _objc_msgSend_2(_class_NSXMLDTDNode, _sel_new); - return NSXMLDTDNode._(_ret, retain: false, release: true); + @override + NSAppleEventDescriptor init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTDNode allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSXMLDTDNode, _sel_allocWithZone_, zone); - return NSXMLDTDNode._(_ret, retain: false, release: true); + static NSAppleEventDescriptor new1() { + final _ret = _objc_msgSend_40(_class_NSAppleEventDescriptor, _sel_new); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } - static NSXMLDTDNode alloc() { - final _ret = _objc_msgSend_2(_class_NSXMLDTDNode, _sel_alloc); - return NSXMLDTDNode._(_ret, retain: false, release: true); + static NSAppleEventDescriptor allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSAppleEventDescriptor, _sel_allocWithZone_, zone); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); + } + + static NSAppleEventDescriptor alloc() { + final _ret = _objc_msgSend_40(_class_NSAppleEventDescriptor, _sel_alloc); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSXMLDTDNode, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSAppleEventDescriptor, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSXMLDTDNode, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSAppleEventDescriptor, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSXMLDTDNode, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSAppleEventDescriptor, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSXMLDTDNode, _sel_useStoredAccessor); + return _objc_msgSend_7( + _class_NSAppleEventDescriptor, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSXMLDTDNode, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSAppleEventDescriptor, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSXMLDTDNode, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSAppleEventDescriptor, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSXMLDTDNode, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSAppleEventDescriptor, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSXMLDTDNode, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSAppleEventDescriptor, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSXMLDTDNode, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSAppleEventDescriptor, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSXMLDTDNode = objc.getClass("NSXMLDTDNode"); -late final _sel_initWithXMLString_ = objc.registerName("initWithXMLString:"); +late final _class_NSAppleEventDescriptor = + objc.getClass("NSAppleEventDescriptor"); +late final _sel_nullDescriptor = objc.registerName("nullDescriptor"); +final _objc_msgSend_709 = 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_710 = 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_711 = 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_712 = 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_713 = 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_714 = 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_715 = 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_716 = 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_717 = 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_718 = 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_719 = 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:"); -abstract class NSXMLDTDNodeKind { - static const int NSXMLEntityGeneralKind = 1; - static const int NSXMLEntityParsedKind = 2; - static const int NSXMLEntityUnparsedKind = 3; - static const int NSXMLEntityParameterKind = 4; - static const int NSXMLEntityPredefined = 5; - static const int NSXMLAttributeCDATAKind = 6; - static const int NSXMLAttributeIDKind = 7; - static const int NSXMLAttributeIDRefKind = 8; - static const int NSXMLAttributeIDRefsKind = 9; - static const int NSXMLAttributeEntityKind = 10; - static const int NSXMLAttributeEntitiesKind = 11; - static const int NSXMLAttributeNMTokenKind = 12; - static const int NSXMLAttributeNMTokensKind = 13; - static const int NSXMLAttributeEnumerationKind = 14; - static const int NSXMLAttributeNotationKind = 15; - static const int NSXMLElementDeclarationUndefinedKind = 16; - static const int NSXMLElementDeclarationEmptyKind = 17; - static const int NSXMLElementDeclarationAnyKind = 18; - static const int NSXMLElementDeclarationMixedKind = 19; - static const int NSXMLElementDeclarationElementKind = 20; +@ffi.Packed(2) +final class AEDesc extends ffi.Struct { + @ffi.UnsignedInt() + external int descriptorType; + + external ffi.Pointer> dataHandle; } -late final _sel_DTDKind = objc.registerName("DTDKind"); -final _objc_msgSend_1122 = objc.msgSendPointer +final class OpaqueAEDataStorageType extends ffi.Opaque {} + +late final _sel_initWithAEDescNoCopy_ = + objc.registerName("initWithAEDescNoCopy:"); +final _objc_msgSend_720 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + 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_721 = 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_722 = 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_723 = 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_724 = 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_725 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedChar Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDTDKind_ = objc.registerName("setDTDKind:"); -final _objc_msgSend_1123 = objc.msgSendPointer +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_726 = 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_727 = 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:"); +final _objc_msgSend_728 = 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_729 = 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:"); + +abstract class NSAppleEventSendOptions { + static const int NSAppleEventSendNoReply = 1; + static const int NSAppleEventSendQueueReply = 2; + static const int NSAppleEventSendWaitForReply = 3; + static const int NSAppleEventSendNeverInteract = 16; + static const int NSAppleEventSendCanInteract = 32; + static const int NSAppleEventSendAlwaysInteract = 48; + static const int NSAppleEventSendCanSwitchLayer = 64; + static const int NSAppleEventSendDontRecord = 4096; + static const int NSAppleEventSendDontExecute = 8192; + static const int NSAppleEventSendDontAnnotate = 65536; + static const int NSAppleEventSendDefaultOptions = 35; +} + +late final _sel_sendEventWithOptions_timeout_error_ = + objc.registerName("sendEventWithOptions:timeout:error:"); +final _objc_msgSend_730 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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_731 = 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_732 = 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_733 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() .asFunction< - void Function(ffi.Pointer, + int 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_1124 = objc.msgSendPointer +late final _sel_coerceToDescriptorType_ = + objc.registerName("coerceToDescriptorType:"); +late final _sel_objectSpecifierWithDescriptor_ = + objc.registerName("objectSpecifierWithDescriptor:"); +final _objc_msgSend_734 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -58780,42 +36621,42 @@ final _objc_msgSend_1124 = objc.msgSendPointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_entityDeclarationForName_ = - objc.registerName("entityDeclarationForName:"); -final _objc_msgSend_1125 = objc.msgSendPointer +late final _sel_initWithContainerSpecifier_key_ = + objc.registerName("initWithContainerSpecifier:key:"); +final _objc_msgSend_735 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, 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_1126 = objc.msgSendPointer + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithContainerClassDescription_containerSpecifier_key_ = objc + .registerName("initWithContainerClassDescription:containerSpecifier:key:"); +final _objc_msgSend_736 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( 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_predefinedEntityDeclarationForName_ = - objc.registerName("predefinedEntityDeclarationForName:"); -late final _sel_DTD = objc.registerName("DTD"); -final _objc_msgSend_1127 = objc.msgSendPointer +late final _sel_childSpecifier = objc.registerName("childSpecifier"); +final _objc_msgSend_737 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -58823,8 +36664,8 @@ final _objc_msgSend_1127 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDTD_ = objc.registerName("setDTD:"); -final _objc_msgSend_1128 = objc.msgSendPointer +late final _sel_setChildSpecifier_ = objc.registerName("setChildSpecifier:"); +final _objc_msgSend_738 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -58834,8 +36675,24 @@ final _objc_msgSend_1128 = objc.msgSendPointer .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_setRootElement_ = objc.registerName("setRootElement:"); -final _objc_msgSend_1129 = objc.msgSendPointer +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_739 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -58845,83 +36702,87 @@ final _objc_msgSend_1129 = objc.msgSendPointer .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_rootElement = objc.registerName("rootElement"); -final _objc_msgSend_1130 = 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_1131 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_objectByApplyingXSLT_arguments_error_ = - objc.registerName("objectByApplyingXSLT:arguments:error:"); -final _objc_msgSend_1132 = objc.msgSendPointer +late final _sel_keyClassDescription = objc.registerName("keyClassDescription"); +late final _sel_indicesOfObjectsByEvaluatingWithContainer_count_ = + objc.registerName("indicesOfObjectsByEvaluatingWithContainer:count:"); +final _objc_msgSend_740 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + 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_1133 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_objectsByEvaluatingWithContainers_ = + objc.registerName("objectsByEvaluatingWithContainers:"); +final _objc_msgSend_741 = 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)>(); +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_742 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(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_1134 = objc.msgSendPointer + 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_743 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void 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_validateAndReturnError_ = - objc.registerName("validateAndReturnError:"); -late final _sel_rootDocument = objc.registerName("rootDocument"); -final _objc_msgSend_1135 = objc.msgSendPointer + 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_744 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -58929,8 +36790,13 @@ final _objc_msgSend_1135 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_parent = objc.registerName("parent"); -final _objc_msgSend_1136 = objc.msgSendPointer +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_745 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -58938,160 +36804,89 @@ final _objc_msgSend_1136 = objc.msgSendPointer .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_1137 = 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_1138 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_canonicalXMLStringPreservingComments_ = - objc.registerName("canonicalXMLStringPreservingComments:"); -final _objc_msgSend_1139 = objc.msgSendPointer +late final _sel_createCommandInstanceWithZone_ = + objc.registerName("createCommandInstanceWithZone:"); +final _objc_msgSend_746 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>() + ffi.Pointer, ffi.Pointer<_NSZone>)>>() .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_1140 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer<_NSZone>)>(); +late final _sel_supportsCommand_ = objc.registerName("supportsCommand:"); +final _objc_msgSend_747 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool 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_objectsForXQuery_error_ = - objc.registerName("objectsForXQuery:error:"); -late final _sel_initWithName_URI_ = objc.registerName("initWithName:URI:"); -final _objc_msgSend_1141 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_selectorForCommand_ = objc.registerName("selectorForCommand:"); +final _objc_msgSend_748 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer 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:"); -late final _sel_elementsForName_ = objc.registerName("elementsForName:"); -late final _sel_elementsForLocalName_URI_ = - objc.registerName("elementsForLocalName:URI:"); -final _objc_msgSend_1142 = objc.msgSendPointer + 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_749 = 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_addAttribute_ = objc.registerName("addAttribute:"); -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_attributeForName_ = objc.registerName("attributeForName:"); -late final _sel_attributeForLocalName_URI_ = - objc.registerName("attributeForLocalName:URI:"); -final _objc_msgSend_1143 = objc.msgSendPointer + 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_750 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() .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:"); -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:"); + 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:"); -class AVAudioSession extends NSObject { +class AVAudioSession extends objc.NSObject { AVAudioSession._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [AVAudioSession] that points to the same underlying object as [other]. - static AVAudioSession castFrom(T other) { - return AVAudioSession._(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.pointer, retain: true, release: true); - /// Returns a [AVAudioSession] that wraps the given raw object pointer. - static AVAudioSession castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return AVAudioSession._(other, retain: retain, release: release); - } + /// 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) { @@ -59100,45 +36895,43 @@ class AVAudioSession extends NSObject { } static AVAudioSession sharedInstance() { - final _ret = _objc_msgSend_1144(_class_AVAudioSession, _sel_sharedInstance); - return AVAudioSession._(_ret, retain: true, release: true); + final _ret = _objc_msgSend_751(_class_AVAudioSession, _sel_sharedInstance); + return AVAudioSession.castFromPointer(_ret, retain: true, release: true); } - NSArray get availableCategories { - final _ret = _objc_msgSend_85(this.pointer, _sel_availableCategories); - return NSArray._(_ret, retain: true, release: true); + objc.NSArray get availableCategories { + final _ret = _objc_msgSend_6(this.pointer, _sel_availableCategories); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool setCategory_error_( - NSString category, ffi.Pointer> outError) { - return _objc_msgSend_447( + bool setCategory_error_(objc.NSString category, + ffi.Pointer> outError) { + return _objc_msgSend_285( this.pointer, _sel_setCategory_error_, category.pointer, outError); } - bool setCategory_withOptions_error_(NSString category, int options, + bool setCategory_withOptions_error_(objc.NSString category, int options, ffi.Pointer> outError) { - return _objc_msgSend_1145(this.pointer, _sel_setCategory_withOptions_error_, + return _objc_msgSend_752(this.pointer, _sel_setCategory_withOptions_error_, category.pointer, options, outError); } - bool setCategory_mode_options_error_(NSString category, NSString mode, - int options, ffi.Pointer> outError) { - return _objc_msgSend_1146( - this.pointer, - _sel_setCategory_mode_options_error_, - category.pointer, - mode.pointer, - options, - outError); + bool setCategory_mode_options_error_( + objc.NSString category, + objc.NSString mode, + int options, + ffi.Pointer> outError) { + return _objc_msgSend_753(this.pointer, _sel_setCategory_mode_options_error_, + category.pointer, mode.pointer, options, outError); } bool setCategory_mode_routeSharingPolicy_options_error_( - NSString category, - NSString mode, + objc.NSString category, + objc.NSString mode, int policy, int options, ffi.Pointer> outError) { - return _objc_msgSend_1147( + return _objc_msgSend_754( this.pointer, _sel_setCategory_mode_routeSharingPolicy_options_error_, category.pointer, @@ -59148,38 +36941,38 @@ class AVAudioSession extends NSObject { outError); } - NSString get category { - final _ret = _objc_msgSend_21(this.pointer, _sel_category); - return NSString._(_ret, retain: true, release: true); + objc.NSString get category { + final _ret = _objc_msgSend_12(this.pointer, _sel_category); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } int get categoryOptions { - return _objc_msgSend_1148(this.pointer, _sel_categoryOptions); + return _objc_msgSend_755(this.pointer, _sel_categoryOptions); } int get routeSharingPolicy { - return _objc_msgSend_1149(this.pointer, _sel_routeSharingPolicy); + return _objc_msgSend_756(this.pointer, _sel_routeSharingPolicy); } - NSArray get availableModes { - final _ret = _objc_msgSend_85(this.pointer, _sel_availableModes); - return NSArray._(_ret, retain: true, release: true); + objc.NSArray get availableModes { + final _ret = _objc_msgSend_6(this.pointer, _sel_availableModes); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } bool setMode_error_( - NSString mode, ffi.Pointer> outError) { - return _objc_msgSend_447( + objc.NSString mode, ffi.Pointer> outError) { + return _objc_msgSend_285( this.pointer, _sel_setMode_error_, mode.pointer, outError); } - NSString get mode { - final _ret = _objc_msgSend_21(this.pointer, _sel_mode); - return NSString._(_ret, retain: true, release: true); + objc.NSString get mode { + final _ret = _objc_msgSend_12(this.pointer, _sel_mode); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } bool setAllowHapticsAndSystemSoundsDuringRecording_error_( bool inValue, ffi.Pointer> outError) { - return _objc_msgSend_1150( + return _objc_msgSend_757( this.pointer, _sel_setAllowHapticsAndSystemSoundsDuringRecording_error_, inValue, @@ -59187,41 +36980,42 @@ class AVAudioSession extends NSObject { } bool get allowHapticsAndSystemSoundsDuringRecording { - return _objc_msgSend_12( + return _objc_msgSend_7( this.pointer, _sel_allowHapticsAndSystemSoundsDuringRecording); } int get recordPermission { - return _objc_msgSend_1151(this.pointer, _sel_recordPermission); + return _objc_msgSend_758(this.pointer, _sel_recordPermission); } void requestRecordPermission_(ObjCBlock_ffiVoid_bool response) { - _objc_msgSend_1152( + _objc_msgSend_759( this.pointer, _sel_requestRecordPermission_, response.pointer); } bool overrideOutputAudioPort_error_( int portOverride, ffi.Pointer> outError) { - return _objc_msgSend_1153(this.pointer, _sel_overrideOutputAudioPort_error_, + return _objc_msgSend_760(this.pointer, _sel_overrideOutputAudioPort_error_, portOverride, outError); } bool setPreferredInput_error_(AVAudioSessionPortDescription? inPort, ffi.Pointer> outError) { - return _objc_msgSend_1157(this.pointer, _sel_setPreferredInput_error_, + return _objc_msgSend_764(this.pointer, _sel_setPreferredInput_error_, inPort?.pointer ?? ffi.nullptr, outError); } AVAudioSessionPortDescription? get preferredInput { - final _ret = _objc_msgSend_1158(this.pointer, _sel_preferredInput); + final _ret = _objc_msgSend_765(this.pointer, _sel_preferredInput); return _ret.address == 0 ? null - : AVAudioSessionPortDescription._(_ret, retain: true, release: true); + : AVAudioSessionPortDescription.castFromPointer(_ret, + retain: true, release: true); } bool setPrefersNoInterruptionsFromSystemAlerts_error_( bool inValue, ffi.Pointer> outError) { - return _objc_msgSend_1150( + return _objc_msgSend_757( this.pointer, _sel_setPrefersNoInterruptionsFromSystemAlerts_error_, inValue, @@ -59229,335 +37023,337 @@ class AVAudioSession extends NSObject { } bool get prefersNoInterruptionsFromSystemAlerts { - return _objc_msgSend_12( + return _objc_msgSend_7( this.pointer, _sel_prefersNoInterruptionsFromSystemAlerts); } int get renderingMode { - return _objc_msgSend_1159(this.pointer, _sel_renderingMode); + return _objc_msgSend_766(this.pointer, _sel_renderingMode); } bool setActive_error_( bool active, ffi.Pointer> outError) { - return _objc_msgSend_1150( + return _objc_msgSend_757( this.pointer, _sel_setActive_error_, active, outError); } bool setActive_withOptions_error_(bool active, int options, ffi.Pointer> outError) { - return _objc_msgSend_1160(this.pointer, _sel_setActive_withOptions_error_, + return _objc_msgSend_767(this.pointer, _sel_setActive_withOptions_error_, active, options, outError); } void activateWithOptions_completionHandler_( int options, ObjCBlock_ffiVoid_bool_NSError handler) { - _objc_msgSend_1161(this.pointer, - _sel_activateWithOptions_completionHandler_, options, handler.pointer); + _objc_msgSend_768(this.pointer, _sel_activateWithOptions_completionHandler_, + options, handler.pointer); } bool setPreferredSampleRate_error_( double sampleRate, ffi.Pointer> outError) { - return _objc_msgSend_1162( + return _objc_msgSend_769( this.pointer, _sel_setPreferredSampleRate_error_, sampleRate, outError); } double get preferredSampleRate { return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_preferredSampleRate) - : _objc_msgSend_165(this.pointer, _sel_preferredSampleRate); + ? _objc_msgSend_115Fpret(this.pointer, _sel_preferredSampleRate) + : _objc_msgSend_115(this.pointer, _sel_preferredSampleRate); } bool setPreferredIOBufferDuration_error_( double duration, ffi.Pointer> outError) { - return _objc_msgSend_1162(this.pointer, + return _objc_msgSend_769(this.pointer, _sel_setPreferredIOBufferDuration_error_, duration, outError); } double get preferredIOBufferDuration { return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_preferredIOBufferDuration) - : _objc_msgSend_165(this.pointer, _sel_preferredIOBufferDuration); + ? _objc_msgSend_115Fpret(this.pointer, _sel_preferredIOBufferDuration) + : _objc_msgSend_115(this.pointer, _sel_preferredIOBufferDuration); } bool setPreferredInputNumberOfChannels_error_( int count, ffi.Pointer> outError) { - return _objc_msgSend_1163(this.pointer, + return _objc_msgSend_770(this.pointer, _sel_setPreferredInputNumberOfChannels_error_, count, outError); } int get preferredInputNumberOfChannels { - return _objc_msgSend_83(this.pointer, _sel_preferredInputNumberOfChannels); + return _objc_msgSend_114(this.pointer, _sel_preferredInputNumberOfChannels); } bool setPreferredOutputNumberOfChannels_error_( int count, ffi.Pointer> outError) { - return _objc_msgSend_1163(this.pointer, + return _objc_msgSend_770(this.pointer, _sel_setPreferredOutputNumberOfChannels_error_, count, outError); } int get preferredOutputNumberOfChannels { - return _objc_msgSend_83(this.pointer, _sel_preferredOutputNumberOfChannels); + return _objc_msgSend_114( + this.pointer, _sel_preferredOutputNumberOfChannels); } bool setPreferredInputOrientation_error_( int orientation, ffi.Pointer> outError) { - return _objc_msgSend_1164(this.pointer, + return _objc_msgSend_771(this.pointer, _sel_setPreferredInputOrientation_error_, orientation, outError); } int get preferredInputOrientation { - return _objc_msgSend_1165(this.pointer, _sel_preferredInputOrientation); + return _objc_msgSend_772(this.pointer, _sel_preferredInputOrientation); } int get inputOrientation { - return _objc_msgSend_1165(this.pointer, _sel_inputOrientation); + return _objc_msgSend_772(this.pointer, _sel_inputOrientation); } int get maximumInputNumberOfChannels { - return _objc_msgSend_83(this.pointer, _sel_maximumInputNumberOfChannels); + return _objc_msgSend_114(this.pointer, _sel_maximumInputNumberOfChannels); } int get maximumOutputNumberOfChannels { - return _objc_msgSend_83(this.pointer, _sel_maximumOutputNumberOfChannels); + return _objc_msgSend_114(this.pointer, _sel_maximumOutputNumberOfChannels); } bool setInputGain_error_( double gain, ffi.Pointer> outError) { - return _objc_msgSend_1166( + return _objc_msgSend_773( this.pointer, _sel_setInputGain_error_, gain, outError); } double get inputGain { return objc.useMsgSendVariants - ? _objc_msgSend_239Fpret(this.pointer, _sel_inputGain) - : _objc_msgSend_239(this.pointer, _sel_inputGain); + ? _objc_msgSend_351Fpret(this.pointer, _sel_inputGain) + : _objc_msgSend_351(this.pointer, _sel_inputGain); } bool get inputGainSettable { - return _objc_msgSend_12(this.pointer, _sel_isInputGainSettable); + return _objc_msgSend_7(this.pointer, _sel_isInputGainSettable); } bool get inputAvailable { - return _objc_msgSend_12(this.pointer, _sel_isInputAvailable); + return _objc_msgSend_7(this.pointer, _sel_isInputAvailable); } - NSArray? get inputDataSources { - final _ret = _objc_msgSend_84(this.pointer, _sel_inputDataSources); + objc.NSArray? get inputDataSources { + final _ret = _objc_msgSend_69(this.pointer, _sel_inputDataSources); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } AVAudioSessionDataSourceDescription? get inputDataSource { - final _ret = _objc_msgSend_1155(this.pointer, _sel_inputDataSource); + final _ret = _objc_msgSend_762(this.pointer, _sel_inputDataSource); return _ret.address == 0 ? null - : AVAudioSessionDataSourceDescription._(_ret, + : AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: true, release: true); } bool setInputDataSource_error_( AVAudioSessionDataSourceDescription? dataSource, ffi.Pointer> outError) { - return _objc_msgSend_1156(this.pointer, _sel_setInputDataSource_error_, + return _objc_msgSend_763(this.pointer, _sel_setInputDataSource_error_, dataSource?.pointer ?? ffi.nullptr, outError); } - NSArray? get outputDataSources { - final _ret = _objc_msgSend_84(this.pointer, _sel_outputDataSources); + objc.NSArray? get outputDataSources { + final _ret = _objc_msgSend_69(this.pointer, _sel_outputDataSources); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } AVAudioSessionDataSourceDescription? get outputDataSource { - final _ret = _objc_msgSend_1155(this.pointer, _sel_outputDataSource); + final _ret = _objc_msgSend_762(this.pointer, _sel_outputDataSource); return _ret.address == 0 ? null - : AVAudioSessionDataSourceDescription._(_ret, + : AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: true, release: true); } bool setOutputDataSource_error_( AVAudioSessionDataSourceDescription? dataSource, ffi.Pointer> outError) { - return _objc_msgSend_1156(this.pointer, _sel_setOutputDataSource_error_, + return _objc_msgSend_763(this.pointer, _sel_setOutputDataSource_error_, dataSource?.pointer ?? ffi.nullptr, outError); } double get sampleRate { return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_sampleRate) - : _objc_msgSend_165(this.pointer, _sel_sampleRate); + ? _objc_msgSend_115Fpret(this.pointer, _sel_sampleRate) + : _objc_msgSend_115(this.pointer, _sel_sampleRate); } int get inputNumberOfChannels { - return _objc_msgSend_83(this.pointer, _sel_inputNumberOfChannels); + return _objc_msgSend_114(this.pointer, _sel_inputNumberOfChannels); } int get outputNumberOfChannels { - return _objc_msgSend_83(this.pointer, _sel_outputNumberOfChannels); + return _objc_msgSend_114(this.pointer, _sel_outputNumberOfChannels); } double get inputLatency { return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_inputLatency) - : _objc_msgSend_165(this.pointer, _sel_inputLatency); + ? _objc_msgSend_115Fpret(this.pointer, _sel_inputLatency) + : _objc_msgSend_115(this.pointer, _sel_inputLatency); } double get outputLatency { return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_outputLatency) - : _objc_msgSend_165(this.pointer, _sel_outputLatency); + ? _objc_msgSend_115Fpret(this.pointer, _sel_outputLatency) + : _objc_msgSend_115(this.pointer, _sel_outputLatency); } double get IOBufferDuration { return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_IOBufferDuration) - : _objc_msgSend_165(this.pointer, _sel_IOBufferDuration); + ? _objc_msgSend_115Fpret(this.pointer, _sel_IOBufferDuration) + : _objc_msgSend_115(this.pointer, _sel_IOBufferDuration); } - NSArray get supportedOutputChannelLayouts { + objc.NSArray get supportedOutputChannelLayouts { final _ret = - _objc_msgSend_85(this.pointer, _sel_supportedOutputChannelLayouts); - return NSArray._(_ret, retain: true, release: true); + _objc_msgSend_6(this.pointer, _sel_supportedOutputChannelLayouts); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } bool get otherAudioPlaying { - return _objc_msgSend_12(this.pointer, _sel_isOtherAudioPlaying); + return _objc_msgSend_7(this.pointer, _sel_isOtherAudioPlaying); } bool get secondaryAudioShouldBeSilencedHint { - return _objc_msgSend_12( + return _objc_msgSend_7( this.pointer, _sel_secondaryAudioShouldBeSilencedHint); } double get outputVolume { return objc.useMsgSendVariants - ? _objc_msgSend_239Fpret(this.pointer, _sel_outputVolume) - : _objc_msgSend_239(this.pointer, _sel_outputVolume); + ? _objc_msgSend_351Fpret(this.pointer, _sel_outputVolume) + : _objc_msgSend_351(this.pointer, _sel_outputVolume); } int get promptStyle { - return _objc_msgSend_1167(this.pointer, _sel_promptStyle); + return _objc_msgSend_774(this.pointer, _sel_promptStyle); } - NSArray? get availableInputs { - final _ret = _objc_msgSend_84(this.pointer, _sel_availableInputs); + objc.NSArray? get availableInputs { + final _ret = _objc_msgSend_69(this.pointer, _sel_availableInputs); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } AVAudioSessionRouteDescription get currentRoute { - final _ret = _objc_msgSend_1168(this.pointer, _sel_currentRoute); - return AVAudioSessionRouteDescription._(_ret, retain: true, release: true); + final _ret = _objc_msgSend_775(this.pointer, _sel_currentRoute); + return AVAudioSessionRouteDescription.castFromPointer(_ret, + retain: true, release: true); } bool setAggregatedIOPreference_error_( int inIOType, ffi.Pointer> outError) { - return _objc_msgSend_1169(this.pointer, + return _objc_msgSend_776(this.pointer, _sel_setAggregatedIOPreference_error_, inIOType, outError); } bool setSupportsMultichannelContent_error_( bool inValue, ffi.Pointer> outError) { - return _objc_msgSend_1150(this.pointer, + return _objc_msgSend_757(this.pointer, _sel_setSupportsMultichannelContent_error_, inValue, outError); } bool get supportsMultichannelContent { - return _objc_msgSend_12(this.pointer, _sel_supportsMultichannelContent); + return _objc_msgSend_7(this.pointer, _sel_supportsMultichannelContent); } bool setPrefersInterruptionOnRouteDisconnect_error_( bool inValue, ffi.Pointer> outError) { - return _objc_msgSend_1150(this.pointer, + return _objc_msgSend_757(this.pointer, _sel_setPrefersInterruptionOnRouteDisconnect_error_, inValue, outError); } bool get prefersInterruptionOnRouteDisconnect { - return _objc_msgSend_12( + return _objc_msgSend_7( this.pointer, _sel_prefersInterruptionOnRouteDisconnect); } - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set delegate(NSObject? value) { - return _objc_msgSend_416( + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } @override AVAudioSession init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return AVAudioSession._(_ret, retain: true, release: true); + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return AVAudioSession.castFromPointer(_ret, retain: true, release: true); } bool setActive_withFlags_error_(bool active, int flags, ffi.Pointer> outError) { - return _objc_msgSend_1170( + return _objc_msgSend_777( this.pointer, _sel_setActive_withFlags_error_, active, flags, outError); } bool get inputIsAvailable { - return _objc_msgSend_12(this.pointer, _sel_inputIsAvailable); + return _objc_msgSend_7(this.pointer, _sel_inputIsAvailable); } double get currentHardwareSampleRate { return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_currentHardwareSampleRate) - : _objc_msgSend_165(this.pointer, _sel_currentHardwareSampleRate); + ? _objc_msgSend_115Fpret(this.pointer, _sel_currentHardwareSampleRate) + : _objc_msgSend_115(this.pointer, _sel_currentHardwareSampleRate); } int get currentHardwareInputNumberOfChannels { - return _objc_msgSend_83( + return _objc_msgSend_114( this.pointer, _sel_currentHardwareInputNumberOfChannels); } int get currentHardwareOutputNumberOfChannels { - return _objc_msgSend_83( + return _objc_msgSend_114( this.pointer, _sel_currentHardwareOutputNumberOfChannels); } bool setPreferredHardwareSampleRate_error_( double sampleRate, ffi.Pointer> outError) { - return _objc_msgSend_1162(this.pointer, + return _objc_msgSend_769(this.pointer, _sel_setPreferredHardwareSampleRate_error_, sampleRate, outError); } double get preferredHardwareSampleRate { return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_preferredHardwareSampleRate) - : _objc_msgSend_165(this.pointer, _sel_preferredHardwareSampleRate); + ? _objc_msgSend_115Fpret(this.pointer, _sel_preferredHardwareSampleRate) + : _objc_msgSend_115(this.pointer, _sel_preferredHardwareSampleRate); } static AVAudioSession new1() { - final _ret = _objc_msgSend_2(_class_AVAudioSession, _sel_new); - return AVAudioSession._(_ret, retain: false, release: true); + final _ret = _objc_msgSend_40(_class_AVAudioSession, _sel_new); + return AVAudioSession.castFromPointer(_ret, retain: false, release: true); } static AVAudioSession allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_AVAudioSession, _sel_allocWithZone_, zone); - return AVAudioSession._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_AVAudioSession, _sel_allocWithZone_, zone); + return AVAudioSession.castFromPointer(_ret, retain: false, release: true); } static AVAudioSession alloc() { - final _ret = _objc_msgSend_2(_class_AVAudioSession, _sel_alloc); - return AVAudioSession._(_ret, retain: false, release: true); + final _ret = _objc_msgSend_40(_class_AVAudioSession, _sel_alloc); + return AVAudioSession.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( + objc.NSObject? anArgument) { + _objc_msgSend_48( _class_AVAudioSession, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, @@ -59565,56 +37361,56 @@ class AVAudioSession extends NSObject { anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_AVAudioSession, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_AVAudioSession, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( + return _objc_msgSend_7( _class_AVAudioSession, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_AVAudioSession, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_AVAudioSession, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_AVAudioSession, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_AVAudioSession, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_AVAudioSession, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_AVAudioSession, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( _class_AVAudioSession, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( _class_AVAudioSession, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_AVAudioSession, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_AVAudioSession, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } late final _class_AVAudioSession = objc.getClass("AVAudioSession"); late final _sel_sharedInstance = objc.registerName("sharedInstance"); -final _objc_msgSend_1144 = objc.msgSendPointer +final _objc_msgSend_751 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -59640,7 +37436,7 @@ abstract class AVAudioSessionCategoryOptions { late final _sel_setCategory_withOptions_error_ = objc.registerName("setCategory:withOptions:error:"); -final _objc_msgSend_1145 = objc.msgSendPointer +final _objc_msgSend_752 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -59658,7 +37454,7 @@ final _objc_msgSend_1145 = objc.msgSendPointer ffi.Pointer>)>(); late final _sel_setCategory_mode_options_error_ = objc.registerName("setCategory:mode:options:error:"); -final _objc_msgSend_1146 = objc.msgSendPointer +final _objc_msgSend_753 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -59687,7 +37483,7 @@ abstract class AVAudioSessionRouteSharingPolicy { late final _sel_setCategory_mode_routeSharingPolicy_options_error_ = objc.registerName("setCategory:mode:routeSharingPolicy:options:error:"); -final _objc_msgSend_1147 = objc.msgSendPointer +final _objc_msgSend_754 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -59709,7 +37505,7 @@ final _objc_msgSend_1147 = objc.msgSendPointer ffi.Pointer>)>(); late final _sel_category = objc.registerName("category"); late final _sel_categoryOptions = objc.registerName("categoryOptions"); -final _objc_msgSend_1148 = objc.msgSendPointer +final _objc_msgSend_755 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -59718,7 +37514,7 @@ final _objc_msgSend_1148 = objc.msgSendPointer int Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_routeSharingPolicy = objc.registerName("routeSharingPolicy"); -final _objc_msgSend_1149 = objc.msgSendPointer +final _objc_msgSend_756 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -59731,7 +37527,7 @@ 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_1150 = objc.msgSendPointer +final _objc_msgSend_757 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -59755,7 +37551,7 @@ abstract class AVAudioSessionRecordPermission { } late final _sel_recordPermission = objc.registerName("recordPermission"); -final _objc_msgSend_1151 = objc.msgSendPointer +final _objc_msgSend_758 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -59765,7 +37561,7 @@ final _objc_msgSend_1151 = objc.msgSendPointer ffi.Pointer, ffi.Pointer)>(); late final _sel_requestRecordPermission_ = objc.registerName("requestRecordPermission:"); -final _objc_msgSend_1152 = objc.msgSendPointer +final _objc_msgSend_759 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, @@ -59781,7 +37577,7 @@ abstract class AVAudioSessionPortOverride { late final _sel_overrideOutputAudioPort_error_ = objc.registerName("overrideOutputAudioPort:error:"); -final _objc_msgSend_1153 = objc.msgSendPointer +final _objc_msgSend_760 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -59796,26 +37592,21 @@ final _objc_msgSend_1153 = objc.msgSendPointer int, ffi.Pointer>)>(); -class AVAudioSessionPortDescription extends NSObject { +class AVAudioSessionPortDescription extends objc.NSObject { AVAudioSessionPortDescription._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [AVAudioSessionPortDescription] that points to the same underlying object as [other]. - static AVAudioSessionPortDescription castFrom( - T other) { - return AVAudioSessionPortDescription._(other.pointer, - retain: true, release: true); - } + /// Constructs a [AVAudioSessionPortDescription] that points to the same underlying object as [other]. + AVAudioSessionPortDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [AVAudioSessionPortDescription] that wraps the given raw object pointer. - static AVAudioSessionPortDescription castFromPointer( + /// Constructs a [AVAudioSessionPortDescription] that wraps the given raw object pointer. + AVAudioSessionPortDescription.castFromPointer( ffi.Pointer other, {bool retain = false, - bool release = false}) { - return AVAudioSessionPortDescription._(other, - retain: retain, release: release); - } + bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [AVAudioSessionPortDescription]. static bool isInstance(objc.ObjCObjectBase obj) { @@ -59823,96 +37614,100 @@ class AVAudioSessionPortDescription extends NSObject { obj.pointer, _sel_isKindOfClass_, _class_AVAudioSessionPortDescription); } - NSString get portType { - final _ret = _objc_msgSend_21(this.pointer, _sel_portType); - return NSString._(_ret, retain: true, release: true); + objc.NSString get portType { + final _ret = _objc_msgSend_12(this.pointer, _sel_portType); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString get portName { - final _ret = _objc_msgSend_21(this.pointer, _sel_portName); - return NSString._(_ret, retain: true, release: true); + objc.NSString get portName { + final _ret = _objc_msgSend_12(this.pointer, _sel_portName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString get UID { - final _ret = _objc_msgSend_21(this.pointer, _sel_UID); - return NSString._(_ret, retain: true, release: true); + objc.NSString get UID { + final _ret = _objc_msgSend_12(this.pointer, _sel_UID); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } bool get hasHardwareVoiceCallProcessing { - return _objc_msgSend_12(this.pointer, _sel_hasHardwareVoiceCallProcessing); + return _objc_msgSend_7(this.pointer, _sel_hasHardwareVoiceCallProcessing); } bool get spatialAudioEnabled { - return _objc_msgSend_12(this.pointer, _sel_isSpatialAudioEnabled); + return _objc_msgSend_7(this.pointer, _sel_isSpatialAudioEnabled); } - NSArray? get channels { - final _ret = _objc_msgSend_84(this.pointer, _sel_channels); + objc.NSArray? get channels { + final _ret = _objc_msgSend_69(this.pointer, _sel_channels); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSArray? get dataSources { - final _ret = _objc_msgSend_84(this.pointer, _sel_dataSources); + objc.NSArray? get dataSources { + final _ret = _objc_msgSend_69(this.pointer, _sel_dataSources); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } AVAudioSessionDataSourceDescription? get selectedDataSource { - final _ret = _objc_msgSend_1155(this.pointer, _sel_selectedDataSource); + final _ret = _objc_msgSend_762(this.pointer, _sel_selectedDataSource); return _ret.address == 0 ? null - : AVAudioSessionDataSourceDescription._(_ret, + : AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: true, release: true); } AVAudioSessionDataSourceDescription? get preferredDataSource { - final _ret = _objc_msgSend_1155(this.pointer, _sel_preferredDataSource); + final _ret = _objc_msgSend_762(this.pointer, _sel_preferredDataSource); return _ret.address == 0 ? null - : AVAudioSessionDataSourceDescription._(_ret, + : AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: true, release: true); } bool setPreferredDataSource_error_( AVAudioSessionDataSourceDescription? dataSource, ffi.Pointer> outError) { - return _objc_msgSend_1156(this.pointer, _sel_setPreferredDataSource_error_, + return _objc_msgSend_763(this.pointer, _sel_setPreferredDataSource_error_, dataSource?.pointer ?? ffi.nullptr, outError); } @override AVAudioSessionPortDescription init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return AVAudioSessionPortDescription._(_ret, retain: true, release: true); + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return AVAudioSessionPortDescription.castFromPointer(_ret, + retain: true, release: true); } static AVAudioSessionPortDescription new1() { final _ret = - _objc_msgSend_2(_class_AVAudioSessionPortDescription, _sel_new); - return AVAudioSessionPortDescription._(_ret, retain: false, release: true); + _objc_msgSend_40(_class_AVAudioSessionPortDescription, _sel_new); + return AVAudioSessionPortDescription.castFromPointer(_ret, + retain: false, release: true); } static AVAudioSessionPortDescription allocWithZone_( ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( + final _ret = _objc_msgSend_47( _class_AVAudioSessionPortDescription, _sel_allocWithZone_, zone); - return AVAudioSessionPortDescription._(_ret, retain: false, release: true); + return AVAudioSessionPortDescription.castFromPointer(_ret, + retain: false, release: true); } static AVAudioSessionPortDescription alloc() { final _ret = - _objc_msgSend_2(_class_AVAudioSessionPortDescription, _sel_alloc); - return AVAudioSessionPortDescription._(_ret, retain: false, release: true); + _objc_msgSend_40(_class_AVAudioSessionPortDescription, _sel_alloc); + return AVAudioSessionPortDescription.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( + objc.NSObject? anArgument) { + _objc_msgSend_48( _class_AVAudioSessionPortDescription, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, @@ -59920,51 +37715,51 @@ class AVAudioSessionPortDescription extends NSObject { anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_AVAudioSessionPortDescription, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_AVAudioSessionPortDescription, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12(_class_AVAudioSessionPortDescription, + return _objc_msgSend_7(_class_AVAudioSessionPortDescription, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( + return _objc_msgSend_7( _class_AVAudioSessionPortDescription, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_AVAudioSessionPortDescription, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_AVAudioSessionPortDescription, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_AVAudioSessionPortDescription, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_AVAudioSessionPortDescription, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( _class_AVAudioSessionPortDescription, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85(_class_AVAudioSessionPortDescription, + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6(_class_AVAudioSessionPortDescription, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( _class_AVAudioSessionPortDescription, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } @@ -59980,26 +37775,21 @@ late final _sel_isSpatialAudioEnabled = late final _sel_channels = objc.registerName("channels"); late final _sel_dataSources = objc.registerName("dataSources"); -class AVAudioSessionDataSourceDescription extends NSObject { +class AVAudioSessionDataSourceDescription extends objc.NSObject { AVAudioSessionDataSourceDescription._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [AVAudioSessionDataSourceDescription] that points to the same underlying object as [other]. - static AVAudioSessionDataSourceDescription - castFrom(T other) { - return AVAudioSessionDataSourceDescription._(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.pointer, retain: true, release: true); - /// Returns a [AVAudioSessionDataSourceDescription] that wraps the given raw object pointer. - static AVAudioSessionDataSourceDescription castFromPointer( + /// Constructs a [AVAudioSessionDataSourceDescription] that wraps the given raw object pointer. + AVAudioSessionDataSourceDescription.castFromPointer( ffi.Pointer other, {bool retain = false, - bool release = false}) { - return AVAudioSessionDataSourceDescription._(other, - retain: retain, release: release); - } + bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [AVAudioSessionDataSourceDescription]. static bool isInstance(objc.ObjCObjectBase obj) { @@ -60007,94 +37797,91 @@ class AVAudioSessionDataSourceDescription extends NSObject { _class_AVAudioSessionDataSourceDescription); } - NSNumber get dataSourceID { - final _ret = _objc_msgSend_814(this.pointer, _sel_dataSourceID); - return NSNumber._(_ret, retain: true, release: true); + objc.NSNumber get dataSourceID { + final _ret = _objc_msgSend_180(this.pointer, _sel_dataSourceID); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - NSString get dataSourceName { - final _ret = _objc_msgSend_21(this.pointer, _sel_dataSourceName); - return NSString._(_ret, retain: true, release: true); + objc.NSString get dataSourceName { + final _ret = _objc_msgSend_12(this.pointer, _sel_dataSourceName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get location { - final _ret = _objc_msgSend_44(this.pointer, _sel_location); + objc.NSString? get location { + final _ret = _objc_msgSend_13(this.pointer, _sel_location); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get orientation { - final _ret = _objc_msgSend_44(this.pointer, _sel_orientation); + objc.NSString? get orientation { + final _ret = _objc_msgSend_13(this.pointer, _sel_orientation); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSArray? get supportedPolarPatterns { - final _ret = _objc_msgSend_84(this.pointer, _sel_supportedPolarPatterns); + objc.NSArray? get supportedPolarPatterns { + final _ret = _objc_msgSend_69(this.pointer, _sel_supportedPolarPatterns); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? get selectedPolarPattern { - final _ret = _objc_msgSend_44(this.pointer, _sel_selectedPolarPattern); + objc.NSString? get selectedPolarPattern { + final _ret = _objc_msgSend_13(this.pointer, _sel_selectedPolarPattern); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get preferredPolarPattern { - final _ret = _objc_msgSend_44(this.pointer, _sel_preferredPolarPattern); + objc.NSString? get preferredPolarPattern { + final _ret = _objc_msgSend_13(this.pointer, _sel_preferredPolarPattern); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool setPreferredPolarPattern_error_( - NSString? pattern, ffi.Pointer> outError) { - return _objc_msgSend_1154( - this.pointer, - _sel_setPreferredPolarPattern_error_, - pattern?.pointer ?? ffi.nullptr, - outError); + bool setPreferredPolarPattern_error_(objc.NSString? pattern, + ffi.Pointer> outError) { + return _objc_msgSend_761(this.pointer, _sel_setPreferredPolarPattern_error_, + pattern?.pointer ?? ffi.nullptr, outError); } @override AVAudioSessionDataSourceDescription init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return AVAudioSessionDataSourceDescription._(_ret, + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: true, release: true); } static AVAudioSessionDataSourceDescription new1() { final _ret = - _objc_msgSend_2(_class_AVAudioSessionDataSourceDescription, _sel_new); - return AVAudioSessionDataSourceDescription._(_ret, + _objc_msgSend_40(_class_AVAudioSessionDataSourceDescription, _sel_new); + return AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: false, release: true); } static AVAudioSessionDataSourceDescription allocWithZone_( ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( + final _ret = _objc_msgSend_47( _class_AVAudioSessionDataSourceDescription, _sel_allocWithZone_, zone); - return AVAudioSessionDataSourceDescription._(_ret, + return AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: false, release: true); } static AVAudioSessionDataSourceDescription alloc() { - final _ret = - _objc_msgSend_2(_class_AVAudioSessionDataSourceDescription, _sel_alloc); - return AVAudioSessionDataSourceDescription._(_ret, + final _ret = _objc_msgSend_40( + _class_AVAudioSessionDataSourceDescription, _sel_alloc); + return AVAudioSessionDataSourceDescription.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( + objc.NSObject? anArgument) { + _objc_msgSend_48( _class_AVAudioSessionDataSourceDescription, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, @@ -60102,51 +37889,51 @@ class AVAudioSessionDataSourceDescription extends NSObject { anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_AVAudioSessionDataSourceDescription, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_AVAudioSessionDataSourceDescription, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12(_class_AVAudioSessionDataSourceDescription, + return _objc_msgSend_7(_class_AVAudioSessionDataSourceDescription, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( + return _objc_msgSend_7( _class_AVAudioSessionDataSourceDescription, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_AVAudioSessionDataSourceDescription, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_AVAudioSessionDataSourceDescription, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_AVAudioSessionDataSourceDescription, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_AVAudioSessionDataSourceDescription, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( _class_AVAudioSessionDataSourceDescription, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85(_class_AVAudioSessionDataSourceDescription, + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6(_class_AVAudioSessionDataSourceDescription, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_AVAudioSessionDataSourceDescription, + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_AVAudioSessionDataSourceDescription, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } @@ -60164,7 +37951,7 @@ late final _sel_preferredPolarPattern = objc.registerName("preferredPolarPattern"); late final _sel_setPreferredPolarPattern_error_ = objc.registerName("setPreferredPolarPattern:error:"); -final _objc_msgSend_1154 = objc.msgSendPointer +final _objc_msgSend_761 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -60179,7 +37966,7 @@ final _objc_msgSend_1154 = objc.msgSendPointer ffi.Pointer, ffi.Pointer>)>(); late final _sel_selectedDataSource = objc.registerName("selectedDataSource"); -final _objc_msgSend_1155 = objc.msgSendPointer +final _objc_msgSend_762 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -60190,7 +37977,7 @@ final _objc_msgSend_1155 = objc.msgSendPointer late final _sel_preferredDataSource = objc.registerName("preferredDataSource"); late final _sel_setPreferredDataSource_error_ = objc.registerName("setPreferredDataSource:error:"); -final _objc_msgSend_1156 = objc.msgSendPointer +final _objc_msgSend_763 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -60206,7 +37993,7 @@ final _objc_msgSend_1156 = objc.msgSendPointer ffi.Pointer>)>(); late final _sel_setPreferredInput_error_ = objc.registerName("setPreferredInput:error:"); -final _objc_msgSend_1157 = objc.msgSendPointer +final _objc_msgSend_764 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -60221,7 +38008,7 @@ final _objc_msgSend_1157 = objc.msgSendPointer ffi.Pointer, ffi.Pointer>)>(); late final _sel_preferredInput = objc.registerName("preferredInput"); -final _objc_msgSend_1158 = objc.msgSendPointer +final _objc_msgSend_765 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -60244,7 +38031,7 @@ abstract class AVAudioSessionRenderingMode { } late final _sel_renderingMode = objc.registerName("renderingMode"); -final _objc_msgSend_1159 = objc.msgSendPointer +final _objc_msgSend_766 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -60260,7 +38047,7 @@ abstract class AVAudioSessionSetActiveOptions { late final _sel_setActive_withOptions_error_ = objc.registerName("setActive:withOptions:error:"); -final _objc_msgSend_1160 = objc.msgSendPointer +final _objc_msgSend_767 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -60348,7 +38135,8 @@ class ObjCBlock_ffiVoid_bool_NSError extends objc.ObjCBlockBase { /// This block must be invoked by native 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, NSError?) fn) + ObjCBlock_ffiVoid_bool_NSError.fromFunction( + void Function(bool, objc.NSError?) fn) : this._(objc.newBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Bool, @@ -60356,11 +38144,8 @@ class ObjCBlock_ffiVoid_bool_NSError extends objc.ObjCBlockBase { _ObjCBlock_ffiVoid_bool_NSError_closureTrampoline) .cast(), _ObjCBlock_ffiVoid_bool_NSError_registerClosure( - (bool arg0, ffi.Pointer arg1) => fn( - arg0, - arg1.address == 0 - ? null - : NSError._(arg1, retain: true, release: true))))); + (bool arg0, ffi.Pointer arg1) => fn(arg0, + arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -60372,7 +38157,7 @@ class ObjCBlock_ffiVoid_bool_NSError extends objc.ObjCBlockBase { /// /// 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, NSError?) fn) + ObjCBlock_ffiVoid_bool_NSError.listener(void Function(bool, objc.NSError?) fn) : this._(objc.newBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< ffi.Void Function(ffi.Pointer, ffi.Bool, @@ -60382,16 +38167,13 @@ class ObjCBlock_ffiVoid_bool_NSError extends objc.ObjCBlockBase { .nativeFunction .cast(), _ObjCBlock_ffiVoid_bool_NSError_registerClosure( - (bool arg0, ffi.Pointer arg1) => fn( - arg0, - arg1.address == 0 - ? null - : NSError._(arg1, retain: true, release: true))))); + (bool arg0, ffi.Pointer arg1) => fn(arg0, + arg1.address == 0 ? null : objc.NSError.castFromPointer(arg1, retain: true, release: true))))); static ffi.NativeCallable< ffi.Void Function(ffi.Pointer, ffi.Bool, ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(bool arg0, NSError? arg1) => pointer.ref.invoke + void call(bool arg0, objc.NSError? arg1) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer block, @@ -60404,7 +38186,7 @@ class ObjCBlock_ffiVoid_bool_NSError extends objc.ObjCBlockBase { late final _sel_activateWithOptions_completionHandler_ = objc.registerName("activateWithOptions:completionHandler:"); -final _objc_msgSend_1161 = objc.msgSendPointer +final _objc_msgSend_768 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -60420,7 +38202,7 @@ final _objc_msgSend_1161 = objc.msgSendPointer ffi.Pointer)>(); late final _sel_setPreferredSampleRate_error_ = objc.registerName("setPreferredSampleRate:error:"); -final _objc_msgSend_1162 = objc.msgSendPointer +final _objc_msgSend_769 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -60441,7 +38223,7 @@ late final _sel_preferredIOBufferDuration = objc.registerName("preferredIOBufferDuration"); late final _sel_setPreferredInputNumberOfChannels_error_ = objc.registerName("setPreferredInputNumberOfChannels:error:"); -final _objc_msgSend_1163 = objc.msgSendPointer +final _objc_msgSend_770 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -60472,7 +38254,7 @@ abstract class AVAudioStereoOrientation { late final _sel_setPreferredInputOrientation_error_ = objc.registerName("setPreferredInputOrientation:error:"); -final _objc_msgSend_1164 = objc.msgSendPointer +final _objc_msgSend_771 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -60488,7 +38270,7 @@ final _objc_msgSend_1164 = objc.msgSendPointer ffi.Pointer>)>(); late final _sel_preferredInputOrientation = objc.registerName("preferredInputOrientation"); -final _objc_msgSend_1165 = objc.msgSendPointer +final _objc_msgSend_772 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -60502,7 +38284,7 @@ late final _sel_maximumInputNumberOfChannels = late final _sel_maximumOutputNumberOfChannels = objc.registerName("maximumOutputNumberOfChannels"); late final _sel_setInputGain_error_ = objc.registerName("setInputGain:error:"); -final _objc_msgSend_1166 = objc.msgSendPointer +final _objc_msgSend_773 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -60549,7 +38331,7 @@ abstract class AVAudioSessionPromptStyle { } late final _sel_promptStyle = objc.registerName("promptStyle"); -final _objc_msgSend_1167 = objc.msgSendPointer +final _objc_msgSend_774 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -60559,26 +38341,21 @@ final _objc_msgSend_1167 = objc.msgSendPointer ffi.Pointer, ffi.Pointer)>(); late final _sel_availableInputs = objc.registerName("availableInputs"); -class AVAudioSessionRouteDescription extends NSObject { +class AVAudioSessionRouteDescription extends objc.NSObject { AVAudioSessionRouteDescription._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [AVAudioSessionRouteDescription] that points to the same underlying object as [other]. - static AVAudioSessionRouteDescription castFrom( - T other) { - return AVAudioSessionRouteDescription._(other.pointer, - retain: true, release: true); - } + /// Constructs a [AVAudioSessionRouteDescription] that points to the same underlying object as [other]. + AVAudioSessionRouteDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [AVAudioSessionRouteDescription] that wraps the given raw object pointer. - static AVAudioSessionRouteDescription castFromPointer( + /// Constructs a [AVAudioSessionRouteDescription] that wraps the given raw object pointer. + AVAudioSessionRouteDescription.castFromPointer( ffi.Pointer other, {bool retain = false, - bool release = false}) { - return AVAudioSessionRouteDescription._(other, - retain: retain, release: release); - } + bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [AVAudioSessionRouteDescription]. static bool isInstance(objc.ObjCObjectBase obj) { @@ -60586,46 +38363,50 @@ class AVAudioSessionRouteDescription extends NSObject { _class_AVAudioSessionRouteDescription); } - NSArray get inputs { - final _ret = _objc_msgSend_85(this.pointer, _sel_inputs); - return NSArray._(_ret, retain: true, release: true); + objc.NSArray get inputs { + final _ret = _objc_msgSend_6(this.pointer, _sel_inputs); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSArray get outputs { - final _ret = _objc_msgSend_85(this.pointer, _sel_outputs); - return NSArray._(_ret, retain: true, release: true); + objc.NSArray get outputs { + final _ret = _objc_msgSend_6(this.pointer, _sel_outputs); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } @override AVAudioSessionRouteDescription init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return AVAudioSessionRouteDescription._(_ret, retain: true, release: true); + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return AVAudioSessionRouteDescription.castFromPointer(_ret, + retain: true, release: true); } static AVAudioSessionRouteDescription new1() { final _ret = - _objc_msgSend_2(_class_AVAudioSessionRouteDescription, _sel_new); - return AVAudioSessionRouteDescription._(_ret, retain: false, release: true); + _objc_msgSend_40(_class_AVAudioSessionRouteDescription, _sel_new); + return AVAudioSessionRouteDescription.castFromPointer(_ret, + retain: false, release: true); } static AVAudioSessionRouteDescription allocWithZone_( ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( + final _ret = _objc_msgSend_47( _class_AVAudioSessionRouteDescription, _sel_allocWithZone_, zone); - return AVAudioSessionRouteDescription._(_ret, retain: false, release: true); + return AVAudioSessionRouteDescription.castFromPointer(_ret, + retain: false, release: true); } static AVAudioSessionRouteDescription alloc() { final _ret = - _objc_msgSend_2(_class_AVAudioSessionRouteDescription, _sel_alloc); - return AVAudioSessionRouteDescription._(_ret, retain: false, release: true); + _objc_msgSend_40(_class_AVAudioSessionRouteDescription, _sel_alloc); + return AVAudioSessionRouteDescription.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( + objc.NSObject? anArgument) { + _objc_msgSend_48( _class_AVAudioSessionRouteDescription, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, @@ -60633,51 +38414,51 @@ class AVAudioSessionRouteDescription extends NSObject { anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_AVAudioSessionRouteDescription, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_AVAudioSessionRouteDescription, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12(_class_AVAudioSessionRouteDescription, + return _objc_msgSend_7(_class_AVAudioSessionRouteDescription, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( + return _objc_msgSend_7( _class_AVAudioSessionRouteDescription, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_AVAudioSessionRouteDescription, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_AVAudioSessionRouteDescription, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_AVAudioSessionRouteDescription, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_AVAudioSessionRouteDescription, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( _class_AVAudioSessionRouteDescription, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85(_class_AVAudioSessionRouteDescription, + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6(_class_AVAudioSessionRouteDescription, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( _class_AVAudioSessionRouteDescription, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } @@ -60686,7 +38467,7 @@ late final _class_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_1168 = objc.msgSendPointer +final _objc_msgSend_775 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -60702,7 +38483,7 @@ abstract class AVAudioSessionIOType { late final _sel_setAggregatedIOPreference_error_ = objc.registerName("setAggregatedIOPreference:error:"); -final _objc_msgSend_1169 = objc.msgSendPointer +final _objc_msgSend_776 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -60726,7 +38507,7 @@ late final _sel_prefersInterruptionOnRouteDisconnect = objc.registerName("prefersInterruptionOnRouteDisconnect"); late final _sel_setActive_withFlags_error_ = objc.registerName("setActive:withFlags:error:"); -final _objc_msgSend_1170 = objc.msgSendPointer +final _objc_msgSend_777 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -60754,21 +38535,19 @@ late final _sel_setPreferredHardwareSampleRate_error_ = late final _sel_preferredHardwareSampleRate = objc.registerName("preferredHardwareSampleRate"); -class AVAudioPlayer extends NSObject { +class AVAudioPlayer extends objc.NSObject { AVAudioPlayer._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [AVAudioPlayer] that points to the same underlying object as [other]. - static AVAudioPlayer castFrom(T other) { - return AVAudioPlayer._(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.pointer, retain: true, release: true); - /// Returns a [AVAudioPlayer] that wraps the given raw object pointer. - static AVAudioPlayer castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return AVAudioPlayer._(other, retain: retain, release: release); - } + /// 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) { @@ -60777,26 +38556,28 @@ class AVAudioPlayer extends NSObject { } AVAudioPlayer? initWithContentsOfURL_error_( - NSURL url, ffi.Pointer> outError) { - final _ret = _objc_msgSend_842( + objc.NSURL url, ffi.Pointer> outError) { + final _ret = _objc_msgSend_259( this.pointer, _sel_initWithContentsOfURL_error_, url.pointer, outError); return _ret.address == 0 ? null - : AVAudioPlayer._(_ret, retain: true, release: true); + : AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); } AVAudioPlayer? initWithData_error_( - NSData data, ffi.Pointer> outError) { - final _ret = _objc_msgSend_1171( + objc.NSData data, ffi.Pointer> outError) { + final _ret = _objc_msgSend_778( this.pointer, _sel_initWithData_error_, data.pointer, outError); return _ret.address == 0 ? null - : AVAudioPlayer._(_ret, retain: true, release: true); + : AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); } - AVAudioPlayer? initWithContentsOfURL_fileTypeHint_error_(NSURL url, - NSString? utiString, ffi.Pointer> outError) { - final _ret = _objc_msgSend_1172( + AVAudioPlayer? initWithContentsOfURL_fileTypeHint_error_( + objc.NSURL url, + objc.NSString? utiString, + ffi.Pointer> outError) { + final _ret = _objc_msgSend_779( this.pointer, _sel_initWithContentsOfURL_fileTypeHint_error_, url.pointer, @@ -60804,12 +38585,14 @@ class AVAudioPlayer extends NSObject { outError); return _ret.address == 0 ? null - : AVAudioPlayer._(_ret, retain: true, release: true); + : AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); } - AVAudioPlayer? initWithData_fileTypeHint_error_(NSData data, - NSString? utiString, ffi.Pointer> outError) { - final _ret = _objc_msgSend_1173( + AVAudioPlayer? initWithData_fileTypeHint_error_( + objc.NSData data, + objc.NSString? utiString, + ffi.Pointer> outError) { + final _ret = _objc_msgSend_780( this.pointer, _sel_initWithData_fileTypeHint_error_, data.pointer, @@ -60817,225 +38600,225 @@ class AVAudioPlayer extends NSObject { outError); return _ret.address == 0 ? null - : AVAudioPlayer._(_ret, retain: true, release: true); + : AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); } bool prepareToPlay() { - return _objc_msgSend_12(this.pointer, _sel_prepareToPlay); + return _objc_msgSend_7(this.pointer, _sel_prepareToPlay); } bool play() { - return _objc_msgSend_12(this.pointer, _sel_play); + return _objc_msgSend_7(this.pointer, _sel_play); } bool playAtTime_(double time) { - return _objc_msgSend_1174(this.pointer, _sel_playAtTime_, time); + return _objc_msgSend_781(this.pointer, _sel_playAtTime_, time); } void pause() { - _objc_msgSend_1(this.pointer, _sel_pause); + _objc_msgSend_82(this.pointer, _sel_pause); } void stop() { - _objc_msgSend_1(this.pointer, _sel_stop); + _objc_msgSend_82(this.pointer, _sel_stop); } bool get playing { - return _objc_msgSend_12(this.pointer, _sel_isPlaying); + return _objc_msgSend_7(this.pointer, _sel_isPlaying); } int get numberOfChannels { - return _objc_msgSend_10(this.pointer, _sel_numberOfChannels); + return _objc_msgSend_29(this.pointer, _sel_numberOfChannels); } double get duration { return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_duration) - : _objc_msgSend_165(this.pointer, _sel_duration); + ? _objc_msgSend_115Fpret(this.pointer, _sel_duration) + : _objc_msgSend_115(this.pointer, _sel_duration); } - NSString? get currentDevice { - final _ret = _objc_msgSend_44(this.pointer, _sel_currentDevice); + objc.NSString? get currentDevice { + final _ret = _objc_msgSend_13(this.pointer, _sel_currentDevice); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set currentDevice(NSString? value) { - return _objc_msgSend_545( + set currentDevice(objc.NSString? value) { + return _objc_msgSend_46( this.pointer, _sel_setCurrentDevice_, value?.pointer ?? ffi.nullptr); } - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set delegate(NSObject? value) { - return _objc_msgSend_416( + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - NSURL? get url { - final _ret = _objc_msgSend_45(this.pointer, _sel_url); + objc.NSURL? get url { + final _ret = _objc_msgSend_10(this.pointer, _sel_url); return _ret.address == 0 ? null - : NSURL._(_ret, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSData? get data { - final _ret = _objc_msgSend_286(this.pointer, _sel_data); + objc.NSData? get data { + final _ret = _objc_msgSend_325(this.pointer, _sel_data); return _ret.address == 0 ? null - : NSData._(_ret, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } double get pan { return objc.useMsgSendVariants - ? _objc_msgSend_239Fpret(this.pointer, _sel_pan) - : _objc_msgSend_239(this.pointer, _sel_pan); + ? _objc_msgSend_351Fpret(this.pointer, _sel_pan) + : _objc_msgSend_351(this.pointer, _sel_pan); } set pan(double value) { - return _objc_msgSend_881(this.pointer, _sel_setPan_, value); + return _objc_msgSend_352(this.pointer, _sel_setPan_, value); } double get volume { return objc.useMsgSendVariants - ? _objc_msgSend_239Fpret(this.pointer, _sel_volume) - : _objc_msgSend_239(this.pointer, _sel_volume); + ? _objc_msgSend_351Fpret(this.pointer, _sel_volume) + : _objc_msgSend_351(this.pointer, _sel_volume); } set volume(double value) { - return _objc_msgSend_881(this.pointer, _sel_setVolume_, value); + return _objc_msgSend_352(this.pointer, _sel_setVolume_, value); } void setVolume_fadeDuration_(double volume, double duration) { - _objc_msgSend_1175( + _objc_msgSend_782( this.pointer, _sel_setVolume_fadeDuration_, volume, duration); } bool get enableRate { - return _objc_msgSend_12(this.pointer, _sel_enableRate); + return _objc_msgSend_7(this.pointer, _sel_enableRate); } set enableRate(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setEnableRate_, value); + return _objc_msgSend_41(this.pointer, _sel_setEnableRate_, value); } double get rate { return objc.useMsgSendVariants - ? _objc_msgSend_239Fpret(this.pointer, _sel_rate) - : _objc_msgSend_239(this.pointer, _sel_rate); + ? _objc_msgSend_351Fpret(this.pointer, _sel_rate) + : _objc_msgSend_351(this.pointer, _sel_rate); } set rate(double value) { - return _objc_msgSend_881(this.pointer, _sel_setRate_, value); + return _objc_msgSend_352(this.pointer, _sel_setRate_, value); } double get currentTime { return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_currentTime) - : _objc_msgSend_165(this.pointer, _sel_currentTime); + ? _objc_msgSend_115Fpret(this.pointer, _sel_currentTime) + : _objc_msgSend_115(this.pointer, _sel_currentTime); } set currentTime(double value) { - return _objc_msgSend_542(this.pointer, _sel_setCurrentTime_, value); + return _objc_msgSend_212(this.pointer, _sel_setCurrentTime_, value); } double get deviceCurrentTime { return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_deviceCurrentTime) - : _objc_msgSend_165(this.pointer, _sel_deviceCurrentTime); + ? _objc_msgSend_115Fpret(this.pointer, _sel_deviceCurrentTime) + : _objc_msgSend_115(this.pointer, _sel_deviceCurrentTime); } int get numberOfLoops { - return _objc_msgSend_83(this.pointer, _sel_numberOfLoops); + return _objc_msgSend_114(this.pointer, _sel_numberOfLoops); } set numberOfLoops(int value) { - return _objc_msgSend_635(this.pointer, _sel_setNumberOfLoops_, value); + return _objc_msgSend_134(this.pointer, _sel_setNumberOfLoops_, value); } - NSDictionary get settings { - final _ret = _objc_msgSend_181(this.pointer, _sel_settings); - return NSDictionary._(_ret, retain: true, release: true); + objc.NSDictionary get settings { + final _ret = _objc_msgSend_112(this.pointer, _sel_settings); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } AVAudioFormat get format { - final _ret = _objc_msgSend_1192(this.pointer, _sel_format); - return AVAudioFormat._(_ret, retain: true, release: true); + final _ret = _objc_msgSend_799(this.pointer, _sel_format); + return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } bool get meteringEnabled { - return _objc_msgSend_12(this.pointer, _sel_isMeteringEnabled); + return _objc_msgSend_7(this.pointer, _sel_isMeteringEnabled); } set meteringEnabled(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setMeteringEnabled_, value); + return _objc_msgSend_41(this.pointer, _sel_setMeteringEnabled_, value); } void updateMeters() { - _objc_msgSend_1(this.pointer, _sel_updateMeters); + _objc_msgSend_82(this.pointer, _sel_updateMeters); } double peakPowerForChannel_(int channelNumber) { return objc.useMsgSendVariants - ? _objc_msgSend_1193Fpret( + ? _objc_msgSend_800Fpret( this.pointer, _sel_peakPowerForChannel_, channelNumber) - : _objc_msgSend_1193( + : _objc_msgSend_800( this.pointer, _sel_peakPowerForChannel_, channelNumber); } double averagePowerForChannel_(int channelNumber) { return objc.useMsgSendVariants - ? _objc_msgSend_1193Fpret( + ? _objc_msgSend_800Fpret( this.pointer, _sel_averagePowerForChannel_, channelNumber) - : _objc_msgSend_1193( + : _objc_msgSend_800( this.pointer, _sel_averagePowerForChannel_, channelNumber); } - NSArray? get channelAssignments { - final _ret = _objc_msgSend_84(this.pointer, _sel_channelAssignments); + objc.NSArray? get channelAssignments { + final _ret = _objc_msgSend_69(this.pointer, _sel_channelAssignments); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set channelAssignments(NSArray? value) { - return _objc_msgSend_1053(this.pointer, _sel_setChannelAssignments_, + set channelAssignments(objc.NSArray? value) { + return _objc_msgSend_605(this.pointer, _sel_setChannelAssignments_, value?.pointer ?? ffi.nullptr); } @override AVAudioPlayer init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return AVAudioPlayer._(_ret, retain: true, release: true); + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return AVAudioPlayer.castFromPointer(_ret, retain: true, release: true); } static AVAudioPlayer new1() { - final _ret = _objc_msgSend_2(_class_AVAudioPlayer, _sel_new); - return AVAudioPlayer._(_ret, retain: false, release: true); + final _ret = _objc_msgSend_40(_class_AVAudioPlayer, _sel_new); + return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); } static AVAudioPlayer allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_AVAudioPlayer, _sel_allocWithZone_, zone); - return AVAudioPlayer._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_AVAudioPlayer, _sel_allocWithZone_, zone); + return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); } static AVAudioPlayer alloc() { - final _ret = _objc_msgSend_2(_class_AVAudioPlayer, _sel_alloc); - return AVAudioPlayer._(_ret, retain: false, release: true); + final _ret = _objc_msgSend_40(_class_AVAudioPlayer, _sel_alloc); + return AVAudioPlayer.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( + objc.NSObject? anArgument) { + _objc_msgSend_48( _class_AVAudioPlayer, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, @@ -61043,56 +38826,58 @@ class AVAudioPlayer extends NSObject { anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_AVAudioPlayer, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_AVAudioPlayer, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( + return _objc_msgSend_7( _class_AVAudioPlayer, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_AVAudioPlayer, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_AVAudioPlayer, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_AVAudioPlayer, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_AVAudioPlayer, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_AVAudioPlayer, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_AVAudioPlayer, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( _class_AVAudioPlayer, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( _class_AVAudioPlayer, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_AVAudioPlayer, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_AVAudioPlayer, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, 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_1171 = objc.msgSendPointer +final _objc_msgSend_778 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -61108,7 +38893,7 @@ final _objc_msgSend_1171 = objc.msgSendPointer ffi.Pointer>)>(); late final _sel_initWithContentsOfURL_fileTypeHint_error_ = objc.registerName("initWithContentsOfURL:fileTypeHint:error:"); -final _objc_msgSend_1172 = objc.msgSendPointer +final _objc_msgSend_779 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -61126,7 +38911,7 @@ final _objc_msgSend_1172 = objc.msgSendPointer ffi.Pointer>)>(); late final _sel_initWithData_fileTypeHint_error_ = objc.registerName("initWithData:fileTypeHint:error:"); -final _objc_msgSend_1173 = objc.msgSendPointer +final _objc_msgSend_780 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -61145,7 +38930,7 @@ final _objc_msgSend_1173 = objc.msgSendPointer late final _sel_prepareToPlay = objc.registerName("prepareToPlay"); late final _sel_play = objc.registerName("play"); late final _sel_playAtTime_ = objc.registerName("playAtTime:"); -final _objc_msgSend_1174 = objc.msgSendPointer +final _objc_msgSend_781 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function(ffi.Pointer, @@ -61153,6 +38938,7 @@ final _objc_msgSend_1174 = objc.msgSendPointer .asFunction< bool Function(ffi.Pointer, ffi.Pointer, double)>(); +late final _sel_pause = objc.registerName("pause"); late final _sel_isPlaying = objc.registerName("isPlaying"); late final _sel_numberOfChannels = objc.registerName("numberOfChannels"); late final _sel_currentDevice = objc.registerName("currentDevice"); @@ -61164,7 +38950,7 @@ 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_1175 = objc.msgSendPointer +final _objc_msgSend_782 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, @@ -61183,21 +38969,19 @@ late final _sel_numberOfLoops = objc.registerName("numberOfLoops"); late final _sel_setNumberOfLoops_ = objc.registerName("setNumberOfLoops:"); late final _sel_settings = objc.registerName("settings"); -class AVAudioFormat extends NSObject { +class AVAudioFormat extends objc.NSObject { AVAudioFormat._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [AVAudioFormat] that points to the same underlying object as [other]. - static AVAudioFormat castFrom(T other) { - return AVAudioFormat._(other.pointer, retain: true, release: true); - } + /// Constructs a [AVAudioFormat] that points to the same underlying object as [other]. + AVAudioFormat.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [AVAudioFormat] that wraps the given raw object pointer. - static AVAudioFormat castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return AVAudioFormat._(other, retain: retain, release: release); - } + /// Constructs a [AVAudioFormat] that wraps the given raw object pointer. + AVAudioFormat.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [AVAudioFormat]. static bool isInstance(objc.ObjCObjectBase obj) { @@ -61208,47 +38992,47 @@ class AVAudioFormat extends NSObject { AVAudioFormat? initWithStreamDescription_( ffi.Pointer asbd) { final _ret = - _objc_msgSend_1176(this.pointer, _sel_initWithStreamDescription_, asbd); + _objc_msgSend_783(this.pointer, _sel_initWithStreamDescription_, asbd); return _ret.address == 0 ? null - : AVAudioFormat._(_ret, retain: true, release: true); + : AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } AVAudioFormat? initWithStreamDescription_channelLayout_( ffi.Pointer asbd, AVAudioChannelLayout? layout) { - final _ret = _objc_msgSend_1182( + final _ret = _objc_msgSend_789( this.pointer, _sel_initWithStreamDescription_channelLayout_, asbd, layout?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : AVAudioFormat._(_ret, retain: true, release: true); + : AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } AVAudioFormat? initStandardFormatWithSampleRate_channels_( double sampleRate, int channels) { - final _ret = _objc_msgSend_1183(this.pointer, + final _ret = _objc_msgSend_790(this.pointer, _sel_initStandardFormatWithSampleRate_channels_, sampleRate, channels); return _ret.address == 0 ? null - : AVAudioFormat._(_ret, retain: true, release: true); + : AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } AVAudioFormat initStandardFormatWithSampleRate_channelLayout_( double sampleRate, AVAudioChannelLayout layout) { - final _ret = _objc_msgSend_1184( + final _ret = _objc_msgSend_791( this.pointer, _sel_initStandardFormatWithSampleRate_channelLayout_, sampleRate, layout.pointer); - return AVAudioFormat._(_ret, retain: true, release: true); + return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } AVAudioFormat? initWithCommonFormat_sampleRate_channels_interleaved_( int format, double sampleRate, int channels, bool interleaved) { - final _ret = _objc_msgSend_1185( + final _ret = _objc_msgSend_792( this.pointer, _sel_initWithCommonFormat_sampleRate_channels_interleaved_, format, @@ -61257,7 +39041,7 @@ class AVAudioFormat extends NSObject { interleaved); return _ret.address == 0 ? null - : AVAudioFormat._(_ret, retain: true, release: true); + : AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } AVAudioFormat initWithCommonFormat_sampleRate_interleaved_channelLayout_( @@ -61265,116 +39049,117 @@ class AVAudioFormat extends NSObject { double sampleRate, bool interleaved, AVAudioChannelLayout layout) { - final _ret = _objc_msgSend_1186( + final _ret = _objc_msgSend_793( this.pointer, _sel_initWithCommonFormat_sampleRate_interleaved_channelLayout_, format, sampleRate, interleaved, layout.pointer); - return AVAudioFormat._(_ret, retain: true, release: true); + return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } - AVAudioFormat? initWithSettings_(NSDictionary settings) { - final _ret = _objc_msgSend_851( + AVAudioFormat? initWithSettings_(objc.NSDictionary settings) { + final _ret = _objc_msgSend_311( this.pointer, _sel_initWithSettings_, settings.pointer); return _ret.address == 0 ? null - : AVAudioFormat._(_ret, retain: true, release: true); + : AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } AVAudioFormat initWithCMAudioFormatDescription_( ffi.Pointer formatDescription) { - final _ret = _objc_msgSend_1187(this.pointer, + final _ret = _objc_msgSend_794(this.pointer, _sel_initWithCMAudioFormatDescription_, formatDescription); - return AVAudioFormat._(_ret, retain: true, release: true); + return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } - bool isEqual_(NSObject object) { + bool isEqual_(objc.NSObject object) { return _objc_msgSend_0(this.pointer, _sel_isEqual_, object.pointer); } bool get standard { - return _objc_msgSend_12(this.pointer, _sel_isStandard); + return _objc_msgSend_7(this.pointer, _sel_isStandard); } int get commonFormat { - return _objc_msgSend_1188(this.pointer, _sel_commonFormat); + return _objc_msgSend_795(this.pointer, _sel_commonFormat); } int get channelCount { - return _objc_msgSend_1181(this.pointer, _sel_channelCount); + return _objc_msgSend_788(this.pointer, _sel_channelCount); } double get sampleRate { return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_sampleRate) - : _objc_msgSend_165(this.pointer, _sel_sampleRate); + ? _objc_msgSend_115Fpret(this.pointer, _sel_sampleRate) + : _objc_msgSend_115(this.pointer, _sel_sampleRate); } bool get interleaved { - return _objc_msgSend_12(this.pointer, _sel_isInterleaved); + return _objc_msgSend_7(this.pointer, _sel_isInterleaved); } ffi.Pointer get streamDescription { - return _objc_msgSend_1189(this.pointer, _sel_streamDescription); + return _objc_msgSend_796(this.pointer, _sel_streamDescription); } AVAudioChannelLayout? get channelLayout { - final _ret = _objc_msgSend_1190(this.pointer, _sel_channelLayout); + final _ret = _objc_msgSend_797(this.pointer, _sel_channelLayout); return _ret.address == 0 ? null - : AVAudioChannelLayout._(_ret, retain: true, release: true); + : AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); } - NSData? get magicCookie { - final _ret = _objc_msgSend_286(this.pointer, _sel_magicCookie); + objc.NSData? get magicCookie { + final _ret = _objc_msgSend_325(this.pointer, _sel_magicCookie); return _ret.address == 0 ? null - : NSData._(_ret, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - set magicCookie(NSData? value) { - return _objc_msgSend_1021( + set magicCookie(objc.NSData? value) { + return _objc_msgSend_571( this.pointer, _sel_setMagicCookie_, value?.pointer ?? ffi.nullptr); } - NSDictionary get settings { - final _ret = _objc_msgSend_181(this.pointer, _sel_settings); - return NSDictionary._(_ret, retain: true, release: true); + objc.NSDictionary get settings { + final _ret = _objc_msgSend_112(this.pointer, _sel_settings); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } ffi.Pointer get formatDescription { - return _objc_msgSend_1191(this.pointer, _sel_formatDescription); + return _objc_msgSend_798(this.pointer, _sel_formatDescription); } @override AVAudioFormat init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return AVAudioFormat._(_ret, retain: true, release: true); + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return AVAudioFormat.castFromPointer(_ret, retain: true, release: true); } static AVAudioFormat new1() { - final _ret = _objc_msgSend_2(_class_AVAudioFormat, _sel_new); - return AVAudioFormat._(_ret, retain: false, release: true); + final _ret = _objc_msgSend_40(_class_AVAudioFormat, _sel_new); + return AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } static AVAudioFormat allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_AVAudioFormat, _sel_allocWithZone_, zone); - return AVAudioFormat._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_AVAudioFormat, _sel_allocWithZone_, zone); + return AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } static AVAudioFormat alloc() { - final _ret = _objc_msgSend_2(_class_AVAudioFormat, _sel_alloc); - return AVAudioFormat._(_ret, retain: false, release: true); + final _ret = _objc_msgSend_40(_class_AVAudioFormat, _sel_alloc); + return AVAudioFormat.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( + objc.NSObject? anArgument) { + _objc_msgSend_48( _class_AVAudioFormat, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, @@ -61382,50 +39167,50 @@ class AVAudioFormat extends NSObject { anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_AVAudioFormat, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_AVAudioFormat, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( + return _objc_msgSend_7( _class_AVAudioFormat, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_AVAudioFormat, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_AVAudioFormat, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_AVAudioFormat, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_AVAudioFormat, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_AVAudioFormat, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_AVAudioFormat, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( _class_AVAudioFormat, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( _class_AVAudioFormat, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_AVAudioFormat, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_AVAudioFormat, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } @@ -61462,7 +39247,7 @@ final class AudioStreamBasicDescription extends ffi.Struct { late final _sel_initWithStreamDescription_ = objc.registerName("initWithStreamDescription:"); -final _objc_msgSend_1176 = objc.msgSendPointer +final _objc_msgSend_783 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -61475,23 +39260,19 @@ final _objc_msgSend_1176 = objc.msgSendPointer ffi.Pointer, ffi.Pointer)>(); -class AVAudioChannelLayout extends NSObject { +class AVAudioChannelLayout extends objc.NSObject { AVAudioChannelLayout._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [AVAudioChannelLayout] that points to the same underlying object as [other]. - static AVAudioChannelLayout castFrom(T other) { - return AVAudioChannelLayout._(other.pointer, retain: true, release: true); - } + /// Constructs a [AVAudioChannelLayout] that points to the same underlying object as [other]. + AVAudioChannelLayout.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [AVAudioChannelLayout] that wraps the given raw object pointer. - static AVAudioChannelLayout castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return AVAudioChannelLayout._(other, retain: retain, release: release); - } + /// 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); /// Returns whether [obj] is an instance of [AVAudioChannelLayout]. static bool isInstance(objc.ObjCObjectBase obj) { @@ -61501,73 +39282,81 @@ class AVAudioChannelLayout extends NSObject { @override AVAudioChannelLayout init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return AVAudioChannelLayout._(_ret, retain: true, release: true); + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); } AVAudioChannelLayout? initWithLayoutTag_(int layoutTag) { final _ret = - _objc_msgSend_1177(this.pointer, _sel_initWithLayoutTag_, layoutTag); + _objc_msgSend_784(this.pointer, _sel_initWithLayoutTag_, layoutTag); return _ret.address == 0 ? null - : AVAudioChannelLayout._(_ret, retain: true, release: true); + : AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); } AVAudioChannelLayout initWithLayout_(ffi.Pointer layout) { - final _ret = _objc_msgSend_1178(this.pointer, _sel_initWithLayout_, layout); - return AVAudioChannelLayout._(_ret, retain: true, release: true); + final _ret = _objc_msgSend_785(this.pointer, _sel_initWithLayout_, layout); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); } - bool isEqual_(NSObject object) { + bool isEqual_(objc.NSObject object) { return _objc_msgSend_0(this.pointer, _sel_isEqual_, object.pointer); } static AVAudioChannelLayout layoutWithLayoutTag_(int layoutTag) { - final _ret = _objc_msgSend_1179( + final _ret = _objc_msgSend_786( _class_AVAudioChannelLayout, _sel_layoutWithLayoutTag_, layoutTag); - return AVAudioChannelLayout._(_ret, retain: true, release: true); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); } static AVAudioChannelLayout layoutWithLayout_( ffi.Pointer layout) { - final _ret = _objc_msgSend_1178( + final _ret = _objc_msgSend_785( _class_AVAudioChannelLayout, _sel_layoutWithLayout_, layout); - return AVAudioChannelLayout._(_ret, retain: true, release: true); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: true, release: true); } int get layoutTag { - return _objc_msgSend_214(this.pointer, _sel_layoutTag); + return _objc_msgSend_704(this.pointer, _sel_layoutTag); } ffi.Pointer get layout { - return _objc_msgSend_1180(this.pointer, _sel_layout); + return _objc_msgSend_787(this.pointer, _sel_layout); } int get channelCount { - return _objc_msgSend_1181(this.pointer, _sel_channelCount); + return _objc_msgSend_788(this.pointer, _sel_channelCount); } static AVAudioChannelLayout new1() { - final _ret = _objc_msgSend_2(_class_AVAudioChannelLayout, _sel_new); - return AVAudioChannelLayout._(_ret, retain: false, release: true); + final _ret = _objc_msgSend_40(_class_AVAudioChannelLayout, _sel_new); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: false, release: true); } static AVAudioChannelLayout allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_AVAudioChannelLayout, _sel_allocWithZone_, zone); - return AVAudioChannelLayout._(_ret, retain: false, release: true); + final _ret = _objc_msgSend_47( + _class_AVAudioChannelLayout, _sel_allocWithZone_, zone); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: false, release: true); } static AVAudioChannelLayout alloc() { - final _ret = _objc_msgSend_2(_class_AVAudioChannelLayout, _sel_alloc); - return AVAudioChannelLayout._(_ret, retain: false, release: true); + final _ret = _objc_msgSend_40(_class_AVAudioChannelLayout, _sel_alloc); + return AVAudioChannelLayout.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( + objc.NSObject? anArgument) { + _objc_msgSend_48( _class_AVAudioChannelLayout, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, @@ -61575,57 +39364,56 @@ class AVAudioChannelLayout extends NSObject { anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_AVAudioChannelLayout, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_AVAudioChannelLayout, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( + return _objc_msgSend_7( _class_AVAudioChannelLayout, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_AVAudioChannelLayout, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_AVAudioChannelLayout, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_AVAudioChannelLayout, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_AVAudioChannelLayout, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_AVAudioChannelLayout, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_AVAudioChannelLayout, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( _class_AVAudioChannelLayout, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( _class_AVAudioChannelLayout, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( _class_AVAudioChannelLayout, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } late final _class_AVAudioChannelLayout = objc.getClass("AVAudioChannelLayout"); late final _sel_initWithLayoutTag_ = objc.registerName("initWithLayoutTag:"); -final _objc_msgSend_1177 = objc.msgSendPointer +final _objc_msgSend_784 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function(ffi.Pointer, @@ -61697,7 +39485,7 @@ abstract class AudioChannelFlags { } late final _sel_initWithLayout_ = objc.registerName("initWithLayout:"); -final _objc_msgSend_1178 = objc.msgSendPointer +final _objc_msgSend_785 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -61710,7 +39498,7 @@ final _objc_msgSend_1178 = objc.msgSendPointer late final _sel_isEqual_ = objc.registerName("isEqual:"); late final _sel_layoutWithLayoutTag_ = objc.registerName("layoutWithLayoutTag:"); -final _objc_msgSend_1179 = objc.msgSendPointer +final _objc_msgSend_786 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function(ffi.Pointer, @@ -61721,7 +39509,7 @@ final _objc_msgSend_1179 = objc.msgSendPointer late final _sel_layoutWithLayout_ = objc.registerName("layoutWithLayout:"); late final _sel_layoutTag = objc.registerName("layoutTag"); late final _sel_layout = objc.registerName("layout"); -final _objc_msgSend_1180 = objc.msgSendPointer +final _objc_msgSend_787 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -61731,7 +39519,7 @@ final _objc_msgSend_1180 = objc.msgSendPointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_channelCount = objc.registerName("channelCount"); -final _objc_msgSend_1181 = objc.msgSendPointer +final _objc_msgSend_788 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Uint32 Function(ffi.Pointer, @@ -61741,7 +39529,7 @@ final _objc_msgSend_1181 = objc.msgSendPointer ffi.Pointer, ffi.Pointer)>(); late final _sel_initWithStreamDescription_channelLayout_ = objc.registerName("initWithStreamDescription:channelLayout:"); -final _objc_msgSend_1182 = objc.msgSendPointer +final _objc_msgSend_789 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -61757,7 +39545,7 @@ final _objc_msgSend_1182 = objc.msgSendPointer ffi.Pointer)>(); late final _sel_initStandardFormatWithSampleRate_channels_ = objc.registerName("initStandardFormatWithSampleRate:channels:"); -final _objc_msgSend_1183 = objc.msgSendPointer +final _objc_msgSend_790 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function(ffi.Pointer, @@ -61767,7 +39555,7 @@ final _objc_msgSend_1183 = objc.msgSendPointer ffi.Pointer, double, int)>(); late final _sel_initStandardFormatWithSampleRate_channelLayout_ = objc.registerName("initStandardFormatWithSampleRate:channelLayout:"); -final _objc_msgSend_1184 = objc.msgSendPointer +final _objc_msgSend_791 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -61792,7 +39580,7 @@ abstract class AVAudioCommonFormat { late final _sel_initWithCommonFormat_sampleRate_channels_interleaved_ = objc.registerName("initWithCommonFormat:sampleRate:channels:interleaved:"); -final _objc_msgSend_1185 = objc.msgSendPointer +final _objc_msgSend_792 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -61808,7 +39596,7 @@ final _objc_msgSend_1185 = objc.msgSendPointer late final _sel_initWithCommonFormat_sampleRate_interleaved_channelLayout_ = objc.registerName( "initWithCommonFormat:sampleRate:interleaved:channelLayout:"); -final _objc_msgSend_1186 = objc.msgSendPointer +final _objc_msgSend_793 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -61832,7 +39620,7 @@ final class opaqueCMFormatDescription extends ffi.Opaque {} late final _sel_initWithCMAudioFormatDescription_ = objc.registerName("initWithCMAudioFormatDescription:"); -final _objc_msgSend_1187 = objc.msgSendPointer +final _objc_msgSend_794 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -61846,7 +39634,7 @@ final _objc_msgSend_1187 = objc.msgSendPointer ffi.Pointer)>(); late final _sel_isStandard = objc.registerName("isStandard"); late final _sel_commonFormat = objc.registerName("commonFormat"); -final _objc_msgSend_1188 = objc.msgSendPointer +final _objc_msgSend_795 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -61856,7 +39644,7 @@ final _objc_msgSend_1188 = objc.msgSendPointer ffi.Pointer, ffi.Pointer)>(); late final _sel_isInterleaved = objc.registerName("isInterleaved"); late final _sel_streamDescription = objc.registerName("streamDescription"); -final _objc_msgSend_1189 = objc.msgSendPointer +final _objc_msgSend_796 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -61866,7 +39654,7 @@ final _objc_msgSend_1189 = objc.msgSendPointer ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); late final _sel_channelLayout = objc.registerName("channelLayout"); -final _objc_msgSend_1190 = objc.msgSendPointer +final _objc_msgSend_797 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -61877,7 +39665,7 @@ final _objc_msgSend_1190 = objc.msgSendPointer late final _sel_magicCookie = objc.registerName("magicCookie"); late final _sel_setMagicCookie_ = objc.registerName("setMagicCookie:"); late final _sel_formatDescription = objc.registerName("formatDescription"); -final _objc_msgSend_1191 = objc.msgSendPointer +final _objc_msgSend_798 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -61886,7 +39674,7 @@ final _objc_msgSend_1191 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_1192 = objc.msgSendPointer +final _objc_msgSend_799 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -61899,7 +39687,7 @@ late final _sel_setMeteringEnabled_ = objc.registerName("setMeteringEnabled:"); late final _sel_updateMeters = objc.registerName("updateMeters"); late final _sel_peakPowerForChannel_ = objc.registerName("peakPowerForChannel:"); -final _objc_msgSend_1193 = objc.msgSendPointer +final _objc_msgSend_800 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Float Function(ffi.Pointer, @@ -61907,7 +39695,7 @@ final _objc_msgSend_1193 = objc.msgSendPointer .asFunction< double Function(ffi.Pointer, ffi.Pointer, int)>(); -final _objc_msgSend_1193Fpret = objc.msgSendFpretPointer +final _objc_msgSend_800Fpret = objc.msgSendFpretPointer .cast< ffi.NativeFunction< ffi.Float Function(ffi.Pointer, diff --git a/pkgs/ffigen/example/objective_c/play_audio.dart b/pkgs/ffigen/example/objective_c/play_audio.dart index 2e5427db4..bca46b65a 100644 --- a/pkgs/ffigen/example/objective_c/play_audio.dart +++ b/pkgs/ffigen/example/objective_c/play_audio.dart @@ -3,6 +3,7 @@ // BSD-style license that can be found in the LICENSE file. import 'dart:ffi'; +import 'package:objective_c/objective_c.dart'; import 'avf_audio_bindings.dart'; const _dylibPath = diff --git a/pkgs/ffigen/example/swift/swift_api_bindings.dart b/pkgs/ffigen/example/swift/swift_api_bindings.dart index 97c6d0ae7..939ddd1aa 100644 --- a/pkgs/ffigen/example/swift/swift_api_bindings.dart +++ b/pkgs/ffigen/example/swift/swift_api_bindings.dart @@ -12,6245 +12,5336 @@ // // 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; +import 'package:objective_c/objective_c.dart' as objc; +import 'dart:ffi' as ffi; -class NSObject extends objc.ObjCObjectBase { - NSObject._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super(pointer, retain: retain, release: release); - - /// Returns a [NSObject] that points to the same underlying object as [other]. - static NSObject castFrom(T other) { - return NSObject._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSObject] that wraps the given raw object pointer. - static NSObject castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSObject._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSObject]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSObject); - } - - static void load() { - _objc_msgSend_1(_class_NSObject, _sel_load); - } - - static void initialize() { - _objc_msgSend_1(_class_NSObject, _sel_initialize); - } - - NSObject init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject new1() { - final _ret = _objc_msgSend_2(_class_NSObject, _sel_new); - return NSObject._(_ret, retain: false, release: true); - } - - static NSObject allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSObject, _sel_allocWithZone_, zone); - return NSObject._(_ret, retain: false, release: true); - } +abstract class NSBinarySearchingOptions { + static const int NSBinarySearchingFirstEqual = 256; + static const int NSBinarySearchingLastEqual = 512; + static const int NSBinarySearchingInsertionIndex = 1024; +} - static NSObject alloc() { - final _ret = _objc_msgSend_2(_class_NSObject, _sel_alloc); - return NSObject._(_ret, retain: false, release: true); - } +abstract class NSStringEnumerationOptions { + static const int NSStringEnumerationByLines = 0; + static const int NSStringEnumerationByParagraphs = 1; + static const int NSStringEnumerationByComposedCharacterSequences = 2; + static const int NSStringEnumerationByWords = 3; + static const int NSStringEnumerationBySentences = 4; + static const int NSStringEnumerationByCaretPositions = 5; + static const int NSStringEnumerationByDeletionClusters = 6; + static const int NSStringEnumerationReverse = 256; + static const int NSStringEnumerationSubstringNotRequired = 512; + static const int NSStringEnumerationLocalized = 1024; +} - void dealloc() { - _objc_msgSend_1(this.pointer, _sel_dealloc); - } +class NSBundle extends objc.NSObject { + NSBundle._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - void finalize() { - _objc_msgSend_1(this.pointer, _sel_finalize); - } + /// Constructs a [NSBundle] that points to the same underlying object as [other]. + NSBundle.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSObject copy() { - final _ret = _objc_msgSend_2(this.pointer, _sel_copy); - return NSObject._(_ret, retain: false, 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); - NSObject mutableCopy() { - final _ret = _objc_msgSend_2(this.pointer, _sel_mutableCopy); - return NSObject._(_ret, retain: false, release: true); + /// Returns whether [obj] is an instance of [NSBundle]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSBundle); } - static NSObject copyWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSObject, _sel_copyWithZone_, zone); - return NSObject._(_ret, retain: false, release: true); + static NSBundle getMainBundle() { + final _ret = _objc_msgSend_1(_class_NSBundle, _sel_mainBundle); + return NSBundle.castFromPointer(_ret, retain: true, release: true); } - static NSObject mutableCopyWithZone_(ffi.Pointer<_NSZone> zone) { + static NSBundle? bundleWithPath_(objc.NSString path) { final _ret = - _objc_msgSend_3(_class_NSObject, _sel_mutableCopyWithZone_, zone); - return NSObject._(_ret, retain: false, release: true); - } - - static bool instancesRespondToSelector_( - ffi.Pointer aSelector) { - return _objc_msgSend_4( - _class_NSObject, _sel_instancesRespondToSelector_, aSelector); - } - - static bool conformsToProtocol_(Protocol protocol) { - return _objc_msgSend_5( - _class_NSObject, _sel_conformsToProtocol_, protocol.pointer); - } - - ffi.Pointer> methodForSelector_( - ffi.Pointer aSelector) { - return _objc_msgSend_6(this.pointer, _sel_methodForSelector_, aSelector); - } - - static ffi.Pointer> - instanceMethodForSelector_(ffi.Pointer aSelector) { - return _objc_msgSend_6( - _class_NSObject, _sel_instanceMethodForSelector_, aSelector); - } - - void doesNotRecognizeSelector_(ffi.Pointer aSelector) { - _objc_msgSend_7(this.pointer, _sel_doesNotRecognizeSelector_, aSelector); - } - - NSObject forwardingTargetForSelector_( - ffi.Pointer aSelector) { - final _ret = _objc_msgSend_8( - this.pointer, _sel_forwardingTargetForSelector_, aSelector); - return NSObject._(_ret, retain: true, release: true); - } - - void forwardInvocation_(NSInvocation anInvocation) { - _objc_msgSend_421( - this.pointer, _sel_forwardInvocation_, anInvocation.pointer); - } - - NSMethodSignature methodSignatureForSelector_( - ffi.Pointer aSelector) { - final _ret = _objc_msgSend_422( - this.pointer, _sel_methodSignatureForSelector_, aSelector); - return NSMethodSignature._(_ret, retain: true, release: true); - } - - static NSMethodSignature instanceMethodSignatureForSelector_( - ffi.Pointer aSelector) { - final _ret = _objc_msgSend_422( - _class_NSObject, _sel_instanceMethodSignatureForSelector_, aSelector); - return NSMethodSignature._(_ret, retain: true, release: true); - } - - bool allowsWeakReference() { - return _objc_msgSend_12(this.pointer, _sel_allowsWeakReference); - } - - bool retainWeakReference() { - return _objc_msgSend_12(this.pointer, _sel_retainWeakReference); - } - - static bool isSubclassOfClass_(NSObject aClass) { - return _objc_msgSend_0( - _class_NSObject, _sel_isSubclassOfClass_, aClass.pointer); - } - - static bool resolveClassMethod_(ffi.Pointer sel) { - return _objc_msgSend_4(_class_NSObject, _sel_resolveClassMethod_, sel); - } - - static bool resolveInstanceMethod_(ffi.Pointer sel) { - return _objc_msgSend_4(_class_NSObject, _sel_resolveInstanceMethod_, sel); - } - - static int hash() { - return _objc_msgSend_10(_class_NSObject, _sel_hash); - } - - static NSObject superclass() { - final _ret = _objc_msgSend_2(_class_NSObject, _sel_superclass); - return NSObject._(_ret, retain: true, release: true); - } - - static NSObject class1() { - final _ret = _objc_msgSend_2(_class_NSObject, _sel_class); - return NSObject._(_ret, retain: true, release: true); - } - - static NSString description() { - final _ret = _objc_msgSend_21(_class_NSObject, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - static NSString debugDescription() { - final _ret = _objc_msgSend_21(_class_NSObject, _sel_debugDescription); - return NSString._(_ret, retain: true, release: true); - } - - static int version() { - return _objc_msgSend_83(_class_NSObject, _sel_version); - } - - static void setVersion_(int aVersion) { - _objc_msgSend_423(_class_NSObject, _sel_setVersion_, aVersion); - } - - NSObject get classForCoder { - final _ret = _objc_msgSend_2(this.pointer, _sel_classForCoder); - return NSObject._(_ret, retain: true, release: true); - } - - NSObject? replacementObjectForCoder_(NSCoder coder) { - final _ret = _objc_msgSend_47( - this.pointer, _sel_replacementObjectForCoder_, coder.pointer); + _objc_msgSend_2(_class_NSBundle, _sel_bundleWithPath_, path.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - NSObject? awakeAfterUsingCoder_(NSCoder coder) { - final _ret = _objc_msgSend_47( - this.pointer, _sel_awakeAfterUsingCoder_, coder.pointer); + NSBundle? initWithPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithPath_, path.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: false, release: true); - } - - static void poseAsClass_(NSObject aClass) { - _objc_msgSend_15(_class_NSObject, _sel_poseAsClass_, aClass.pointer); - } - - NSObject get autoContentAccessingProxy { - final _ret = _objc_msgSend_2(this.pointer, _sel_autoContentAccessingProxy); - return NSObject._(_ret, retain: true, release: true); - } - - void - attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_( - NSError error, - int recoveryOptionIndex, - NSObject? delegate, - ffi.Pointer didRecoverSelector, - ffi.Pointer contextInfo) { - _objc_msgSend_424( - this.pointer, - _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_, - error.pointer, - recoveryOptionIndex, - delegate?.pointer ?? ffi.nullptr, - didRecoverSelector, - contextInfo); + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - bool attemptRecoveryFromError_optionIndex_( - NSError error, int recoveryOptionIndex) { - return _objc_msgSend_425( - this.pointer, - _sel_attemptRecoveryFromError_optionIndex_, - error.pointer, - recoveryOptionIndex); + static NSBundle? bundleWithURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_3(_class_NSBundle, _sel_bundleWithURL_, url.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - void performSelector_withObject_afterDelay_inModes_( - ffi.Pointer aSelector, - NSObject? anArgument, - double delay, - NSArray modes) { - _objc_msgSend_426( - this.pointer, - _sel_performSelector_withObject_afterDelay_inModes_, - aSelector, - anArgument?.pointer ?? ffi.nullptr, - delay, - modes.pointer); + NSBundle? initWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_3(this.pointer, _sel_initWithURL_, url.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - void performSelector_withObject_afterDelay_( - ffi.Pointer aSelector, - NSObject? anArgument, - double delay) { - _objc_msgSend_427(this.pointer, _sel_performSelector_withObject_afterDelay_, - aSelector, anArgument?.pointer ?? ffi.nullptr, delay); + static NSBundle bundleForClass_(objc.NSObject aClass) { + final _ret = + _objc_msgSend_4(_class_NSBundle, _sel_bundleForClass_, aClass.pointer); + return NSBundle.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSObject, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + static NSBundle? bundleWithIdentifier_(objc.NSString identifier) { + final _ret = _objc_msgSend_5( + _class_NSBundle, _sel_bundleWithIdentifier_, identifier.pointer); + return _ret.address == 0 + ? null + : NSBundle.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSObject, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + static objc.NSArray getAllBundles() { + final _ret = _objc_msgSend_6(_class_NSBundle, _sel_allBundles); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void URL_resourceDataDidBecomeAvailable_(NSURL sender, NSData newBytes) { - _objc_msgSend_428(this.pointer, _sel_URL_resourceDataDidBecomeAvailable_, - sender.pointer, newBytes.pointer); + static objc.NSArray getAllFrameworks() { + final _ret = _objc_msgSend_6(_class_NSBundle, _sel_allFrameworks); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void URLResourceDidFinishLoading_(NSURL sender) { - _objc_msgSend_429( - this.pointer, _sel_URLResourceDidFinishLoading_, sender.pointer); + bool load() { + return _objc_msgSend_7(this.pointer, _sel_load); } - void URLResourceDidCancelLoading_(NSURL sender) { - _objc_msgSend_429( - this.pointer, _sel_URLResourceDidCancelLoading_, sender.pointer); + bool get loaded { + return _objc_msgSend_7(this.pointer, _sel_isLoaded); } - void URL_resourceDidFailLoadingWithReason_(NSURL sender, NSString reason) { - _objc_msgSend_430(this.pointer, _sel_URL_resourceDidFailLoadingWithReason_, - sender.pointer, reason.pointer); + bool unload() { + return _objc_msgSend_7(this.pointer, _sel_unload); } - bool fileManager_shouldProceedAfterError_( - NSFileManager fm, NSDictionary errorInfo) { - return _objc_msgSend_467( - this.pointer, - _sel_fileManager_shouldProceedAfterError_, - fm.pointer, - errorInfo.pointer); + bool preflightAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_preflightAndReturnError_, error); } - void fileManager_willProcessPath_(NSFileManager fm, NSString path) { - _objc_msgSend_468(this.pointer, _sel_fileManager_willProcessPath_, - fm.pointer, path.pointer); + bool loadAndReturnError_(ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_loadAndReturnError_, error); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSObject, _sel_accessInstanceVariablesDirectly); + objc.NSURL get bundleURL { + final _ret = _objc_msgSend_9(this.pointer, _sel_bundleURL); + return objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSObject? valueForKey_(NSString key) { - final _ret = _objc_msgSend_38(this.pointer, _sel_valueForKey_, key.pointer); + objc.NSURL? get resourceURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_resourceURL); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void setValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - bool validateValue_forKey_error_( - ffi.Pointer> ioValue, - NSString inKey, - ffi.Pointer> outError) { - return _objc_msgSend_243(this.pointer, _sel_validateValue_forKey_error_, - ioValue, inKey.pointer, outError); - } - - NSMutableArray mutableArrayValueForKey_(NSString key) { - final _ret = _objc_msgSend_488( - this.pointer, _sel_mutableArrayValueForKey_, key.pointer); - return NSMutableArray._(_ret, retain: true, release: true); - } - - NSMutableOrderedSet mutableOrderedSetValueForKey_(NSString key) { - final _ret = _objc_msgSend_506( - this.pointer, _sel_mutableOrderedSetValueForKey_, key.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - NSMutableSet mutableSetValueForKey_(NSString key) { - final _ret = _objc_msgSend_507( - this.pointer, _sel_mutableSetValueForKey_, key.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - NSObject? valueForKeyPath_(NSString keyPath) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_valueForKeyPath_, keyPath.pointer); + objc.NSURL? get executableURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_executableURL); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); - } - - void setValue_forKeyPath_(NSObject? value, NSString keyPath) { - _objc_msgSend_135(this.pointer, _sel_setValue_forKeyPath_, - value?.pointer ?? ffi.nullptr, keyPath.pointer); - } - - bool validateValue_forKeyPath_error_( - ffi.Pointer> ioValue, - NSString inKeyPath, - ffi.Pointer> outError) { - return _objc_msgSend_243(this.pointer, _sel_validateValue_forKeyPath_error_, - ioValue, inKeyPath.pointer, outError); - } - - NSMutableArray mutableArrayValueForKeyPath_(NSString keyPath) { - final _ret = _objc_msgSend_488( - this.pointer, _sel_mutableArrayValueForKeyPath_, keyPath.pointer); - return NSMutableArray._(_ret, retain: true, release: true); - } - - NSMutableOrderedSet mutableOrderedSetValueForKeyPath_(NSString keyPath) { - final _ret = _objc_msgSend_506( - this.pointer, _sel_mutableOrderedSetValueForKeyPath_, keyPath.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - NSMutableSet mutableSetValueForKeyPath_(NSString keyPath) { - final _ret = _objc_msgSend_507( - this.pointer, _sel_mutableSetValueForKeyPath_, keyPath.pointer); - return NSMutableSet._(_ret, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSObject? valueForUndefinedKey_(NSString key) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_valueForUndefinedKey_, key.pointer); + objc.NSURL? URLForAuxiliaryExecutable_(objc.NSString executableName) { + final _ret = _objc_msgSend_11( + this.pointer, _sel_URLForAuxiliaryExecutable_, executableName.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); - } - - void setValue_forUndefinedKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setValue_forUndefinedKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - void setNilValueForKey_(NSString key) { - _objc_msgSend_247(this.pointer, _sel_setNilValueForKey_, key.pointer); - } - - NSDictionary dictionaryWithValuesForKeys_(NSArray keys) { - final _ret = _objc_msgSend_508( - this.pointer, _sel_dictionaryWithValuesForKeys_, keys.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } - - void setValuesForKeysWithDictionary_(NSDictionary keyedValues) { - _objc_msgSend_509(this.pointer, _sel_setValuesForKeysWithDictionary_, - keyedValues.pointer); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSObject, _sel_useStoredAccessor); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSObject? storedValueForKey_(NSString key) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_storedValueForKey_, key.pointer); + objc.NSURL? get privateFrameworksURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_privateFrameworksURL); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); - } - - void takeStoredValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_takeStoredValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - void takeValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_takeValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - void takeValue_forKeyPath_(NSObject? value, NSString keyPath) { - _objc_msgSend_135(this.pointer, _sel_takeValue_forKeyPath_, - value?.pointer ?? ffi.nullptr, keyPath.pointer); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSObject? handleQueryWithUnboundKey_(NSString key) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_handleQueryWithUnboundKey_, key.pointer); + objc.NSURL? get sharedFrameworksURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_sharedFrameworksURL); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); - } - - void handleTakeValue_forUnboundKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_handleTakeValue_forUnboundKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - void unableToSetNilForKey_(NSString key) { - _objc_msgSend_247(this.pointer, _sel_unableToSetNilForKey_, key.pointer); - } - - NSDictionary valuesForKeys_(NSArray keys) { - final _ret = - _objc_msgSend_508(this.pointer, _sel_valuesForKeys_, keys.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } - - void takeValuesFromDictionary_(NSDictionary properties) { - _objc_msgSend_509( - this.pointer, _sel_takeValuesFromDictionary_, properties.pointer); - } - - void observeValueForKeyPath_ofObject_change_context_(NSString? keyPath, - NSObject? object, NSDictionary? change, ffi.Pointer context) { - _objc_msgSend_510( - this.pointer, - _sel_observeValueForKeyPath_ofObject_change_context_, - keyPath?.pointer ?? ffi.nullptr, - object?.pointer ?? ffi.nullptr, - change?.pointer ?? ffi.nullptr, - context); - } - - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _objc_msgSend_139( - this.pointer, - _sel_addObserver_forKeyPath_options_context_, - observer.pointer, - keyPath.pointer, - options, - context); - } - - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _objc_msgSend_140(this.pointer, _sel_removeObserver_forKeyPath_context_, - observer.pointer, keyPath.pointer, context); - } - - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _objc_msgSend_141(this.pointer, _sel_removeObserver_forKeyPath_, - observer.pointer, keyPath.pointer); - } - - void willChangeValueForKey_(NSString key) { - _objc_msgSend_247(this.pointer, _sel_willChangeValueForKey_, key.pointer); - } - - void didChangeValueForKey_(NSString key) { - _objc_msgSend_247(this.pointer, _sel_didChangeValueForKey_, key.pointer); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void willChange_valuesAtIndexes_forKey_( - int changeKind, NSIndexSet indexes, NSString key) { - _objc_msgSend_511(this.pointer, _sel_willChange_valuesAtIndexes_forKey_, - changeKind, indexes.pointer, key.pointer); + objc.NSURL? get sharedSupportURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_sharedSupportURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void didChange_valuesAtIndexes_forKey_( - int changeKind, NSIndexSet indexes, NSString key) { - _objc_msgSend_511(this.pointer, _sel_didChange_valuesAtIndexes_forKey_, - changeKind, indexes.pointer, key.pointer); + objc.NSURL? get builtInPlugInsURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_builtInPlugInsURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void willChangeValueForKey_withSetMutation_usingObjects_( - NSString key, int mutationKind, NSSet objects) { - _objc_msgSend_512( - this.pointer, - _sel_willChangeValueForKey_withSetMutation_usingObjects_, - key.pointer, - mutationKind, - objects.pointer); + objc.NSURL? get appStoreReceiptURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_appStoreReceiptURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void didChangeValueForKey_withSetMutation_usingObjects_( - NSString key, int mutationKind, NSSet objects) { - _objc_msgSend_512( - this.pointer, - _sel_didChangeValueForKey_withSetMutation_usingObjects_, - key.pointer, - mutationKind, - objects.pointer); + objc.NSString get bundlePath { + final _ret = _objc_msgSend_12(this.pointer, _sel_bundlePath); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSObject, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + objc.NSString? get resourcePath { + final _ret = _objc_msgSend_13(this.pointer, _sel_resourcePath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSObject, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + objc.NSString? get executablePath { + final _ret = _objc_msgSend_13(this.pointer, _sel_executablePath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer get observationInfo { - return _objc_msgSend_20(this.pointer, _sel_observationInfo); + objc.NSString? pathForAuxiliaryExecutable_(objc.NSString executableName) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_pathForAuxiliaryExecutable_, executableName.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set observationInfo(ffi.Pointer value) { - return _objc_msgSend_513(this.pointer, _sel_setObservationInfo_, value); + objc.NSString? get privateFrameworksPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_privateFrameworksPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSObject, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + objc.NSString? get sharedFrameworksPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_sharedFrameworksPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject? get classForKeyedArchiver { - final _ret = _objc_msgSend_17(this.pointer, _sel_classForKeyedArchiver); + objc.NSString? get sharedSupportPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_sharedSupportPath); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject? replacementObjectForKeyedArchiver_(NSKeyedArchiver archiver) { - final _ret = _objc_msgSend_528(this.pointer, - _sel_replacementObjectForKeyedArchiver_, archiver.pointer); + objc.NSString? get builtInPlugInsPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_builtInPlugInsPath); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSObject, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_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_15( + _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); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSObject, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSArray? + URLsForResourcesWithExtension_subdirectory_inBundleWithURL_( + objc.NSString? ext, objc.NSString? subpath, objc.NSURL bundleURL) { + final _ret = _objc_msgSend_16( + _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); } - void performSelectorOnMainThread_withObject_waitUntilDone_modes_( - ffi.Pointer aSelector, - NSObject? arg, - bool wait, - NSArray? array) { - _objc_msgSend_529( + objc.NSURL? URLForResource_withExtension_( + objc.NSString? name, objc.NSString? ext) { + final _ret = _objc_msgSend_17( this.pointer, - _sel_performSelectorOnMainThread_withObject_waitUntilDone_modes_, - aSelector, - arg?.pointer ?? ffi.nullptr, - wait, - array?.pointer ?? ffi.nullptr); + _sel_URLForResource_withExtension_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void performSelectorOnMainThread_withObject_waitUntilDone_( - ffi.Pointer aSelector, NSObject? arg, bool wait) { - _objc_msgSend_530( + objc.NSURL? URLForResource_withExtension_subdirectory_( + objc.NSString? name, objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_18( this.pointer, - _sel_performSelectorOnMainThread_withObject_waitUntilDone_, - aSelector, - arg?.pointer ?? ffi.nullptr, - wait); + _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); } - void performSelector_onThread_withObject_waitUntilDone_modes_( - ffi.Pointer aSelector, - NSThread thr, - NSObject? arg, - bool wait, - NSArray? array) { - _objc_msgSend_548( + objc.NSURL? URLForResource_withExtension_subdirectory_localization_( + objc.NSString? name, + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_19( this.pointer, - _sel_performSelector_onThread_withObject_waitUntilDone_modes_, - aSelector, - thr.pointer, - arg?.pointer ?? ffi.nullptr, - wait, - array?.pointer ?? ffi.nullptr); + _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); } - void performSelector_onThread_withObject_waitUntilDone_( - ffi.Pointer aSelector, - NSThread thr, - NSObject? arg, - bool wait) { - _objc_msgSend_549( + objc.NSArray? URLsForResourcesWithExtension_subdirectory_( + objc.NSString? ext, objc.NSString? subpath) { + final _ret = _objc_msgSend_20( this.pointer, - _sel_performSelector_onThread_withObject_waitUntilDone_, - aSelector, - thr.pointer, - arg?.pointer ?? ffi.nullptr, - wait); - } - - void performSelectorInBackground_withObject_( - ffi.Pointer aSelector, NSObject? arg) { - _objc_msgSend_90(this.pointer, _sel_performSelectorInBackground_withObject_, - aSelector, arg?.pointer ?? ffi.nullptr); - } - - NSObject? get classForArchiver { - final _ret = _objc_msgSend_17(this.pointer, _sel_classForArchiver); + _sel_URLsForResourcesWithExtension_subdirectory_, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSObject? replacementObjectForArchiver_(NSArchiver archiver) { - final _ret = _objc_msgSend_552( - this.pointer, _sel_replacementObjectForArchiver_, archiver.pointer); + objc.NSArray? URLsForResourcesWithExtension_subdirectory_localization_( + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_21( + this.pointer, + _sel_URLsForResourcesWithExtension_subdirectory_localization_, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + localizationName?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSObject get classForPortCoder { - final _ret = _objc_msgSend_2(this.pointer, _sel_classForPortCoder); - return NSObject._(_ret, retain: true, release: true); - } - - NSObject? replacementObjectForPortCoder_(NSPortCoder coder) { - final _ret = _objc_msgSend_597( - this.pointer, _sel_replacementObjectForPortCoder_, coder.pointer); + static objc.NSString? pathForResource_ofType_inDirectory_( + objc.NSString? name, objc.NSString? ext, objc.NSString bundlePath) { + final _ret = _objc_msgSend_22( + _class_NSBundle, + _sel_pathForResource_ofType_inDirectory_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr, + bundlePath.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSClassDescription get classDescription { - final _ret = _objc_msgSend_600(this.pointer, _sel_classDescription); - return NSClassDescription._(_ret, retain: true, release: true); - } - - NSArray get attributeKeys { - final _ret = _objc_msgSend_85(this.pointer, _sel_attributeKeys); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get toOneRelationshipKeys { - final _ret = _objc_msgSend_85(this.pointer, _sel_toOneRelationshipKeys); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get toManyRelationshipKeys { - final _ret = _objc_msgSend_85(this.pointer, _sel_toManyRelationshipKeys); - return NSArray._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? inverseForRelationshipKey_(NSString relationshipKey) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_inverseForRelationshipKey_, relationshipKey.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static objc.NSArray pathsForResourcesOfType_inDirectory_( + objc.NSString? ext, objc.NSString bundlePath) { + final _ret = _objc_msgSend_23( + _class_NSBundle, + _sel_pathsForResourcesOfType_inDirectory_, + ext?.pointer ?? ffi.nullptr, + bundlePath.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSObject? scriptingValueForSpecifier_( - NSScriptObjectSpecifier objectSpecifier) { - final _ret = _objc_msgSend_649(this.pointer, - _sel_scriptingValueForSpecifier_, objectSpecifier.pointer); + objc.NSString? pathForResource_ofType_( + objc.NSString? name, objc.NSString? ext) { + final _ret = _objc_msgSend_24(this.pointer, _sel_pathForResource_ofType_, + name?.pointer ?? ffi.nullptr, ext?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get scriptingProperties { - final _ret = _objc_msgSend_390(this.pointer, _sel_scriptingProperties); + objc.NSString? pathForResource_ofType_inDirectory_forLocalization_( + objc.NSString? name, + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_25( + this.pointer, + _sel_pathForResource_ofType_inDirectory_forLocalization_, + name?.pointer ?? ffi.nullptr, + ext?.pointer ?? ffi.nullptr, + subpath?.pointer ?? ffi.nullptr, + localizationName?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set scriptingProperties(NSDictionary? value) { - return _objc_msgSend_634(this.pointer, _sel_setScriptingProperties_, - value?.pointer ?? ffi.nullptr); + objc.NSArray pathsForResourcesOfType_inDirectory_forLocalization_( + objc.NSString? ext, + objc.NSString? subpath, + objc.NSString? localizationName) { + final _ret = _objc_msgSend_26( + 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); } - NSObject? copyScriptingValue_forKey_withProperties_( - NSObject value, NSString key, NSDictionary properties) { - final _ret = _objc_msgSend_650( + objc.NSString localizedStringForKey_value_table_( + objc.NSString key, objc.NSString? value, objc.NSString? tableName) { + final _ret = _objc_msgSend_27( this.pointer, - _sel_copyScriptingValue_forKey_withProperties_, - value.pointer, + _sel_localizedStringForKey_value_table_, key.pointer, - properties.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: false, release: true); + value?.pointer ?? ffi.nullptr, + tableName?.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject? - newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_( - NSObject objectClass, - NSString key, - NSObject? contentsValue, - NSDictionary properties) { - final _ret = _objc_msgSend_651( + NSAttributedString localizedAttributedStringForKey_value_table_( + objc.NSString key, objc.NSString? value, objc.NSString? tableName) { + final _ret = _objc_msgSend_64( this.pointer, - _sel_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_, - objectClass.pointer, + _sel_localizedAttributedStringForKey_value_table_, key.pointer, - contentsValue?.pointer ?? ffi.nullptr, - properties.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: false, release: true); - } - - int get classCode { - return _objc_msgSend_214(this.pointer, _sel_classCode); + value?.pointer ?? ffi.nullptr, + tableName?.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSString? get className { - final _ret = _objc_msgSend_44(this.pointer, _sel_className); + objc.NSString? get bundleIdentifier { + final _ret = _objc_msgSend_13(this.pointer, _sel_bundleIdentifier); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject? valueAtIndex_inPropertyWithKey_(int index, NSString key) { - final _ret = _objc_msgSend_652( - this.pointer, _sel_valueAtIndex_inPropertyWithKey_, index, key.pointer); + objc.NSDictionary? get infoDictionary { + final _ret = _objc_msgSend_65(this.pointer, _sel_infoDictionary); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSObject? valueWithName_inPropertyWithKey_(NSString name, NSString key) { - final _ret = _objc_msgSend_175(this.pointer, - _sel_valueWithName_inPropertyWithKey_, name.pointer, key.pointer); + objc.NSDictionary? get localizedInfoDictionary { + final _ret = _objc_msgSend_65(this.pointer, _sel_localizedInfoDictionary); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSObject? valueWithUniqueID_inPropertyWithKey_( - NSObject uniqueID, NSString key) { - final _ret = _objc_msgSend_311( - this.pointer, - _sel_valueWithUniqueID_inPropertyWithKey_, - uniqueID.pointer, - key.pointer); + objc.NSObject? objectForInfoDictionaryKey_(objc.NSString key) { + final _ret = _objc_msgSend_2( + this.pointer, _sel_objectForInfoDictionaryKey_, key.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void insertValue_atIndex_inPropertyWithKey_( - NSObject value, int index, NSString key) { - _objc_msgSend_653(this.pointer, _sel_insertValue_atIndex_inPropertyWithKey_, - value.pointer, index, key.pointer); - } - - void removeValueAtIndex_fromPropertyWithKey_(int index, NSString key) { - _objc_msgSend_654(this.pointer, - _sel_removeValueAtIndex_fromPropertyWithKey_, index, key.pointer); + objc.NSObject? classNamed_(objc.NSString className) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_classNamed_, className.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void replaceValueAtIndex_inPropertyWithKey_withValue_( - int index, NSString key, NSObject value) { - _objc_msgSend_655( - this.pointer, - _sel_replaceValueAtIndex_inPropertyWithKey_withValue_, - index, - key.pointer, - value.pointer); + objc.NSObject? get principalClass { + final _ret = _objc_msgSend_66(this.pointer, _sel_principalClass); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void insertValue_inPropertyWithKey_(NSObject value, NSString key) { - _objc_msgSend_656(this.pointer, _sel_insertValue_inPropertyWithKey_, - value.pointer, key.pointer); + objc.NSArray get preferredLocalizations { + final _ret = _objc_msgSend_6(this.pointer, _sel_preferredLocalizations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSObject? coerceValue_forKey_(NSObject? value, NSString key) { - final _ret = _objc_msgSend_657(this.pointer, _sel_coerceValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + objc.NSArray get localizations { + final _ret = _objc_msgSend_6(this.pointer, _sel_localizations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSScriptObjectSpecifier? get objectSpecifier { - final _ret = _objc_msgSend_632(this.pointer, _sel_objectSpecifier); + objc.NSString? get developmentLocalization { + final _ret = _objc_msgSend_13(this.pointer, _sel_developmentLocalization); return _ret.address == 0 ? null - : NSScriptObjectSpecifier._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSArray? indicesOfObjectsByEvaluatingObjectSpecifier_( - NSScriptObjectSpecifier specifier) { - final _ret = _objc_msgSend_658(this.pointer, - _sel_indicesOfObjectsByEvaluatingObjectSpecifier_, specifier.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + static objc.NSArray preferredLocalizationsFromArray_( + objc.NSArray localizationsArray) { + final _ret = _objc_msgSend_67(_class_NSBundle, + _sel_preferredLocalizationsFromArray_, localizationsArray.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool isEqualTo_(NSObject? object) { - return _objc_msgSend_217( - this.pointer, _sel_isEqualTo_, object?.pointer ?? ffi.nullptr); + static objc.NSArray preferredLocalizationsFromArray_forPreferences_( + objc.NSArray localizationsArray, objc.NSArray? preferencesArray) { + final _ret = _objc_msgSend_68( + _class_NSBundle, + _sel_preferredLocalizationsFromArray_forPreferences_, + localizationsArray.pointer, + preferencesArray?.pointer ?? ffi.nullptr); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool isLessThanOrEqualTo_(NSObject? object) { - return _objc_msgSend_217(this.pointer, _sel_isLessThanOrEqualTo_, - object?.pointer ?? ffi.nullptr); + objc.NSArray? get executableArchitectures { + final _ret = _objc_msgSend_69(this.pointer, _sel_executableArchitectures); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool isLessThan_(NSObject? object) { - return _objc_msgSend_217( - this.pointer, _sel_isLessThan_, object?.pointer ?? ffi.nullptr); + void setPreservationPriority_forTags_(double priority, objc.NSSet tags) { + _objc_msgSend_70(this.pointer, _sel_setPreservationPriority_forTags_, + priority, tags.pointer); } - bool isGreaterThanOrEqualTo_(NSObject? object) { - return _objc_msgSend_217(this.pointer, _sel_isGreaterThanOrEqualTo_, - object?.pointer ?? ffi.nullptr); + double preservationPriorityForTag_(objc.NSString tag) { + return objc.useMsgSendVariants + ? _objc_msgSend_71Fpret( + this.pointer, _sel_preservationPriorityForTag_, tag.pointer) + : _objc_msgSend_71( + this.pointer, _sel_preservationPriorityForTag_, tag.pointer); } - bool isGreaterThan_(NSObject? object) { - return _objc_msgSend_217( - this.pointer, _sel_isGreaterThan_, object?.pointer ?? ffi.nullptr); + @override + NSBundle init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSBundle.castFromPointer(_ret, retain: true, release: true); } - bool isNotEqualTo_(NSObject? object) { - return _objc_msgSend_217( - this.pointer, _sel_isNotEqualTo_, object?.pointer ?? ffi.nullptr); + static NSBundle new1() { + final _ret = _objc_msgSend_40(_class_NSBundle, _sel_new); + return NSBundle.castFromPointer(_ret, retain: false, release: true); } - bool doesContain_(NSObject object) { - return _objc_msgSend_0(this.pointer, _sel_doesContain_, object.pointer); + static NSBundle allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSBundle, _sel_allocWithZone_, zone); + return NSBundle.castFromPointer(_ret, retain: false, release: true); } - bool isLike_(NSString object) { - return _objc_msgSend_64(this.pointer, _sel_isLike_, object.pointer); + static NSBundle alloc() { + final _ret = _objc_msgSend_40(_class_NSBundle, _sel_alloc); + return NSBundle.castFromPointer(_ret, retain: false, release: true); } - bool isCaseInsensitiveLike_(NSString object) { - return _objc_msgSend_64( - this.pointer, _sel_isCaseInsensitiveLike_, object.pointer); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSBundle, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - bool scriptingIsEqualTo_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingIsEqualTo_, object.pointer); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSBundle, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - bool scriptingIsLessThanOrEqualTo_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingIsLessThanOrEqualTo_, object.pointer); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSBundle, _sel_accessInstanceVariablesDirectly); } - bool scriptingIsLessThan_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingIsLessThan_, object.pointer); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSBundle, _sel_useStoredAccessor); } - bool scriptingIsGreaterThanOrEqualTo_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingIsGreaterThanOrEqualTo_, object.pointer); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSBundle, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - bool scriptingIsGreaterThan_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingIsGreaterThan_, object.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSBundle, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - bool scriptingBeginsWith_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingBeginsWith_, object.pointer); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSBundle, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - bool scriptingEndsWith_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingEndsWith_, object.pointer); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSBundle, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool scriptingContains_(NSObject object) { - return _objc_msgSend_0( - this.pointer, _sel_scriptingContains_, object.pointer); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSBundle, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSObject = objc.getClass("NSObject"); -late final _sel_load = objc.registerName("load"); +late final _class_NSBundle = objc.getClass("NSBundle"); +late final _sel_mainBundle = objc.registerName("mainBundle"); final _objc_msgSend_1 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_initialize = objc.registerName("initialize"); typedef instancetype = ffi.Pointer; -typedef Dartinstancetype = NSObject; -late final _sel_init = objc.registerName("init"); +typedef Dartinstancetype = objc.NSObject; +late final _sel_bundleWithPath_ = objc.registerName("bundleWithPath:"); final _objc_msgSend_2 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_new = objc.registerName("new"); - -final class _NSZone extends ffi.Opaque {} - -late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); -final _objc_msgSend_3 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>>() + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>(); -late final _sel_alloc = objc.registerName("alloc"); -late final _sel_dealloc = objc.registerName("dealloc"); -late final _sel_finalize = objc.registerName("finalize"); -late final _sel_copy = objc.registerName("copy"); -late final _sel_mutableCopy = objc.registerName("mutableCopy"); -late final _sel_copyWithZone_ = objc.registerName("copyWithZone:"); -late final _sel_mutableCopyWithZone_ = - objc.registerName("mutableCopyWithZone:"); -late final _sel_instancesRespondToSelector_ = - objc.registerName("instancesRespondToSelector:"); -final _objc_msgSend_4 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithPath_ = objc.registerName("initWithPath:"); +late final _sel_bundleWithURL_ = objc.registerName("bundleWithURL:"); +final _objc_msgSend_3 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer)>>() .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -class Protocol extends objc.ObjCObjectBase { - Protocol._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super(pointer, retain: retain, release: release); - - /// Returns a [Protocol] that points to the same underlying object as [other]. - static Protocol castFrom(T other) { - return Protocol._(other.pointer, retain: true, release: true); - } - - /// Returns a [Protocol] that wraps the given raw object pointer. - static Protocol castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return Protocol._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [Protocol]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_Protocol); - } -} - -final _objc_msgSend_0 = objc.msgSendPointer + 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_4 = 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_isKindOfClass_ = objc.registerName("isKindOfClass:"); -late final _class_Protocol = objc.getClass("Protocol"); -late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); +late final _sel_bundleWithIdentifier_ = + objc.registerName("bundleWithIdentifier:"); final _objc_msgSend_5 = 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_methodForSelector_ = objc.registerName("methodForSelector:"); +late final _sel_allBundles = objc.registerName("allBundles"); final _objc_msgSend_6 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer> Function( - ffi.Pointer, - ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer> Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_instanceMethodForSelector_ = - objc.registerName("instanceMethodForSelector:"); -late final _sel_doesNotRecognizeSelector_ = - objc.registerName("doesNotRecognizeSelector:"); -final _objc_msgSend_7 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allFrameworks = objc.registerName("allFrameworks"); +late final _sel_load = objc.registerName("load"); +final _objc_msgSend_7 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, + ffi.Bool Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_forwardingTargetForSelector_ = - objc.registerName("forwardingTargetForSelector:"); + bool Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isLoaded = objc.registerName("isLoaded"); +late final _sel_unload = objc.registerName("unload"); +late final _sel_preflightAndReturnError_ = + objc.registerName("preflightAndReturnError:"); final _objc_msgSend_8 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer>)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -class NSInvocation extends NSObject { - NSInvocation._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSInvocation] that points to the same underlying object as [other]. - static NSInvocation castFrom(T other) { - return NSInvocation._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSInvocation] that wraps the given raw object pointer. - static NSInvocation castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInvocation._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSInvocation]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSInvocation); - } - - static NSInvocation invocationWithMethodSignature_(NSMethodSignature sig) { - final _ret = _objc_msgSend_414( - _class_NSInvocation, _sel_invocationWithMethodSignature_, sig.pointer); - return NSInvocation._(_ret, retain: true, release: true); - } - - NSMethodSignature get methodSignature { - final _ret = _objc_msgSend_415(this.pointer, _sel_methodSignature); - return NSMethodSignature._(_ret, retain: true, release: true); - } - - void retainArguments() { - _objc_msgSend_1(this.pointer, _sel_retainArguments); - } - - bool get argumentsRetained { - return _objc_msgSend_12(this.pointer, _sel_argumentsRetained); - } - - NSObject? get target { - final _ret = _objc_msgSend_17(this.pointer, _sel_target); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set target(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setTarget_, value?.pointer ?? ffi.nullptr); - } - - ffi.Pointer get selector { - return _objc_msgSend_417(this.pointer, _sel_selector); - } - - set selector(ffi.Pointer value) { - return _objc_msgSend_418(this.pointer, _sel_setSelector_, value); - } - - void getReturnValue_(ffi.Pointer retLoc) { - _objc_msgSend_52(this.pointer, _sel_getReturnValue_, retLoc); - } - - void setReturnValue_(ffi.Pointer retLoc) { - _objc_msgSend_52(this.pointer, _sel_setReturnValue_, retLoc); - } - - void getArgument_atIndex_(ffi.Pointer argumentLocation, int idx) { - _objc_msgSend_419( - this.pointer, _sel_getArgument_atIndex_, argumentLocation, idx); - } - - void setArgument_atIndex_(ffi.Pointer argumentLocation, int idx) { - _objc_msgSend_419( - this.pointer, _sel_setArgument_atIndex_, argumentLocation, idx); - } - - void invoke() { - _objc_msgSend_1(this.pointer, _sel_invoke); - } - - void invokeWithTarget_(NSObject target) { - _objc_msgSend_15(this.pointer, _sel_invokeWithTarget_, target.pointer); - } - - void invokeUsingIMP_( - ffi.Pointer> imp) { - _objc_msgSend_420(this.pointer, _sel_invokeUsingIMP_, imp); - } - - @override - NSInvocation init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSInvocation._(_ret, retain: true, release: true); - } - - static NSInvocation new1() { - final _ret = _objc_msgSend_2(_class_NSInvocation, _sel_new); - return NSInvocation._(_ret, retain: false, release: true); - } - - static NSInvocation allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSInvocation, _sel_allocWithZone_, zone); - return NSInvocation._(_ret, retain: false, release: true); - } - - static NSInvocation alloc() { - final _ret = _objc_msgSend_2(_class_NSInvocation, _sel_alloc); - return NSInvocation._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSInvocation, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSInvocation, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSInvocation, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSInvocation, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSInvocation, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSInvocation, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSInvocation, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSInvocation, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSInvocation, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSInvocation = objc.getClass("NSInvocation"); - -class NSMethodSignature extends NSObject { - NSMethodSignature._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMethodSignature] that points to the same underlying object as [other]. - static NSMethodSignature castFrom(T other) { - return NSMethodSignature._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSMethodSignature] that wraps the given raw object pointer. - static NSMethodSignature castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMethodSignature._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMethodSignature]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMethodSignature); - } - - static NSMethodSignature? signatureWithObjCTypes_( - ffi.Pointer types) { - final _ret = _objc_msgSend_9( - _class_NSMethodSignature, _sel_signatureWithObjCTypes_, types); - return _ret.address == 0 - ? null - : NSMethodSignature._(_ret, retain: true, release: true); - } - - int get numberOfArguments { - return _objc_msgSend_10(this.pointer, _sel_numberOfArguments); - } - - ffi.Pointer getArgumentTypeAtIndex_(int idx) { - return _objc_msgSend_11(this.pointer, _sel_getArgumentTypeAtIndex_, idx); - } - - int get frameLength { - return _objc_msgSend_10(this.pointer, _sel_frameLength); - } - - bool isOneway() { - return _objc_msgSend_12(this.pointer, _sel_isOneway); - } - - ffi.Pointer get methodReturnType { - return _objc_msgSend_13(this.pointer, _sel_methodReturnType); - } - - int get methodReturnLength { - return _objc_msgSend_10(this.pointer, _sel_methodReturnLength); - } - - @override - NSMethodSignature init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMethodSignature._(_ret, retain: true, release: true); - } - - static NSMethodSignature new1() { - final _ret = _objc_msgSend_2(_class_NSMethodSignature, _sel_new); - return NSMethodSignature._(_ret, retain: false, release: true); - } - - static NSMethodSignature allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMethodSignature, _sel_allocWithZone_, zone); - return NSMethodSignature._(_ret, retain: false, release: true); - } - - static NSMethodSignature alloc() { - final _ret = _objc_msgSend_2(_class_NSMethodSignature, _sel_alloc); - return NSMethodSignature._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMethodSignature, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMethodSignature, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMethodSignature, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMethodSignature, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMethodSignature, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMethodSignature, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMethodSignature, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMethodSignature, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSMethodSignature, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSMethodSignature = objc.getClass("NSMethodSignature"); -late final _sel_signatureWithObjCTypes_ = - objc.registerName("signatureWithObjCTypes:"); + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_loadAndReturnError_ = objc.registerName("loadAndReturnError:"); +late final _sel_bundleURL = objc.registerName("bundleURL"); final _objc_msgSend_9 = 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)>(); -late final _sel_numberOfArguments = objc.registerName("numberOfArguments"); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_resourceURL = objc.registerName("resourceURL"); final _objc_msgSend_10 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_getArgumentTypeAtIndex_ = - objc.registerName("getArgumentTypeAtIndex:"); +late final _sel_executableURL = objc.registerName("executableURL"); +late final _sel_URLForAuxiliaryExecutable_ = + objc.registerName("URLForAuxiliaryExecutable:"); final _objc_msgSend_11 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_frameLength = objc.registerName("frameLength"); -late final _sel_isOneway = objc.registerName("isOneway"); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_privateFrameworksURL = + objc.registerName("privateFrameworksURL"); +late final _sel_sharedFrameworksURL = objc.registerName("sharedFrameworksURL"); +late final _sel_sharedSupportURL = objc.registerName("sharedSupportURL"); +late final _sel_builtInPlugInsURL = objc.registerName("builtInPlugInsURL"); +late final _sel_appStoreReceiptURL = objc.registerName("appStoreReceiptURL"); +late final _sel_bundlePath = objc.registerName("bundlePath"); final _objc_msgSend_12 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_methodReturnType = objc.registerName("methodReturnType"); +late final _sel_resourcePath = objc.registerName("resourcePath"); final _objc_msgSend_13 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_methodReturnLength = objc.registerName("methodReturnLength"); -late final _sel_cancelPreviousPerformRequestsWithTarget_selector_object_ = objc - .registerName("cancelPreviousPerformRequestsWithTarget:selector:object:"); +late final _sel_executablePath = objc.registerName("executablePath"); +late final _sel_pathForAuxiliaryExecutable_ = + objc.registerName("pathForAuxiliaryExecutable:"); final _objc_msgSend_14 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_privateFrameworksPath = + objc.registerName("privateFrameworksPath"); +late final _sel_sharedFrameworksPath = + objc.registerName("sharedFrameworksPath"); +late final _sel_sharedSupportPath = objc.registerName("sharedSupportPath"); +late final _sel_builtInPlugInsPath = objc.registerName("builtInPlugInsPath"); +late final _sel_URLForResource_withExtension_subdirectory_inBundleWithURL_ = + objc.registerName( + "URLForResource:withExtension:subdirectory:inBundleWithURL:"); +final _objc_msgSend_15 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( + 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_16 = 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_cancelPreviousPerformRequestsWithTarget_ = - objc.registerName("cancelPreviousPerformRequestsWithTarget:"); -final _objc_msgSend_15 = objc.msgSendPointer +late final _sel_URLForResource_withExtension_ = + objc.registerName("URLForResource:withExtension:"); +final _objc_msgSend_17 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_accessInstanceVariablesDirectly = - objc.registerName("accessInstanceVariablesDirectly"); -late final _sel_useStoredAccessor = objc.registerName("useStoredAccessor"); + 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_18 = 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_19 = 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_20 = 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_21 = 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_22 = 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_23 = 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_24 = 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_25 = 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_26 = 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_27 = 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)>(); -class NSSet extends NSObject { - NSSet._(ffi.Pointer pointer, +class NSAttributedString extends objc.NSObject { + NSAttributedString._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSSet] that points to the same underlying object as [other]. - static NSSet castFrom(T other) { - return NSSet._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSAttributedString] that points to the same underlying object as [other]. + NSAttributedString.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSSet] that wraps the given raw object pointer. - static NSSet castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSSet._(other, retain: retain, release: release); - } + /// 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 [NSSet]. + /// Returns whether [obj] is an instance of [NSAttributedString]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSSet); - } - - int get count { - return _objc_msgSend_10(this.pointer, _sel_count); - } - - NSObject? member_(NSObject object) { - final _ret = _objc_msgSend_16(this.pointer, _sel_member_, object.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSAttributedString); } - NSEnumerator objectEnumerator() { - final _ret = _objc_msgSend_77(this.pointer, _sel_objectEnumerator); - return NSEnumerator._(_ret, retain: true, release: true); + objc.NSString get string { + final _ret = _objc_msgSend_12(this.pointer, _sel_string); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSSet init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSSet._(_ret, retain: true, release: true); + objc.NSDictionary attributesAtIndex_effectiveRange_( + int location, ffi.Pointer<_NSRange> range) { + final _ret = _objc_msgSend_28( + this.pointer, _sel_attributesAtIndex_effectiveRange_, location, range); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - this.pointer, _sel_initWithObjects_count_, objects, cnt); - return NSSet._(_ret, retain: true, release: true); + int get length { + return _objc_msgSend_29(this.pointer, _sel_length); } - NSSet? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); + objc.NSObject? attribute_atIndex_effectiveRange_( + objc.NSString attrName, int location, ffi.Pointer<_NSRange> range) { + final _ret = _objc_msgSend_30( + this.pointer, + _sel_attribute_atIndex_effectiveRange_, + attrName.pointer, + location, + range); return _ret.address == 0 ? null - : NSSet._(_ret, retain: true, release: true); - } - - NSArray get allObjects { - final _ret = _objc_msgSend_85(this.pointer, _sel_allObjects); - return NSArray._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSObject? anyObject() { - final _ret = _objc_msgSend_17(this.pointer, _sel_anyObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + NSAttributedString attributedSubstringFromRange_(_NSRange range) { + final _ret = _objc_msgSend_31( + this.pointer, _sel_attributedSubstringFromRange_, range); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - bool containsObject_(NSObject anObject) { - return _objc_msgSend_0( - this.pointer, _sel_containsObject_, anObject.pointer); - } - - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _objc_msgSend_70(this.pointer, _sel_descriptionWithLocale_, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } - - bool intersectsSet_(NSSet otherSet) { - return _objc_msgSend_403( - this.pointer, _sel_intersectsSet_, otherSet.pointer); - } - - bool isEqualToSet_(NSSet otherSet) { - return _objc_msgSend_403( - this.pointer, _sel_isEqualToSet_, otherSet.pointer); - } - - bool isSubsetOfSet_(NSSet otherSet) { - return _objc_msgSend_403( - this.pointer, _sel_isSubsetOfSet_, otherSet.pointer); - } - - void makeObjectsPerformSelector_(ffi.Pointer aSelector) { - _objc_msgSend_7(this.pointer, _sel_makeObjectsPerformSelector_, aSelector); - } - - void makeObjectsPerformSelector_withObject_( - ffi.Pointer aSelector, NSObject? argument) { - _objc_msgSend_90(this.pointer, _sel_makeObjectsPerformSelector_withObject_, - aSelector, argument?.pointer ?? ffi.nullptr); - } - - NSSet setByAddingObject_(NSObject anObject) { - final _ret = _objc_msgSend_404( - this.pointer, _sel_setByAddingObject_, anObject.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - NSSet setByAddingObjectsFromSet_(NSSet other) { - final _ret = _objc_msgSend_405( - this.pointer, _sel_setByAddingObjectsFromSet_, other.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - NSSet setByAddingObjectsFromArray_(NSArray other) { - final _ret = _objc_msgSend_406( - this.pointer, _sel_setByAddingObjectsFromArray_, other.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - void enumerateObjectsUsingBlock_( - ObjCBlock_ffiVoid_objcObjCObject_bool block) { - _objc_msgSend_407( - this.pointer, _sel_enumerateObjectsUsingBlock_, block.pointer); + objc.NSDictionary attributesAtIndex_longestEffectiveRange_inRange_( + int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { + final _ret = _objc_msgSend_32( + this.pointer, + _sel_attributesAtIndex_longestEffectiveRange_inRange_, + location, + range, + rangeLimit); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - void enumerateObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_objcObjCObject_bool block) { - _objc_msgSend_408(this.pointer, - _sel_enumerateObjectsWithOptions_usingBlock_, opts, block.pointer); + objc.NSObject? attribute_atIndex_longestEffectiveRange_inRange_( + objc.NSString attrName, + int location, + ffi.Pointer<_NSRange> range, + _NSRange rangeLimit) { + final _ret = _objc_msgSend_33( + this.pointer, + _sel_attribute_atIndex_longestEffectiveRange_inRange_, + attrName.pointer, + location, + range, + rangeLimit); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSSet objectsPassingTest_(ObjCBlock_bool_objcObjCObject_bool predicate) { - final _ret = _objc_msgSend_409( - this.pointer, _sel_objectsPassingTest_, predicate.pointer); - return NSSet._(_ret, retain: true, release: true); + bool isEqualToAttributedString_(NSAttributedString other) { + return _objc_msgSend_34( + this.pointer, _sel_isEqualToAttributedString_, other.pointer); } - NSSet objectsWithOptions_passingTest_( - int opts, ObjCBlock_bool_objcObjCObject_bool predicate) { - final _ret = _objc_msgSend_410(this.pointer, - _sel_objectsWithOptions_passingTest_, opts, predicate.pointer); - return NSSet._(_ret, retain: true, release: true); + NSAttributedString initWithString_(objc.NSString str) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithString_, str.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSSet set1() { - final _ret = _objc_msgSend_2(_class_NSSet, _sel_set); - return NSSet._(_ret, retain: true, release: true); + NSAttributedString initWithString_attributes_( + objc.NSString str, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_36(this.pointer, _sel_initWithString_attributes_, + str.pointer, attrs?.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSSet setWithObject_(NSObject object) { - final _ret = - _objc_msgSend_124(_class_NSSet, _sel_setWithObject_, object.pointer); - return NSSet._(_ret, retain: true, release: true); + NSAttributedString initWithAttributedString_(NSAttributedString attrStr) { + final _ret = _objc_msgSend_37( + this.pointer, _sel_initWithAttributedString_, attrStr.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSSet setWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - _class_NSSet, _sel_setWithObjects_count_, objects, cnt); - return NSSet._(_ret, retain: true, release: true); + void enumerateAttributesInRange_options_usingBlock_(_NSRange enumerationRange, + int opts, ObjCBlock_ffiVoid_NSDictionary_NSRange_bool block) { + _objc_msgSend_38( + this.pointer, + _sel_enumerateAttributesInRange_options_usingBlock_, + enumerationRange, + opts, + block.pointer); } - static NSSet setWithObjects_(NSObject firstObj) { - final _ret = - _objc_msgSend_124(_class_NSSet, _sel_setWithObjects_, firstObj.pointer); - return NSSet._(_ret, retain: true, release: true); + void enumerateAttribute_inRange_options_usingBlock_( + objc.NSString attrName, + _NSRange enumerationRange, + int opts, + ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool block) { + _objc_msgSend_39( + this.pointer, + _sel_enumerateAttribute_inRange_options_usingBlock_, + attrName.pointer, + enumerationRange, + opts, + block.pointer); } - static NSSet setWithSet_(NSSet set) { - final _ret = _objc_msgSend_411(_class_NSSet, _sel_setWithSet_, set.pointer); - return NSSet._(_ret, retain: true, release: true); + NSAttributedString? + initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( + objc.NSURL markdownFile, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_53( + this.pointer, + _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, + markdownFile.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - static NSSet setWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(_class_NSSet, _sel_setWithArray_, array.pointer); - return NSSet._(_ret, retain: true, release: true); + NSAttributedString? initWithMarkdown_options_baseURL_error_( + objc.NSData markdown, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_54( + this.pointer, + _sel_initWithMarkdown_options_baseURL_error_, + markdown.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - NSSet initWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjects_, firstObj.pointer); - return NSSet._(_ret, retain: true, release: true); + NSAttributedString? initWithMarkdownString_options_baseURL_error_( + objc.NSString markdownString, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_55( + this.pointer, + _sel_initWithMarkdownString_options_baseURL_error_, + markdownString.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - NSSet initWithSet_(NSSet set) { - final _ret = - _objc_msgSend_411(this.pointer, _sel_initWithSet_, set.pointer); - return NSSet._(_ret, retain: true, release: true); + NSAttributedString initWithFormat_options_locale_( + NSAttributedString format, int options, objc.NSLocale? locale) { + final _ret = _objc_msgSend_56( + this.pointer, + _sel_initWithFormat_options_locale_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _objc_msgSend_412( - this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); - return NSSet._(_ret, retain: false, release: true); + NSAttributedString initWithFormat_options_locale_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_57( + this.pointer, + _sel_initWithFormat_options_locale_arguments_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + arguments); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSSet initWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(this.pointer, _sel_initWithArray_, array.pointer); - return NSSet._(_ret, retain: true, release: true); + static NSAttributedString localizedAttributedStringWithFormat_( + NSAttributedString format) { + final _ret = _objc_msgSend_37(_class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_, format.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSObject valueForKey_(NSString key) { - final _ret = _objc_msgSend_31(this.pointer, _sel_valueForKey_, key.pointer); - return NSObject._(_ret, retain: true, release: true); + static NSAttributedString localizedAttributedStringWithFormat_options_( + NSAttributedString format, int options) { + final _ret = _objc_msgSend_58( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_options_, + format.pointer, + options); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - @override - void setValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); + NSAttributedString initWithFormat_options_locale_context_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context) { + final _ret = _objc_msgSend_59( + this.pointer, + _sel_initWithFormat_options_locale_context_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + context.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - @override - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _objc_msgSend_139( + NSAttributedString initWithFormat_options_locale_context_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_60( this.pointer, - _sel_addObserver_forKeyPath_options_context_, - observer.pointer, - keyPath.pointer, + _sel_initWithFormat_options_locale_context_arguments_, + format.pointer, options, - context); + locale?.pointer ?? ffi.nullptr, + context.pointer, + arguments); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - @override - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _objc_msgSend_140(this.pointer, _sel_removeObserver_forKeyPath_context_, - observer.pointer, keyPath.pointer, context); + static NSAttributedString localizedAttributedStringWithFormat_context_( + NSAttributedString format, objc.NSDictionary context) { + final _ret = _objc_msgSend_61( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_context_, + format.pointer, + context.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - @override - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _objc_msgSend_141(this.pointer, _sel_removeObserver_forKeyPath_, - observer.pointer, keyPath.pointer); + static NSAttributedString + localizedAttributedStringWithFormat_options_context_( + NSAttributedString format, int options, objc.NSDictionary context) { + final _ret = _objc_msgSend_62( + _class_NSAttributedString, + _sel_localizedAttributedStringWithFormat_options_context_, + format.pointer, + options, + context.pointer); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSArray sortedArrayUsingDescriptors_(NSArray sortDescriptors) { - final _ret = _objc_msgSend_68(this.pointer, - _sel_sortedArrayUsingDescriptors_, sortDescriptors.pointer); - return NSArray._(_ret, retain: true, release: true); + NSAttributedString attributedStringByInflectingString() { + final _ret = + _objc_msgSend_63(this.pointer, _sel_attributedStringByInflectingString); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSSet filteredSetUsingPredicate_(NSPredicate predicate) { - final _ret = _objc_msgSend_413( - this.pointer, _sel_filteredSetUsingPredicate_, predicate.pointer); - return NSSet._(_ret, retain: true, release: true); + @override + NSAttributedString init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSSet new1() { - final _ret = _objc_msgSend_2(_class_NSSet, _sel_new); - return NSSet._(_ret, retain: false, release: true); + static NSAttributedString new1() { + final _ret = _objc_msgSend_40(_class_NSAttributedString, _sel_new); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } - static NSSet allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSSet, _sel_allocWithZone_, zone); - return NSSet._(_ret, retain: false, release: true); + static NSAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSAttributedString, _sel_allocWithZone_, zone); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } - static NSSet alloc() { - final _ret = _objc_msgSend_2(_class_NSSet, _sel_alloc); - return NSSet._(_ret, retain: false, release: true); + static NSAttributedString alloc() { + final _ret = _objc_msgSend_40(_class_NSAttributedString, _sel_alloc); + return NSAttributedString.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSSet, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSAttributedString, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSSet, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSAttributedString, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12(_class_NSSet, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSAttributedString, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSSet, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSAttributedString, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63( - _class_NSSet, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSAttributedString, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64( - _class_NSSet, _sel_automaticallyNotifiesObserversForKey_, key.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSAttributedString, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSSet, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSAttributedString, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSSet, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSAttributedString, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSSet, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSAttributedString, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSSet = objc.getClass("NSSet"); -late final _sel_count = objc.registerName("count"); -late final _sel_member_ = objc.registerName("member:"); -final _objc_msgSend_16 = objc.msgSendPointer +late final _class_NSAttributedString = objc.getClass("NSAttributedString"); +late final _sel_string = objc.registerName("string"); + +final class _NSRange extends ffi.Struct { + @ffi.UnsignedLong() + external int location; + + @ffi.UnsignedLong() + external int length; +} + +late final _sel_attributesAtIndex_effectiveRange_ = + objc.registerName("attributesAtIndex:effectiveRange:"); +final _objc_msgSend_28 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong, + ffi.Pointer<_NSRange>)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -class NSEnumerator extends NSObject { - NSEnumerator._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSEnumerator] that points to the same underlying object as [other]. - static NSEnumerator castFrom(T other) { - return NSEnumerator._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSEnumerator] that wraps the given raw object pointer. - static NSEnumerator castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSEnumerator._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSEnumerator]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSEnumerator); - } - - NSObject? nextObject() { - final _ret = _objc_msgSend_17(this.pointer, _sel_nextObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject get allObjects { - final _ret = _objc_msgSend_2(this.pointer, _sel_allObjects); - return NSObject._(_ret, retain: true, release: true); - } - - @override - NSEnumerator init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSEnumerator._(_ret, retain: true, release: true); - } - - static NSEnumerator new1() { - final _ret = _objc_msgSend_2(_class_NSEnumerator, _sel_new); - return NSEnumerator._(_ret, retain: false, release: true); - } - - static NSEnumerator allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSEnumerator, _sel_allocWithZone_, zone); - return NSEnumerator._(_ret, retain: false, release: true); - } - - static NSEnumerator alloc() { - final _ret = _objc_msgSend_2(_class_NSEnumerator, _sel_alloc); - return NSEnumerator._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSEnumerator, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSEnumerator, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSEnumerator, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSEnumerator, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSEnumerator, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSEnumerator, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSEnumerator, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSEnumerator, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSEnumerator, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSEnumerator = objc.getClass("NSEnumerator"); -late final _sel_nextObject = objc.registerName("nextObject"); -final _objc_msgSend_17 = objc.msgSendPointer + ffi.Pointer, int, ffi.Pointer<_NSRange>)>(); +late final _sel_length = objc.registerName("length"); +final _objc_msgSend_29 = 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_allObjects = objc.registerName("allObjects"); - -class NSString extends NSObject { - NSString._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSString] that points to the same underlying object as [other]. - static NSString castFrom(T other) { - return NSString._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSString] that wraps the given raw object pointer. - static NSString castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSString._(other, retain: retain, release: release); - } +late final _sel_attribute_atIndex_effectiveRange_ = + objc.registerName("attribute:atIndex:effectiveRange:"); +final _objc_msgSend_30 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_NSRange>)>(); +late final _sel_attributedSubstringFromRange_ = + objc.registerName("attributedSubstringFromRange:"); +final _objc_msgSend_31 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_attributesAtIndex_longestEffectiveRange_inRange_ = + objc.registerName("attributesAtIndex:longestEffectiveRange:inRange:"); +final _objc_msgSend_32 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>, + _NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_NSRange>, + _NSRange)>(); +late final _sel_attribute_atIndex_longestEffectiveRange_inRange_ = + objc.registerName("attribute:atIndex:longestEffectiveRange:inRange:"); +final _objc_msgSend_33 = 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_34 = 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_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_initWithString_attributes_ = + objc.registerName("initWithString:attributes:"); +final _objc_msgSend_36 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithAttributedString_ = + objc.registerName("initWithAttributedString:"); +final _objc_msgSend_37 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - /// Returns whether [obj] is an instance of [NSString]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSString); - } +abstract class NSAttributedStringEnumerationOptions { + static const int NSAttributedStringEnumerationReverse = 2; + static const int + NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = 1048576; +} - factory NSString(String str) { - final cstr = str.toNativeUtf16(); - final nsstr = stringWithCharacters_length_(cstr.cast(), str.length); - pkg_ffi.calloc.free(cstr); - return nsstr; - } +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); +final _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( + void Function( + ffi.Pointer, _NSRange, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - @override - String toString() { - final data = - dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); - return data!.bytes.cast().toDartString(length: length); - } +void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); - int get length { - return _objc_msgSend_10(this.pointer, _sel_length); - } +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); - int characterAtIndex_(int index) { - return _objc_msgSend_18(this.pointer, _sel_characterAtIndex_, index); + /// 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); } - @override - NSString init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSString._(_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_NSDictionary_NSRange_bool.fromFunctionPointer( + ffi.Pointer< + ffi + .NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + _NSRange arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _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; - NSString? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString substringFromIndex_(int from) { - final _ret = - _objc_msgSend_332(this.pointer, _sel_substringFromIndex_, from); - return NSString._(_ret, retain: true, release: true); - } - - NSString substringToIndex_(int to) { - final _ret = _objc_msgSend_332(this.pointer, _sel_substringToIndex_, to); - return NSString._(_ret, retain: true, release: true); - } - - NSString substringWithRange_(_NSRange range) { - final _ret = - _objc_msgSend_333(this.pointer, _sel_substringWithRange_, range); - return NSString._(_ret, retain: true, release: true); - } - - void getCharacters_range_( - ffi.Pointer buffer, _NSRange range) { - _objc_msgSend_334(this.pointer, _sel_getCharacters_range_, buffer, range); - } - - int compare_(NSString string) { - return _objc_msgSend_335(this.pointer, _sel_compare_, string.pointer); - } - - int compare_options_(NSString string, int mask) { - return _objc_msgSend_336( - this.pointer, _sel_compare_options_, string.pointer, mask); - } - - int compare_options_range_( - NSString string, int mask, _NSRange rangeOfReceiverToCompare) { - return _objc_msgSend_337(this.pointer, _sel_compare_options_range_, - string.pointer, mask, rangeOfReceiverToCompare); - } - - int compare_options_range_locale_(NSString string, int mask, - _NSRange rangeOfReceiverToCompare, NSObject? locale) { - return _objc_msgSend_338( - this.pointer, - _sel_compare_options_range_locale_, - string.pointer, - mask, - rangeOfReceiverToCompare, - locale?.pointer ?? ffi.nullptr); - } - - int caseInsensitiveCompare_(NSString string) { - return _objc_msgSend_335( - this.pointer, _sel_caseInsensitiveCompare_, string.pointer); - } - - int localizedCompare_(NSString string) { - return _objc_msgSend_335( - this.pointer, _sel_localizedCompare_, string.pointer); - } - - int localizedCaseInsensitiveCompare_(NSString string) { - return _objc_msgSend_335( - this.pointer, _sel_localizedCaseInsensitiveCompare_, string.pointer); - } - - int localizedStandardCompare_(NSString string) { - return _objc_msgSend_335( - this.pointer, _sel_localizedStandardCompare_, string.pointer); - } - - bool isEqualToString_(NSString aString) { - return _objc_msgSend_64( - this.pointer, _sel_isEqualToString_, aString.pointer); - } - - bool hasPrefix_(NSString str) { - return _objc_msgSend_64(this.pointer, _sel_hasPrefix_, str.pointer); - } - - bool hasSuffix_(NSString str) { - return _objc_msgSend_64(this.pointer, _sel_hasSuffix_, str.pointer); - } - - NSString commonPrefixWithString_options_(NSString str, int mask) { - final _ret = _objc_msgSend_339( - this.pointer, _sel_commonPrefixWithString_options_, str.pointer, mask); - return NSString._(_ret, retain: true, release: true); - } - - bool containsString_(NSString str) { - return _objc_msgSend_64(this.pointer, _sel_containsString_, str.pointer); - } - - bool localizedCaseInsensitiveContainsString_(NSString str) { - return _objc_msgSend_64(this.pointer, - _sel_localizedCaseInsensitiveContainsString_, str.pointer); - } - - bool localizedStandardContainsString_(NSString str) { - return _objc_msgSend_64( - this.pointer, _sel_localizedStandardContainsString_, str.pointer); - } - - void localizedStandardRangeOfString_( - ffi.Pointer<_NSRange> stret, NSString str) { - objc.useMsgSendVariants - ? _objc_msgSend_340Stret(stret, this.pointer, - _sel_localizedStandardRangeOfString_, str.pointer) - : stret.ref = _objc_msgSend_340( - this.pointer, _sel_localizedStandardRangeOfString_, str.pointer); - } - - void rangeOfString_(ffi.Pointer<_NSRange> stret, NSString searchString) { - objc.useMsgSendVariants - ? _objc_msgSend_340Stret( - stret, this.pointer, _sel_rangeOfString_, searchString.pointer) - : stret.ref = _objc_msgSend_340( - this.pointer, _sel_rangeOfString_, searchString.pointer); - } - - void rangeOfString_options_( - ffi.Pointer<_NSRange> stret, NSString searchString, int mask) { - objc.useMsgSendVariants - ? _objc_msgSend_341Stret(stret, this.pointer, - _sel_rangeOfString_options_, searchString.pointer, mask) - : stret.ref = _objc_msgSend_341(this.pointer, - _sel_rangeOfString_options_, searchString.pointer, mask); - } - - void rangeOfString_options_range_(ffi.Pointer<_NSRange> stret, - NSString searchString, int mask, _NSRange rangeOfReceiverToSearch) { - objc.useMsgSendVariants - ? _objc_msgSend_342Stret( - stret, - this.pointer, - _sel_rangeOfString_options_range_, - searchString.pointer, - mask, - rangeOfReceiverToSearch) - : stret.ref = _objc_msgSend_342( - this.pointer, - _sel_rangeOfString_options_range_, - searchString.pointer, - mask, - rangeOfReceiverToSearch); - } - - void rangeOfString_options_range_locale_( - ffi.Pointer<_NSRange> stret, - NSString searchString, - int mask, - _NSRange rangeOfReceiverToSearch, - NSLocale? locale) { - objc.useMsgSendVariants - ? _objc_msgSend_343Stret( - stret, - this.pointer, - _sel_rangeOfString_options_range_locale_, - searchString.pointer, - mask, - rangeOfReceiverToSearch, - locale?.pointer ?? ffi.nullptr) - : stret.ref = _objc_msgSend_343( - this.pointer, - _sel_rangeOfString_options_range_locale_, - searchString.pointer, - mask, - rangeOfReceiverToSearch, - locale?.pointer ?? ffi.nullptr); - } - - void rangeOfCharacterFromSet_( - ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet) { - objc.useMsgSendVariants - ? _objc_msgSend_344Stret(stret, this.pointer, - _sel_rangeOfCharacterFromSet_, searchSet.pointer) - : stret.ref = _objc_msgSend_344( - this.pointer, _sel_rangeOfCharacterFromSet_, searchSet.pointer); - } - - void rangeOfCharacterFromSet_options_( - ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet, int mask) { - objc.useMsgSendVariants - ? _objc_msgSend_345Stret(stret, this.pointer, - _sel_rangeOfCharacterFromSet_options_, searchSet.pointer, mask) - : stret.ref = _objc_msgSend_345(this.pointer, - _sel_rangeOfCharacterFromSet_options_, searchSet.pointer, mask); - } - - void rangeOfCharacterFromSet_options_range_(ffi.Pointer<_NSRange> stret, - NSCharacterSet searchSet, int mask, _NSRange rangeOfReceiverToSearch) { - objc.useMsgSendVariants - ? _objc_msgSend_346Stret( - stret, - this.pointer, - _sel_rangeOfCharacterFromSet_options_range_, - searchSet.pointer, - mask, - rangeOfReceiverToSearch) - : stret.ref = _objc_msgSend_346( - this.pointer, - _sel_rangeOfCharacterFromSet_options_range_, - searchSet.pointer, - mask, - rangeOfReceiverToSearch); - } - - void rangeOfComposedCharacterSequenceAtIndex_( - ffi.Pointer<_NSRange> stret, int index) { - objc.useMsgSendVariants - ? _objc_msgSend_347Stret(stret, this.pointer, - _sel_rangeOfComposedCharacterSequenceAtIndex_, index) - : stret.ref = _objc_msgSend_347( - this.pointer, _sel_rangeOfComposedCharacterSequenceAtIndex_, index); - } - - void rangeOfComposedCharacterSequencesForRange_( - ffi.Pointer<_NSRange> stret, _NSRange range) { - objc.useMsgSendVariants - ? _objc_msgSend_348Stret(stret, this.pointer, - _sel_rangeOfComposedCharacterSequencesForRange_, range) - : stret.ref = _objc_msgSend_348(this.pointer, - _sel_rangeOfComposedCharacterSequencesForRange_, range); - } - - NSString stringByAppendingString_(NSString aString) { - final _ret = _objc_msgSend_69( - this.pointer, _sel_stringByAppendingString_, aString.pointer); - return NSString._(_ret, retain: true, release: true); - } - - NSString stringByAppendingFormat_(NSString format) { - final _ret = _objc_msgSend_69( - this.pointer, _sel_stringByAppendingFormat_, format.pointer); - return NSString._(_ret, retain: true, release: true); - } - - double get doubleValue { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_doubleValue) - : _objc_msgSend_165(this.pointer, _sel_doubleValue); - } - - double get floatValue { - return objc.useMsgSendVariants - ? _objc_msgSend_239Fpret(this.pointer, _sel_floatValue) - : _objc_msgSend_239(this.pointer, _sel_floatValue); - } - - int get intValue { - return _objc_msgSend_237(this.pointer, _sel_intValue); - } + /// 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.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(objc.NSDictionary.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; - int get integerValue { - return _objc_msgSend_83(this.pointer, _sel_integerValue); - } + /// 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._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(objc.NSDictionary.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>? _dartFuncListenerTrampoline; - int get longLongValue { - return _objc_msgSend_238(this.pointer, _sel_longLongValue); - } + 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); +} - bool get boolValue { - return _objc_msgSend_12(this.pointer, _sel_boolValue); - } +late final _sel_enumerateAttributesInRange_options_usingBlock_ = + objc.registerName("enumerateAttributesInRange:options:usingBlock:"); +final _objc_msgSend_38 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + 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); +final _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( + void Function( + ffi.Pointer, _NSRange, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - NSString get uppercaseString { - final _ret = _objc_msgSend_21(this.pointer, _sel_uppercaseString); - return NSString._(_ret, retain: true, release: true); - } +void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); - NSString get lowercaseString { - final _ret = _objc_msgSend_21(this.pointer, _sel_lowercaseString); - return NSString._(_ret, retain: true, release: true); - } +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); - NSString get capitalizedString { - final _ret = _objc_msgSend_21(this.pointer, _sel_capitalizedString); - return NSString._(_ret, retain: true, release: true); + /// 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); } - NSString get localizedUppercaseString { - final _ret = _objc_msgSend_21(this.pointer, _sel_localizedUppercaseString); - return NSString._(_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_objcObjCObject_NSRange_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + _NSRange arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _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; - NSString get localizedLowercaseString { - final _ret = _objc_msgSend_21(this.pointer, _sel_localizedLowercaseString); - return NSString._(_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. + ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool.fromFunction( + void Function(objc.NSObject?, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; - NSString get localizedCapitalizedString { - final _ret = - _objc_msgSend_21(this.pointer, _sel_localizedCapitalizedString); - return NSString._(_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_objcObjCObject_NSRange_bool.listener( + void Function(objc.NSObject?, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>? _dartFuncListenerTrampoline; - NSString uppercaseStringWithLocale_(NSLocale? locale) { - final _ret = _objc_msgSend_349(this.pointer, - _sel_uppercaseStringWithLocale_, locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } + void call(objc.NSObject? 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); +} - NSString lowercaseStringWithLocale_(NSLocale? locale) { - final _ret = _objc_msgSend_349(this.pointer, - _sel_lowercaseStringWithLocale_, locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } +late final _sel_enumerateAttribute_inRange_options_usingBlock_ = + objc.registerName("enumerateAttribute:inRange:options:usingBlock:"); +final _objc_msgSend_39 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); - NSString capitalizedStringWithLocale_(NSLocale? locale) { - final _ret = _objc_msgSend_349(this.pointer, - _sel_capitalizedStringWithLocale_, locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } +class NSAttributedStringMarkdownParsingOptions extends objc.NSObject { + NSAttributedStringMarkdownParsingOptions._( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - void getLineStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer lineEndPtr, - ffi.Pointer contentsEndPtr, - _NSRange range) { - _objc_msgSend_350(this.pointer, _sel_getLineStart_end_contentsEnd_forRange_, - startPtr, lineEndPtr, contentsEndPtr, range); - } + /// Constructs a [NSAttributedStringMarkdownParsingOptions] that points to the same underlying object as [other]. + NSAttributedStringMarkdownParsingOptions.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - void lineRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { - objc.useMsgSendVariants - ? _objc_msgSend_348Stret( - stret, this.pointer, _sel_lineRangeForRange_, range) - : stret.ref = - _objc_msgSend_348(this.pointer, _sel_lineRangeForRange_, range); - } + /// 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); - void getParagraphStart_end_contentsEnd_forRange_( - ffi.Pointer startPtr, - ffi.Pointer parEndPtr, - ffi.Pointer contentsEndPtr, - _NSRange range) { - _objc_msgSend_350( - this.pointer, - _sel_getParagraphStart_end_contentsEnd_forRange_, - startPtr, - parEndPtr, - contentsEndPtr, - range); + /// Returns whether [obj] is an instance of [NSAttributedStringMarkdownParsingOptions]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, + _class_NSAttributedStringMarkdownParsingOptions); } - void paragraphRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { - objc.useMsgSendVariants - ? _objc_msgSend_348Stret( - stret, this.pointer, _sel_paragraphRangeForRange_, range) - : stret.ref = _objc_msgSend_348( - this.pointer, _sel_paragraphRangeForRange_, range); + @override + NSAttributedStringMarkdownParsingOptions init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: true, release: true); } - void enumerateSubstringsInRange_options_usingBlock_(_NSRange range, int opts, - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool block) { - _objc_msgSend_351( - this.pointer, - _sel_enumerateSubstringsInRange_options_usingBlock_, - range, - opts, - block.pointer); + bool get allowsExtendedAttributes { + return _objc_msgSend_7(this.pointer, _sel_allowsExtendedAttributes); } - void enumerateLinesUsingBlock_(ObjCBlock_ffiVoid_NSString_bool block) { - _objc_msgSend_352( - this.pointer, _sel_enumerateLinesUsingBlock_, block.pointer); + set allowsExtendedAttributes(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsExtendedAttributes_, value); } - ffi.Pointer get UTF8String { - return _objc_msgSend_13(this.pointer, _sel_UTF8String); + int get interpretedSyntax { + return _objc_msgSend_42(this.pointer, _sel_interpretedSyntax); } - int get fastestEncoding { - return _objc_msgSend_10(this.pointer, _sel_fastestEncoding); + set interpretedSyntax(int value) { + return _objc_msgSend_43(this.pointer, _sel_setInterpretedSyntax_, value); } - int get smallestEncoding { - return _objc_msgSend_10(this.pointer, _sel_smallestEncoding); + int get failurePolicy { + return _objc_msgSend_44(this.pointer, _sel_failurePolicy); } - NSData? dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { - final _ret = _objc_msgSend_353(this.pointer, - _sel_dataUsingEncoding_allowLossyConversion_, encoding, lossy); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); + set failurePolicy(int value) { + return _objc_msgSend_45(this.pointer, _sel_setFailurePolicy_, value); } - NSData? dataUsingEncoding_(int encoding) { - final _ret = - _objc_msgSend_354(this.pointer, _sel_dataUsingEncoding_, encoding); + objc.NSString? get languageCode { + final _ret = _objc_msgSend_13(this.pointer, _sel_languageCode); return _ret.address == 0 ? null - : NSData._(_ret, retain: true, release: true); - } - - bool canBeConvertedToEncoding_(int encoding) { - return _objc_msgSend_97( - this.pointer, _sel_canBeConvertedToEncoding_, encoding); - } - - ffi.Pointer cStringUsingEncoding_(int encoding) { - return _objc_msgSend_11(this.pointer, _sel_cStringUsingEncoding_, encoding); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool getCString_maxLength_encoding_( - ffi.Pointer buffer, int maxBufferCount, int encoding) { - return _objc_msgSend_355(this.pointer, _sel_getCString_maxLength_encoding_, - buffer, maxBufferCount, encoding); + set languageCode(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setLanguageCode_, value?.pointer ?? ffi.nullptr); } - bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( - ffi.Pointer buffer, - int maxBufferCount, - ffi.Pointer usedBufferCount, - int encoding, - int options, - _NSRange range, - ffi.Pointer<_NSRange> leftover) { - return _objc_msgSend_356( - this.pointer, - _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_, - buffer, - maxBufferCount, - usedBufferCount, - encoding, - options, - range, - leftover); + bool get appliesSourcePositionAttributes { + return _objc_msgSend_7(this.pointer, _sel_appliesSourcePositionAttributes); } - int maximumLengthOfBytesUsingEncoding_(int enc) { - return _objc_msgSend_94( - this.pointer, _sel_maximumLengthOfBytesUsingEncoding_, enc); + set appliesSourcePositionAttributes(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAppliesSourcePositionAttributes_, value); } - int lengthOfBytesUsingEncoding_(int enc) { - return _objc_msgSend_94( - this.pointer, _sel_lengthOfBytesUsingEncoding_, enc); + static NSAttributedStringMarkdownParsingOptions new1() { + final _ret = _objc_msgSend_40( + _class_NSAttributedStringMarkdownParsingOptions, _sel_new); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } - static ffi.Pointer getAvailableStringEncodings() { - return _objc_msgSend_357(_class_NSString, _sel_availableStringEncodings); + static NSAttributedStringMarkdownParsingOptions allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_allocWithZone_, + zone); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } - static NSString localizedNameOfStringEncoding_(int encoding) { - final _ret = _objc_msgSend_332( - _class_NSString, _sel_localizedNameOfStringEncoding_, encoding); - return NSString._(_ret, retain: true, release: true); + static NSAttributedStringMarkdownParsingOptions alloc() { + final _ret = _objc_msgSend_40( + _class_NSAttributedStringMarkdownParsingOptions, _sel_alloc); + return NSAttributedStringMarkdownParsingOptions.castFromPointer(_ret, + retain: false, release: true); } - static int getDefaultCStringEncoding() { - return _objc_msgSend_10(_class_NSString, _sel_defaultCStringEncoding); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSString get decomposedStringWithCanonicalMapping { - final _ret = _objc_msgSend_21( - this.pointer, _sel_decomposedStringWithCanonicalMapping); - return NSString._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSAttributedStringMarkdownParsingOptions, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSString get precomposedStringWithCanonicalMapping { - final _ret = _objc_msgSend_21( - this.pointer, _sel_precomposedStringWithCanonicalMapping); - return NSString._(_ret, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSAttributedStringMarkdownParsingOptions, + _sel_accessInstanceVariablesDirectly); } - NSString get decomposedStringWithCompatibilityMapping { - final _ret = _objc_msgSend_21( - this.pointer, _sel_decomposedStringWithCompatibilityMapping); - return NSString._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSAttributedStringMarkdownParsingOptions, + _sel_useStoredAccessor); } - NSString get precomposedStringWithCompatibilityMapping { - final _ret = _objc_msgSend_21( - this.pointer, _sel_precomposedStringWithCompatibilityMapping); - return NSString._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_keyPathsForValuesAffectingValueForKey_, + key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSArray componentsSeparatedByString_(NSString separator) { - final _ret = _objc_msgSend_358( - this.pointer, _sel_componentsSeparatedByString_, separator.pointer); - return NSArray._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSAttributedStringMarkdownParsingOptions, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet separator) { - final _ret = _objc_msgSend_359(this.pointer, - _sel_componentsSeparatedByCharactersInSet_, separator.pointer); - return NSArray._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSString stringByTrimmingCharactersInSet_(NSCharacterSet set) { - final _ret = _objc_msgSend_360( - this.pointer, _sel_stringByTrimmingCharactersInSet_, set.pointer); - return NSString._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString stringByPaddingToLength_withString_startingAtIndex_( - int newLength, NSString padString, int padIndex) { - final _ret = _objc_msgSend_361( - this.pointer, - _sel_stringByPaddingToLength_withString_startingAtIndex_, - newLength, - padString.pointer, - padIndex); - return NSString._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSAttributedStringMarkdownParsingOptions, + _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { - final _ret = _objc_msgSend_362( - this.pointer, - _sel_stringByFoldingWithOptions_locale_, - options, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } +late final _class_NSAttributedStringMarkdownParsingOptions = + objc.getClass("NSAttributedStringMarkdownParsingOptions"); +late final _sel_init = objc.registerName("init"); +final _objc_msgSend_40 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allowsExtendedAttributes = + objc.registerName("allowsExtendedAttributes"); +late final _sel_setAllowsExtendedAttributes_ = + objc.registerName("setAllowsExtendedAttributes:"); +final _objc_msgSend_41 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, bool)>(); - NSString stringByReplacingOccurrencesOfString_withString_options_range_( - NSString target, - NSString replacement, - int options, - _NSRange searchRange) { - final _ret = _objc_msgSend_363( - this.pointer, - _sel_stringByReplacingOccurrencesOfString_withString_options_range_, - target.pointer, - replacement.pointer, - options, - searchRange); - return NSString._(_ret, retain: true, release: true); - } +abstract class NSAttributedStringMarkdownInterpretedSyntax { + static const int NSAttributedStringMarkdownInterpretedSyntaxFull = 0; + static const int NSAttributedStringMarkdownInterpretedSyntaxInlineOnly = 1; + static const int + NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace = + 2; +} - NSString stringByReplacingOccurrencesOfString_withString_( - NSString target, NSString replacement) { - final _ret = _objc_msgSend_364( - this.pointer, - _sel_stringByReplacingOccurrencesOfString_withString_, - target.pointer, - replacement.pointer); - return NSString._(_ret, retain: true, release: true); - } +late final _sel_interpretedSyntax = objc.registerName("interpretedSyntax"); +final _objc_msgSend_42 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setInterpretedSyntax_ = + objc.registerName("setInterpretedSyntax:"); +final _objc_msgSend_43 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - NSString stringByReplacingCharactersInRange_withString_( - _NSRange range, NSString replacement) { - final _ret = _objc_msgSend_365( - this.pointer, - _sel_stringByReplacingCharactersInRange_withString_, - range, - replacement.pointer); - return NSString._(_ret, retain: true, release: true); - } +abstract class NSAttributedStringMarkdownParsingFailurePolicy { + static const int NSAttributedStringMarkdownParsingFailureReturnError = 0; + static const int + NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible = + 1; +} - NSString? stringByApplyingTransform_reverse_( - NSString transform, bool reverse) { - final _ret = _objc_msgSend_366(this.pointer, - _sel_stringByApplyingTransform_reverse_, transform.pointer, reverse); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } +late final _sel_failurePolicy = objc.registerName("failurePolicy"); +final _objc_msgSend_44 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setFailurePolicy_ = objc.registerName("setFailurePolicy:"); +final _objc_msgSend_45 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_languageCode = objc.registerName("languageCode"); +late final _sel_setLanguageCode_ = objc.registerName("setLanguageCode:"); +final _objc_msgSend_46 = 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_appliesSourcePositionAttributes = + objc.registerName("appliesSourcePositionAttributes"); +late final _sel_setAppliesSourcePositionAttributes_ = + objc.registerName("setAppliesSourcePositionAttributes:"); +late final _sel_new = objc.registerName("new"); - bool writeToURL_atomically_encoding_error_(NSURL url, bool useAuxiliaryFile, - int enc, ffi.Pointer> error) { - return _objc_msgSend_367( - this.pointer, - _sel_writeToURL_atomically_encoding_error_, - url.pointer, - useAuxiliaryFile, - enc, - error); - } +final class _NSZone extends ffi.Opaque {} - bool writeToFile_atomically_encoding_error_( - NSString path, - bool useAuxiliaryFile, - int enc, - ffi.Pointer> error) { - return _objc_msgSend_368( - this.pointer, - _sel_writeToFile_atomically_encoding_error_, - path.pointer, - useAuxiliaryFile, - enc, - error); - } +late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); +final _objc_msgSend_47 = 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_48 = 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:"); +final _objc_msgSend_49 = 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_accessInstanceVariablesDirectly = + objc.registerName("accessInstanceVariablesDirectly"); +late final _sel_useStoredAccessor = objc.registerName("useStoredAccessor"); +late final _sel_keyPathsForValuesAffectingValueForKey_ = + objc.registerName("keyPathsForValuesAffectingValueForKey:"); +final _objc_msgSend_50 = 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_51 = 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_setKeys_triggerChangeNotificationsForDependentKey_ = + objc.registerName("setKeys:triggerChangeNotificationsForDependentKey:"); +final _objc_msgSend_52 = 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_classFallbacksForKeyedArchiver = + objc.registerName("classFallbacksForKeyedArchiver"); +late final _sel_classForKeyedUnarchiver = + objc.registerName("classForKeyedUnarchiver"); +final _objc_msgSend_0 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_ = + objc.registerName( + "initWithContentsOfMarkdownFileAtURL:options:baseURL:error:"); +final _objc_msgSend_53 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithMarkdown_options_baseURL_error_ = + objc.registerName("initWithMarkdown:options:baseURL:error:"); +final _objc_msgSend_54 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_initWithMarkdownString_options_baseURL_error_ = + objc.registerName("initWithMarkdownString:options:baseURL:error:"); +final _objc_msgSend_55 = 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>)>(); - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } +abstract class NSAttributedStringFormattingOptions { + static const int + NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging = 1; + static const int NSAttributedStringFormattingApplyReplacementIndexAttribute = + 2; +} - int get hash { - return _objc_msgSend_10(this.pointer, _sel_hash); - } +late final _sel_initWithFormat_options_locale_ = + objc.registerName("initWithFormat:options:locale:"); +final _objc_msgSend_56 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); - NSString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, int length, bool freeBuffer) { - final _ret = _objc_msgSend_369( - this.pointer, - _sel_initWithCharactersNoCopy_length_freeWhenDone_, - characters, - length, - freeBuffer); - return NSString._(_ret, retain: false, release: true); - } +final class __va_list_tag extends ffi.Struct { + @ffi.UnsignedInt() + external int gp_offset; - NSString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, - int len, - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong? deallocator) { - final _ret = _objc_msgSend_370( - this.pointer, - _sel_initWithCharactersNoCopy_length_deallocator_, - chars, - len, - deallocator?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: false, release: true); - } + @ffi.UnsignedInt() + external int fp_offset; - NSString initWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _objc_msgSend_371( - this.pointer, _sel_initWithCharacters_length_, characters, length); - return NSString._(_ret, retain: true, release: true); - } + external ffi.Pointer overflow_arg_area; - NSString? initWithUTF8String_(ffi.Pointer nullTerminatedCString) { - final _ret = _objc_msgSend_372( - this.pointer, _sel_initWithUTF8String_, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } + external ffi.Pointer reg_save_area; +} - NSString initWithString_(NSString aString) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithString_, aString.pointer); - return NSString._(_ret, retain: true, release: true); +late final _sel_initWithFormat_options_locale_arguments_ = + objc.registerName("initWithFormat:options:locale:arguments:"); +final _objc_msgSend_57 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); +late final _sel_localizedAttributedStringWithFormat_ = + objc.registerName("localizedAttributedStringWithFormat:"); +late final _sel_localizedAttributedStringWithFormat_options_ = + objc.registerName("localizedAttributedStringWithFormat:options:"); +final _objc_msgSend_58 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .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_59 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithFormat_options_locale_context_arguments_ = + objc.registerName("initWithFormat:options:locale:context:arguments:"); +final _objc_msgSend_60 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); +late final _sel_localizedAttributedStringWithFormat_context_ = + objc.registerName("localizedAttributedStringWithFormat:context:"); +final _objc_msgSend_61 = 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_62 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_attributedStringByInflectingString = + objc.registerName("attributedStringByInflectingString"); +final _objc_msgSend_63 = 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_64 = 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_65 = 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_66 = 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_67 = 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_68 = 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_69 = 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_70 = 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_71 = 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_71Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSMutableAttributedString extends NSAttributedString { + NSMutableAttributedString._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMutableAttributedString] that points to the same underlying object as [other]. + NSMutableAttributedString.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMutableAttributedString] that wraps the given raw object pointer. + NSMutableAttributedString.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMutableAttributedString]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableAttributedString); } - NSString initWithFormat_(NSString format) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithFormat_, format.pointer); - return NSString._(_ret, retain: true, release: true); + void replaceCharactersInRange_withString_(_NSRange range, objc.NSString str) { + _objc_msgSend_72(this.pointer, _sel_replaceCharactersInRange_withString_, + range, str.pointer); } - NSString initWithFormat_arguments_( - NSString format, ffi.Pointer<__va_list_tag> argList) { - final _ret = _objc_msgSend_373( - this.pointer, _sel_initWithFormat_arguments_, format.pointer, argList); - return NSString._(_ret, retain: true, release: true); + void setAttributes_range_(objc.NSDictionary? attrs, _NSRange range) { + _objc_msgSend_73(this.pointer, _sel_setAttributes_range_, + attrs?.pointer ?? ffi.nullptr, range); } - NSString initWithFormat_locale_(NSString format, NSObject? locale) { - final _ret = _objc_msgSend_374(this.pointer, _sel_initWithFormat_locale_, - format.pointer, locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); + objc.NSMutableString get mutableString { + final _ret = _objc_msgSend_74(this.pointer, _sel_mutableString); + return objc.NSMutableString.castFromPointer(_ret, + retain: true, release: true); } - NSString initWithFormat_locale_arguments_( - NSString format, NSObject? locale, ffi.Pointer<__va_list_tag> argList) { - final _ret = _objc_msgSend_375( - this.pointer, - _sel_initWithFormat_locale_arguments_, - format.pointer, - locale?.pointer ?? ffi.nullptr, - argList); - return NSString._(_ret, retain: true, release: true); - } - - NSString? initWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _objc_msgSend_376( - this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_error_, - format.pointer, - validFormatSpecifiers.pointer, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + void addAttribute_value_range_( + objc.NSString name, objc.NSObject value, _NSRange range) { + _objc_msgSend_75(this.pointer, _sel_addAttribute_value_range_, name.pointer, + value.pointer, range); } - NSString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer> error) { - final _ret = _objc_msgSend_377( - this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_, - format.pointer, - validFormatSpecifiers.pointer, - locale?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + void addAttributes_range_(objc.NSDictionary attrs, _NSRange range) { + _objc_msgSend_76( + this.pointer, _sel_addAttributes_range_, attrs.pointer, range); } - NSString? initWithValidatedFormat_validFormatSpecifiers_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _objc_msgSend_378( - this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_, - format.pointer, - validFormatSpecifiers.pointer, - argList, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + void removeAttribute_range_(objc.NSString name, _NSRange range) { + _objc_msgSend_77( + this.pointer, _sel_removeAttribute_range_, name.pointer, range); } - NSString? - initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _objc_msgSend_379( + void replaceCharactersInRange_withAttributedString_( + _NSRange range, NSAttributedString attrString) { + _objc_msgSend_78( this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_, - format.pointer, - validFormatSpecifiers.pointer, - locale?.pointer ?? ffi.nullptr, - argList, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + _sel_replaceCharactersInRange_withAttributedString_, + range, + attrString.pointer); } - NSString? initWithData_encoding_(NSData data, int encoding) { - final _ret = _objc_msgSend_380( - this.pointer, _sel_initWithData_encoding_, data.pointer, encoding); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + void insertAttributedString_atIndex_(NSAttributedString attrString, int loc) { + _objc_msgSend_79(this.pointer, _sel_insertAttributedString_atIndex_, + attrString.pointer, loc); } - NSString? initWithBytes_length_encoding_( - ffi.Pointer bytes, int len, int encoding) { - final _ret = _objc_msgSend_381(this.pointer, - _sel_initWithBytes_length_encoding_, bytes, len, encoding); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + void appendAttributedString_(NSAttributedString attrString) { + _objc_msgSend_80( + this.pointer, _sel_appendAttributedString_, attrString.pointer); } - NSString? initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { - final _ret = _objc_msgSend_382( - this.pointer, - _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_, - bytes, - len, - encoding, - freeBuffer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: false, release: true); + void deleteCharactersInRange_(_NSRange range) { + _objc_msgSend_81(this.pointer, _sel_deleteCharactersInRange_, range); } - NSString? initWithBytesNoCopy_length_encoding_deallocator_( - ffi.Pointer bytes, - int len, - int encoding, - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _objc_msgSend_383( - this.pointer, - _sel_initWithBytesNoCopy_length_encoding_deallocator_, - bytes, - len, - encoding, - deallocator?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: false, release: true); + void setAttributedString_(NSAttributedString attrString) { + _objc_msgSend_80( + this.pointer, _sel_setAttributedString_, attrString.pointer); } - static NSString string() { - final _ret = _objc_msgSend_2(_class_NSString, _sel_string); - return NSString._(_ret, retain: true, release: true); + void beginEditing() { + _objc_msgSend_82(this.pointer, _sel_beginEditing); } - static NSString stringWithString_(NSString string) { - final _ret = _objc_msgSend_31( - _class_NSString, _sel_stringWithString_, string.pointer); - return NSString._(_ret, retain: true, release: true); + void endEditing() { + _objc_msgSend_82(this.pointer, _sel_endEditing); } - static NSString stringWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _objc_msgSend_371( - _class_NSString, _sel_stringWithCharacters_length_, characters, length); - return NSString._(_ret, retain: true, release: true); + void appendLocalizedFormat_(NSAttributedString format) { + _objc_msgSend_80(this.pointer, _sel_appendLocalizedFormat_, format.pointer); } - static NSString? stringWithUTF8String_( - ffi.Pointer nullTerminatedCString) { - final _ret = _objc_msgSend_372( - _class_NSString, _sel_stringWithUTF8String_, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + @override + NSMutableAttributedString initWithString_(objc.NSString str) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithString_, str.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSString stringWithFormat_(NSString format) { - final _ret = _objc_msgSend_31( - _class_NSString, _sel_stringWithFormat_, format.pointer); - return NSString._(_ret, retain: true, release: true); + @override + NSMutableAttributedString initWithString_attributes_( + objc.NSString str, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_36(this.pointer, _sel_initWithString_attributes_, + str.pointer, attrs?.pointer ?? ffi.nullptr); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSString localizedStringWithFormat_(NSString format) { - final _ret = _objc_msgSend_31( - _class_NSString, _sel_localizedStringWithFormat_, format.pointer); - return NSString._(_ret, retain: true, release: true); + @override + NSMutableAttributedString initWithAttributedString_( + NSAttributedString attrStr) { + final _ret = _objc_msgSend_37( + this.pointer, _sel_initWithAttributedString_, attrStr.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSString? stringWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _objc_msgSend_376( - _class_NSString, - _sel_stringWithValidatedFormat_validFormatSpecifiers_error_, - format.pointer, - validFormatSpecifiers.pointer, + @override + NSMutableAttributedString? + initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( + objc.NSURL markdownFile, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_53( + this.pointer, + _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, + markdownFile.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, error); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSString? - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _objc_msgSend_376( - _class_NSString, - _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_, - format.pointer, - validFormatSpecifiers.pointer, + @override + NSMutableAttributedString? initWithMarkdown_options_baseURL_error_( + objc.NSData markdown, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_54( + this.pointer, + _sel_initWithMarkdown_options_baseURL_error_, + markdown.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, error); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSString? initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, int encoding) { - final _ret = _objc_msgSend_384(this.pointer, _sel_initWithCString_encoding_, - nullTerminatedCString, encoding); + @override + NSMutableAttributedString? initWithMarkdownString_options_baseURL_error_( + objc.NSString markdownString, + NSAttributedStringMarkdownParsingOptions? options, + objc.NSURL? baseURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_55( + this.pointer, + _sel_initWithMarkdownString_options_baseURL_error_, + markdownString.pointer, + options?.pointer ?? ffi.nullptr, + baseURL?.pointer ?? ffi.nullptr, + error); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSString? stringWithCString_encoding_( - ffi.Pointer cString, int enc) { - final _ret = _objc_msgSend_384( - _class_NSString, _sel_stringWithCString_encoding_, cString, enc); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + @override + NSMutableAttributedString initWithFormat_options_locale_( + NSAttributedString format, int options, objc.NSLocale? locale) { + final _ret = _objc_msgSend_56( + this.pointer, + _sel_initWithFormat_options_locale_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSString? initWithContentsOfURL_encoding_error_( - NSURL url, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_385(this.pointer, - _sel_initWithContentsOfURL_encoding_error_, url.pointer, enc, error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + @override + NSMutableAttributedString initWithFormat_options_locale_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_57( + this.pointer, + _sel_initWithFormat_options_locale_arguments_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + arguments); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSString? initWithContentsOfFile_encoding_error_( - NSString path, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_386(this.pointer, - _sel_initWithContentsOfFile_encoding_error_, path.pointer, enc, error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static NSMutableAttributedString localizedAttributedStringWithFormat_( + NSAttributedString format) { + final _ret = _objc_msgSend_37(_class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_, format.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSString? stringWithContentsOfURL_encoding_error_( - NSURL url, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_385(_class_NSString, - _sel_stringWithContentsOfURL_encoding_error_, url.pointer, enc, error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static NSMutableAttributedString localizedAttributedStringWithFormat_options_( + NSAttributedString format, int options) { + final _ret = _objc_msgSend_58( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_options_, + format.pointer, + options); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSString? stringWithContentsOfFile_encoding_error_( - NSString path, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_386( - _class_NSString, - _sel_stringWithContentsOfFile_encoding_error_, - path.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + @override + NSMutableAttributedString initWithFormat_options_locale_context_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context) { + final _ret = _objc_msgSend_59( + this.pointer, + _sel_initWithFormat_options_locale_context_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + context.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSString? initWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_387( + @override + NSMutableAttributedString initWithFormat_options_locale_context_arguments_( + NSAttributedString format, + int options, + objc.NSLocale? locale, + objc.NSDictionary context, + ffi.Pointer<__va_list_tag> arguments) { + final _ret = _objc_msgSend_60( this.pointer, - _sel_initWithContentsOfURL_usedEncoding_error_, - url.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + _sel_initWithFormat_options_locale_context_arguments_, + format.pointer, + options, + locale?.pointer ?? ffi.nullptr, + context.pointer, + arguments); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - NSString? initWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_388( - this.pointer, - _sel_initWithContentsOfFile_usedEncoding_error_, - path.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static NSMutableAttributedString localizedAttributedStringWithFormat_context_( + NSAttributedString format, objc.NSDictionary context) { + final _ret = _objc_msgSend_61( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_context_, + format.pointer, + context.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSString? stringWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_387( - _class_NSString, - _sel_stringWithContentsOfURL_usedEncoding_error_, - url.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static NSMutableAttributedString + localizedAttributedStringWithFormat_options_context_( + NSAttributedString format, int options, objc.NSDictionary context) { + final _ret = _objc_msgSend_62( + _class_NSMutableAttributedString, + _sel_localizedAttributedStringWithFormat_options_context_, + format.pointer, + options, + context.pointer); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static NSString? stringWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_388( - _class_NSString, - _sel_stringWithContentsOfFile_usedEncoding_error_, - path.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + @override + NSMutableAttributedString init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMutableAttributedString.castFromPointer(_ret, + retain: true, release: true); } - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NSData data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _objc_msgSend_389( - _class_NSString, - _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_, - data.pointer, - opts?.pointer ?? ffi.nullptr, - string, - usedLossyConversion); + static NSMutableAttributedString new1() { + final _ret = _objc_msgSend_40(_class_NSMutableAttributedString, _sel_new); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - NSObject propertyList() { - final _ret = _objc_msgSend_2(this.pointer, _sel_propertyList); - return NSObject._(_ret, retain: true, release: true); + static NSMutableAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSMutableAttributedString, _sel_allocWithZone_, zone); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - NSDictionary? propertyListFromStringsFileFormat() { - final _ret = - _objc_msgSend_390(this.pointer, _sel_propertyListFromStringsFileFormat); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + static NSMutableAttributedString alloc() { + final _ret = _objc_msgSend_40(_class_NSMutableAttributedString, _sel_alloc); + return NSMutableAttributedString.castFromPointer(_ret, + retain: false, release: true); } - ffi.Pointer cString() { - return _objc_msgSend_13(this.pointer, _sel_cString); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMutableAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - ffi.Pointer lossyCString() { - return _objc_msgSend_13(this.pointer, _sel_lossyCString); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMutableAttributedString, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - int cStringLength() { - return _objc_msgSend_10(this.pointer, _sel_cStringLength); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSMutableAttributedString, _sel_accessInstanceVariablesDirectly); } - void getCString_(ffi.Pointer bytes) { - _objc_msgSend_290(this.pointer, _sel_getCString_, bytes); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSMutableAttributedString, _sel_useStoredAccessor); } - void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { - _objc_msgSend_391( - this.pointer, _sel_getCString_maxLength_, bytes, maxLength); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMutableAttributedString, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, - int maxLength, _NSRange aRange, ffi.Pointer<_NSRange> leftoverRange) { - _objc_msgSend_392( - this.pointer, - _sel_getCString_maxLength_range_remainingRange_, - bytes, - maxLength, - aRange, - leftoverRange); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMutableAttributedString, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _objc_msgSend_26(this.pointer, _sel_writeToFile_atomically_, - path.pointer, useAuxiliaryFile); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMutableAttributedString, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _objc_msgSend_134( - this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMutableAttributedString, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSObject? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMutableAttributedString, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSObject? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); +late final _class_NSMutableAttributedString = + objc.getClass("NSMutableAttributedString"); +late final _sel_replaceCharactersInRange_withString_ = + objc.registerName("replaceCharactersInRange:withString:"); +final _objc_msgSend_72 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_setAttributes_range_ = + objc.registerName("setAttributes:range:"); +final _objc_msgSend_73 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_mutableString = objc.registerName("mutableString"); +final _objc_msgSend_74 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_addAttribute_value_range_ = + objc.registerName("addAttribute:value:range:"); +final _objc_msgSend_75 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_addAttributes_range_ = + objc.registerName("addAttributes:range:"); +final _objc_msgSend_76 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_removeAttribute_range_ = + objc.registerName("removeAttribute:range:"); +final _objc_msgSend_77 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_replaceCharactersInRange_withAttributedString_ = + objc.registerName("replaceCharactersInRange:withAttributedString:"); +final _objc_msgSend_78 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_insertAttributedString_atIndex_ = + objc.registerName("insertAttributedString:atIndex:"); +final _objc_msgSend_79 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_appendAttributedString_ = + objc.registerName("appendAttributedString:"); +final _objc_msgSend_80 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_deleteCharactersInRange_ = + objc.registerName("deleteCharactersInRange:"); +final _objc_msgSend_81 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_setAttributedString_ = + objc.registerName("setAttributedString:"); +late final _sel_beginEditing = objc.registerName("beginEditing"); +final _objc_msgSend_82 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_endEditing = objc.registerName("endEditing"); +late final _sel_appendLocalizedFormat_ = + objc.registerName("appendLocalizedFormat:"); + +class NSDateFormatter extends NSFormatter { + NSDateFormatter._(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 [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 [NSDateFormatter]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSDateFormatter); } - static NSObject? stringWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSString, _sel_stringWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + int get formattingContext { + return _objc_msgSend_89(this.pointer, _sel_formattingContext); } - static NSObject? stringWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - _class_NSString, _sel_stringWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + set formattingContext(int value) { + return _objc_msgSend_90(this.pointer, _sel_setFormattingContext_, value); } - NSObject? initWithCStringNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool freeBuffer) { - final _ret = _objc_msgSend_393( + bool getObjectValue_forString_range_error_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer<_NSRange> rangep, + ffi.Pointer> error) { + return _objc_msgSend_91( this.pointer, - _sel_initWithCStringNoCopy_length_freeWhenDone_, - bytes, - length, - freeBuffer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: false, release: true); + _sel_getObjectValue_forString_range_error_, + obj, + string.pointer, + rangep, + error); } - NSObject? initWithCString_length_(ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_384( - this.pointer, _sel_initWithCString_length_, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + objc.NSString stringFromDate_(objc.NSDate date) { + final _ret = + _objc_msgSend_92(this.pointer, _sel_stringFromDate_, date.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject? initWithCString_(ffi.Pointer bytes) { - final _ret = _objc_msgSend_372(this.pointer, _sel_initWithCString_, bytes); + objc.NSDate? dateFromString_(objc.NSString string) { + final _ret = + _objc_msgSend_93(this.pointer, _sel_dateFromString_, string.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static NSObject? stringWithCString_length_( - ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_384( - _class_NSString, _sel_stringWithCString_length_, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + static objc.NSString localizedStringFromDate_dateStyle_timeStyle_( + objc.NSDate date, int dstyle, int tstyle) { + final _ret = _objc_msgSend_94( + _class_NSDateFormatter, + _sel_localizedStringFromDate_dateStyle_timeStyle_, + date.pointer, + dstyle, + tstyle); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject? stringWithCString_(ffi.Pointer bytes) { - final _ret = - _objc_msgSend_372(_class_NSString, _sel_stringWithCString_, bytes); + static objc.NSString? dateFormatFromTemplate_options_locale_( + objc.NSString tmplate, int opts, objc.NSLocale? locale) { + final _ret = _objc_msgSend_95( + _class_NSDateFormatter, + _sel_dateFormatFromTemplate_options_locale_, + tmplate.pointer, + opts, + locale?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void getCharacters_(ffi.Pointer buffer) { - _objc_msgSend_394(this.pointer, _sel_getCharacters_, buffer); + static int getDefaultFormatterBehavior() { + return _objc_msgSend_96( + _class_NSDateFormatter, _sel_defaultFormatterBehavior); } - NSString variantFittingPresentationWidth_(int width) { - final _ret = _objc_msgSend_395( - this.pointer, _sel_variantFittingPresentationWidth_, width); - return NSString._(_ret, retain: true, release: true); + static void setDefaultFormatterBehavior(int value) { + return _objc_msgSend_97( + _class_NSDateFormatter, _sel_setDefaultFormatterBehavior_, value); } - static NSString pathWithComponents_(NSArray components) { - final _ret = _objc_msgSend_396( - _class_NSString, _sel_pathWithComponents_, components.pointer); - return NSString._(_ret, retain: true, release: true); + void setLocalizedDateFormatFromTemplate_(objc.NSString dateFormatTemplate) { + _objc_msgSend_98(this.pointer, _sel_setLocalizedDateFormatFromTemplate_, + dateFormatTemplate.pointer); } - NSArray get pathComponents { - final _ret = _objc_msgSend_85(this.pointer, _sel_pathComponents); - return NSArray._(_ret, retain: true, release: true); + objc.NSString get dateFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_dateFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool get absolutePath { - return _objc_msgSend_12(this.pointer, _sel_isAbsolutePath); + set dateFormat(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setDateFormat_, value.pointer); } - NSString get lastPathComponent { - final _ret = _objc_msgSend_21(this.pointer, _sel_lastPathComponent); - return NSString._(_ret, retain: true, release: true); + int get dateStyle { + return _objc_msgSend_100(this.pointer, _sel_dateStyle); } - NSString get stringByDeletingLastPathComponent { - final _ret = - _objc_msgSend_21(this.pointer, _sel_stringByDeletingLastPathComponent); - return NSString._(_ret, retain: true, release: true); + set dateStyle(int value) { + return _objc_msgSend_101(this.pointer, _sel_setDateStyle_, value); } - NSString stringByAppendingPathComponent_(NSString str) { - final _ret = _objc_msgSend_69( - this.pointer, _sel_stringByAppendingPathComponent_, str.pointer); - return NSString._(_ret, retain: true, release: true); + int get timeStyle { + return _objc_msgSend_100(this.pointer, _sel_timeStyle); } - NSString get pathExtension { - final _ret = _objc_msgSend_21(this.pointer, _sel_pathExtension); - return NSString._(_ret, retain: true, release: true); + set timeStyle(int value) { + return _objc_msgSend_101(this.pointer, _sel_setTimeStyle_, value); } - NSString get stringByDeletingPathExtension { - final _ret = - _objc_msgSend_21(this.pointer, _sel_stringByDeletingPathExtension); - return NSString._(_ret, retain: true, release: true); + objc.NSLocale get locale { + final _ret = _objc_msgSend_102(this.pointer, _sel_locale); + return objc.NSLocale.castFromPointer(_ret, retain: true, release: true); } - NSString? stringByAppendingPathExtension_(NSString str) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_stringByAppendingPathExtension_, str.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + set locale(objc.NSLocale value) { + return _objc_msgSend_103(this.pointer, _sel_setLocale_, value.pointer); } - NSString get stringByAbbreviatingWithTildeInPath { - final _ret = _objc_msgSend_21( - this.pointer, _sel_stringByAbbreviatingWithTildeInPath); - return NSString._(_ret, retain: true, release: true); + bool get generatesCalendarDates { + return _objc_msgSend_7(this.pointer, _sel_generatesCalendarDates); } - NSString get stringByExpandingTildeInPath { - final _ret = - _objc_msgSend_21(this.pointer, _sel_stringByExpandingTildeInPath); - return NSString._(_ret, retain: true, release: true); + set generatesCalendarDates(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setGeneratesCalendarDates_, value); } - NSString get stringByStandardizingPath { - final _ret = _objc_msgSend_21(this.pointer, _sel_stringByStandardizingPath); - return NSString._(_ret, retain: true, release: true); + int get formatterBehavior { + return _objc_msgSend_96(this.pointer, _sel_formatterBehavior); } - NSString get stringByResolvingSymlinksInPath { - final _ret = - _objc_msgSend_21(this.pointer, _sel_stringByResolvingSymlinksInPath); - return NSString._(_ret, retain: true, release: true); + set formatterBehavior(int value) { + return _objc_msgSend_97(this.pointer, _sel_setFormatterBehavior_, value); } - NSArray stringsByAppendingPaths_(NSArray paths) { - final _ret = _objc_msgSend_68( - this.pointer, _sel_stringsByAppendingPaths_, paths.pointer); - return NSArray._(_ret, retain: true, release: true); + NSTimeZone get timeZone { + final _ret = _objc_msgSend_110(this.pointer, _sel_timeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - int completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_( - ffi.Pointer> outputName, - bool flag, - ffi.Pointer> outputArray, - NSArray? filterTypes) { - return _objc_msgSend_397( - this.pointer, - _sel_completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_, - outputName, - flag, - outputArray, - filterTypes?.pointer ?? ffi.nullptr); + set timeZone(NSTimeZone value) { + return _objc_msgSend_111(this.pointer, _sel_setTimeZone_, value.pointer); } - ffi.Pointer get fileSystemRepresentation { - return _objc_msgSend_13(this.pointer, _sel_fileSystemRepresentation); + NSCalendar get calendar { + final _ret = _objc_msgSend_121(this.pointer, _sel_calendar); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); } - bool getFileSystemRepresentation_maxLength_( - ffi.Pointer cname, int max) { - return _objc_msgSend_242( - this.pointer, _sel_getFileSystemRepresentation_maxLength_, cname, max); + set calendar(NSCalendar value) { + return _objc_msgSend_161(this.pointer, _sel_setCalendar_, value.pointer); } - NSString? stringByAddingPercentEncodingWithAllowedCharacters_( - NSCharacterSet allowedCharacters) { - final _ret = _objc_msgSend_398( - this.pointer, - _sel_stringByAddingPercentEncodingWithAllowedCharacters_, - allowedCharacters.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get stringByRemovingPercentEncoding { - final _ret = - _objc_msgSend_44(this.pointer, _sel_stringByRemovingPercentEncoding); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + bool get lenient { + return _objc_msgSend_7(this.pointer, _sel_isLenient); } - NSString? stringByAddingPercentEscapesUsingEncoding_(int enc) { - final _ret = _objc_msgSend_399( - this.pointer, _sel_stringByAddingPercentEscapesUsingEncoding_, enc); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + set lenient(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLenient_, value); } - NSString? stringByReplacingPercentEscapesUsingEncoding_(int enc) { - final _ret = _objc_msgSend_399( - this.pointer, _sel_stringByReplacingPercentEscapesUsingEncoding_, enc); + objc.NSDate? get twoDigitStartDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_twoDigitStartDate); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); - } - - NSArray linguisticTagsInRange_scheme_options_orthography_tokenRanges_( - _NSRange range, - NSString scheme, - int options, - NSOrthography? orthography, - ffi.Pointer> tokenRanges) { - final _ret = _objc_msgSend_401( - this.pointer, - _sel_linguisticTagsInRange_scheme_options_orthography_tokenRanges_, - range, - scheme.pointer, - options, - orthography?.pointer ?? ffi.nullptr, - tokenRanges); - return NSArray._(_ret, retain: true, release: true); - } - - void enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_( - _NSRange range, - NSString scheme, - int options, - NSOrthography? orthography, - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool block) { - _objc_msgSend_402( - this.pointer, - _sel_enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_, - range, - scheme.pointer, - options, - orthography?.pointer ?? ffi.nullptr, - block.pointer); - } - - static NSString new1() { - final _ret = _objc_msgSend_2(_class_NSString, _sel_new); - return NSString._(_ret, retain: false, release: true); - } - - static NSString allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSString, _sel_allocWithZone_, zone); - return NSString._(_ret, retain: false, release: true); - } - - static NSString alloc() { - final _ret = _objc_msgSend_2(_class_NSString, _sel_alloc); - return NSString._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSString, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSString, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSString, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSString, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSString, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSString, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSString, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSString, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSString, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -extension StringToNSString on String { - NSString toNSString() => NSString(this); -} - -late final _class_NSString = objc.getClass("NSString"); -late final _sel_length = objc.registerName("length"); -late final _sel_characterAtIndex_ = objc.registerName("characterAtIndex:"); -final _objc_msgSend_18 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedShort Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, int)>(); - -class NSCoder extends NSObject { - NSCoder._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSCoder] that points to the same underlying object as [other]. - static NSCoder castFrom(T other) { - return NSCoder._(other.pointer, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSCoder] that wraps the given raw object pointer. - static NSCoder castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCoder._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCoder]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSCoder); - } - - void encodeValueOfObjCType_at_( - ffi.Pointer type, ffi.Pointer addr) { - _objc_msgSend_19(this.pointer, _sel_encodeValueOfObjCType_at_, type, addr); - } - - void encodeDataObject_(NSData data) { - _objc_msgSend_285(this.pointer, _sel_encodeDataObject_, data.pointer); + set twoDigitStartDate(objc.NSDate? value) { + return _objc_msgSend_162(this.pointer, _sel_setTwoDigitStartDate_, + value?.pointer ?? ffi.nullptr); } - NSData? decodeDataObject() { - final _ret = _objc_msgSend_286(this.pointer, _sel_decodeDataObject); + objc.NSDate? get defaultDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_defaultDate); return _ret.address == 0 ? null - : NSData._(_ret, retain: true, release: true); - } - - void decodeValueOfObjCType_at_size_( - ffi.Pointer type, ffi.Pointer data, int size) { - _objc_msgSend_287( - this.pointer, _sel_decodeValueOfObjCType_at_size_, type, data, size); - } - - int versionForClassName_(NSString className) { - return _objc_msgSend_288( - this.pointer, _sel_versionForClassName_, className.pointer); - } - - void encodeObject_(NSObject? object) { - _objc_msgSend_289( - this.pointer, _sel_encodeObject_, object?.pointer ?? ffi.nullptr); - } - - void encodeRootObject_(NSObject rootObject) { - _objc_msgSend_15(this.pointer, _sel_encodeRootObject_, rootObject.pointer); - } - - void encodeBycopyObject_(NSObject? anObject) { - _objc_msgSend_289(this.pointer, _sel_encodeBycopyObject_, - anObject?.pointer ?? ffi.nullptr); - } - - void encodeByrefObject_(NSObject? anObject) { - _objc_msgSend_289(this.pointer, _sel_encodeByrefObject_, - anObject?.pointer ?? ffi.nullptr); - } - - void encodeConditionalObject_(NSObject? object) { - _objc_msgSend_289(this.pointer, _sel_encodeConditionalObject_, - object?.pointer ?? ffi.nullptr); - } - - void encodeValuesOfObjCTypes_(ffi.Pointer types) { - _objc_msgSend_290(this.pointer, _sel_encodeValuesOfObjCTypes_, types); - } - - void encodeArrayOfObjCType_count_at_( - ffi.Pointer type, int count, ffi.Pointer array) { - _objc_msgSend_291( - this.pointer, _sel_encodeArrayOfObjCType_count_at_, type, count, array); - } - - void encodeBytes_length_(ffi.Pointer byteaddr, int length) { - _objc_msgSend_22(this.pointer, _sel_encodeBytes_length_, byteaddr, length); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSObject? decodeObject() { - final _ret = _objc_msgSend_17(this.pointer, _sel_decodeObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + set defaultDate(objc.NSDate? value) { + return _objc_msgSend_162( + this.pointer, _sel_setDefaultDate_, value?.pointer ?? ffi.nullptr); } - NSObject? decodeTopLevelObjectAndReturnError_( - ffi.Pointer> error) { - final _ret = _objc_msgSend_292( - this.pointer, _sel_decodeTopLevelObjectAndReturnError_, error); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + objc.NSArray get eraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_eraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void decodeValuesOfObjCTypes_(ffi.Pointer types) { - _objc_msgSend_290(this.pointer, _sel_decodeValuesOfObjCTypes_, types); + set eraSymbols(objc.NSArray value) { + return _objc_msgSend_163(this.pointer, _sel_setEraSymbols_, value.pointer); } - void decodeArrayOfObjCType_count_at_( - ffi.Pointer itemType, int count, ffi.Pointer array) { - _objc_msgSend_291(this.pointer, _sel_decodeArrayOfObjCType_count_at_, - itemType, count, array); + objc.NSArray get monthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_monthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer decodeBytesWithReturnedLength_( - ffi.Pointer lengthp) { - return _objc_msgSend_293( - this.pointer, _sel_decodeBytesWithReturnedLength_, lengthp); + set monthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setMonthSymbols_, value.pointer); } - void encodePropertyList_(NSObject aPropertyList) { - _objc_msgSend_15( - this.pointer, _sel_encodePropertyList_, aPropertyList.pointer); + objc.NSArray get shortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSObject? decodePropertyList() { - final _ret = _objc_msgSend_17(this.pointer, _sel_decodePropertyList); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + set shortMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortMonthSymbols_, value.pointer); } - void setObjectZone_(ffi.Pointer<_NSZone> zone) { - _objc_msgSend_294(this.pointer, _sel_setObjectZone_, zone); + objc.NSArray get weekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_weekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer<_NSZone> objectZone() { - return _objc_msgSend_295(this.pointer, _sel_objectZone); + set weekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setWeekdaySymbols_, value.pointer); } - int get systemVersion { - return _objc_msgSend_214(this.pointer, _sel_systemVersion); + objc.NSArray get shortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool get allowsKeyedCoding { - return _objc_msgSend_12(this.pointer, _sel_allowsKeyedCoding); + set shortWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortWeekdaySymbols_, value.pointer); } - void encodeObject_forKey_(NSObject? object, NSString key) { - _objc_msgSend_135(this.pointer, _sel_encodeObject_forKey_, - object?.pointer ?? ffi.nullptr, key.pointer); + objc.NSString get AMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_AMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void encodeConditionalObject_forKey_(NSObject? object, NSString key) { - _objc_msgSend_135(this.pointer, _sel_encodeConditionalObject_forKey_, - object?.pointer ?? ffi.nullptr, key.pointer); + set AMSymbol(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setAMSymbol_, value.pointer); } - void encodeBool_forKey_(bool value, NSString key) { - _objc_msgSend_296( - this.pointer, _sel_encodeBool_forKey_, value, key.pointer); + objc.NSString get PMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_PMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void encodeInt_forKey_(int value, NSString key) { - _objc_msgSend_297(this.pointer, _sel_encodeInt_forKey_, value, key.pointer); + set PMSymbol(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setPMSymbol_, value.pointer); } - void encodeInt32_forKey_(int value, NSString key) { - _objc_msgSend_298( - this.pointer, _sel_encodeInt32_forKey_, value, key.pointer); + objc.NSArray get longEraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_longEraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void encodeInt64_forKey_(int value, NSString key) { - _objc_msgSend_299( - this.pointer, _sel_encodeInt64_forKey_, value, key.pointer); + set longEraSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setLongEraSymbols_, value.pointer); } - void encodeFloat_forKey_(double value, NSString key) { - _objc_msgSend_300( - this.pointer, _sel_encodeFloat_forKey_, value, key.pointer); + objc.NSArray get veryShortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void encodeDouble_forKey_(double value, NSString key) { - _objc_msgSend_301( - this.pointer, _sel_encodeDouble_forKey_, value, key.pointer); + set veryShortMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setVeryShortMonthSymbols_, value.pointer); } - void encodeBytes_length_forKey_( - ffi.Pointer bytes, int length, NSString key) { - _objc_msgSend_302(this.pointer, _sel_encodeBytes_length_forKey_, bytes, - length, key.pointer); + objc.NSArray get standaloneMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool containsValueForKey_(NSString key) { - return _objc_msgSend_64( - this.pointer, _sel_containsValueForKey_, key.pointer); + set standaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setStandaloneMonthSymbols_, value.pointer); } - NSObject? decodeObjectForKey_(NSString key) { + objc.NSArray get shortStandaloneMonthSymbols { final _ret = - _objc_msgSend_38(this.pointer, _sel_decodeObjectForKey_, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? decodeTopLevelObjectForKey_error_( - NSString key, ffi.Pointer> error) { - final _ret = _objc_msgSend_303(this.pointer, - _sel_decodeTopLevelObjectForKey_error_, key.pointer, error); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - bool decodeBoolForKey_(NSString key) { - return _objc_msgSend_64(this.pointer, _sel_decodeBoolForKey_, key.pointer); - } - - int decodeIntForKey_(NSString key) { - return _objc_msgSend_304(this.pointer, _sel_decodeIntForKey_, key.pointer); - } - - int decodeInt32ForKey_(NSString key) { - return _objc_msgSend_305( - this.pointer, _sel_decodeInt32ForKey_, key.pointer); - } - - int decodeInt64ForKey_(NSString key) { - return _objc_msgSend_306( - this.pointer, _sel_decodeInt64ForKey_, key.pointer); + _objc_msgSend_6(this.pointer, _sel_shortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - double decodeFloatForKey_(NSString key) { - return objc.useMsgSendVariants - ? _objc_msgSend_307Fpret( - this.pointer, _sel_decodeFloatForKey_, key.pointer) - : _objc_msgSend_307(this.pointer, _sel_decodeFloatForKey_, key.pointer); - } - - double decodeDoubleForKey_(NSString key) { - return objc.useMsgSendVariants - ? _objc_msgSend_308Fpret( - this.pointer, _sel_decodeDoubleForKey_, key.pointer) - : _objc_msgSend_308( - this.pointer, _sel_decodeDoubleForKey_, key.pointer); + set shortStandaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortStandaloneMonthSymbols_, value.pointer); } - ffi.Pointer decodeBytesForKey_returnedLength_( - NSString key, ffi.Pointer lengthp) { - return _objc_msgSend_309(this.pointer, - _sel_decodeBytesForKey_returnedLength_, key.pointer, lengthp); + objc.NSArray get veryShortStandaloneMonthSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void encodeInteger_forKey_(int value, NSString key) { - _objc_msgSend_310( - this.pointer, _sel_encodeInteger_forKey_, value, key.pointer); + set veryShortStandaloneMonthSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setVeryShortStandaloneMonthSymbols_, value.pointer); } - int decodeIntegerForKey_(NSString key) { - return _objc_msgSend_288( - this.pointer, _sel_decodeIntegerForKey_, key.pointer); + objc.NSArray get veryShortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool get requiresSecureCoding { - return _objc_msgSend_12(this.pointer, _sel_requiresSecureCoding); + set veryShortWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setVeryShortWeekdaySymbols_, value.pointer); } - NSObject? decodeObjectOfClass_forKey_(NSObject aClass, NSString key) { - final _ret = _objc_msgSend_311(this.pointer, - _sel_decodeObjectOfClass_forKey_, aClass.pointer, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + objc.NSArray get standaloneWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSObject? decodeTopLevelObjectOfClass_forKey_error_(NSObject aClass, - NSString key, ffi.Pointer> error) { - final _ret = _objc_msgSend_312( - this.pointer, - _sel_decodeTopLevelObjectOfClass_forKey_error_, - aClass.pointer, - key.pointer, - error); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + set standaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setStandaloneWeekdaySymbols_, value.pointer); } - NSArray? decodeArrayOfObjectsOfClass_forKey_(NSObject cls, NSString key) { - final _ret = _objc_msgSend_313(this.pointer, - _sel_decodeArrayOfObjectsOfClass_forKey_, cls.pointer, key.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + objc.NSArray get shortStandaloneWeekdaySymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_( - NSObject keyCls, NSObject objectCls, NSString key) { - final _ret = _objc_msgSend_314( - this.pointer, - _sel_decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_, - keyCls.pointer, - objectCls.pointer, - key.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + set shortStandaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortStandaloneWeekdaySymbols_, value.pointer); } - NSObject? decodeObjectOfClasses_forKey_(NSSet? classes, NSString key) { - final _ret = _objc_msgSend_315( - this.pointer, - _sel_decodeObjectOfClasses_forKey_, - classes?.pointer ?? ffi.nullptr, - key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + objc.NSArray get veryShortStandaloneWeekdaySymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSObject? decodeTopLevelObjectOfClasses_forKey_error_(NSSet? classes, - NSString key, ffi.Pointer> error) { - final _ret = _objc_msgSend_316( - this.pointer, - _sel_decodeTopLevelObjectOfClasses_forKey_error_, - classes?.pointer ?? ffi.nullptr, - key.pointer, - error); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + set veryShortStandaloneWeekdaySymbols(objc.NSArray value) { + return _objc_msgSend_163(this.pointer, + _sel_setVeryShortStandaloneWeekdaySymbols_, value.pointer); } - NSArray? decodeArrayOfObjectsOfClasses_forKey_(NSSet classes, NSString key) { - final _ret = _objc_msgSend_317( - this.pointer, - _sel_decodeArrayOfObjectsOfClasses_forKey_, - classes.pointer, - key.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + objc.NSArray get quarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_quarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_( - NSSet keyClasses, NSSet objectClasses, NSString key) { - final _ret = _objc_msgSend_318( - this.pointer, - _sel_decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_, - keyClasses.pointer, - objectClasses.pointer, - key.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + set quarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setQuarterSymbols_, value.pointer); } - NSObject? decodePropertyListForKey_(NSString key) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_decodePropertyListForKey_, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + objc.NSArray get shortQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSSet? get allowedClasses { - final _ret = _objc_msgSend_319(this.pointer, _sel_allowedClasses); - return _ret.address == 0 - ? null - : NSSet._(_ret, retain: true, release: true); + set shortQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortQuarterSymbols_, value.pointer); } - void failWithError_(NSError error) { - _objc_msgSend_320(this.pointer, _sel_failWithError_, error.pointer); + objc.NSArray get standaloneQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get decodingFailurePolicy { - return _objc_msgSend_321(this.pointer, _sel_decodingFailurePolicy); + set standaloneQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setStandaloneQuarterSymbols_, value.pointer); } - NSError? get error { - final _ret = _objc_msgSend_322(this.pointer, _sel_error); - return _ret.address == 0 - ? null - : NSError._(_ret, retain: true, release: true); + objc.NSArray get shortStandaloneQuarterSymbols { + final _ret = + _objc_msgSend_6(this.pointer, _sel_shortStandaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void encodeNXObject_(NSObject object) { - _objc_msgSend_15(this.pointer, _sel_encodeNXObject_, object.pointer); + set shortStandaloneQuarterSymbols(objc.NSArray value) { + return _objc_msgSend_163( + this.pointer, _sel_setShortStandaloneQuarterSymbols_, value.pointer); } - NSObject? decodeNXObject() { - final _ret = _objc_msgSend_17(this.pointer, _sel_decodeNXObject); + objc.NSDate? get gregorianStartDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_gregorianStartDate); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); - } - - void decodeValueOfObjCType_at_( - ffi.Pointer type, ffi.Pointer data) { - _objc_msgSend_19(this.pointer, _sel_decodeValueOfObjCType_at_, type, data); - } - - void encodePoint_(CGPoint point) { - _objc_msgSend_323(this.pointer, _sel_encodePoint_, point); - } - - void decodePoint(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_59Stret(stret, this.pointer, _sel_decodePoint) - : stret.ref = _objc_msgSend_59(this.pointer, _sel_decodePoint); - } - - void encodeSize_(CGSize size) { - _objc_msgSend_324(this.pointer, _sel_encodeSize_, size); - } - - void decodeSize(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_60Stret(stret, this.pointer, _sel_decodeSize) - : stret.ref = _objc_msgSend_60(this.pointer, _sel_decodeSize); - } - - void encodeRect_(CGRect rect) { - _objc_msgSend_325(this.pointer, _sel_encodeRect_, rect); - } - - void decodeRect(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_61Stret(stret, this.pointer, _sel_decodeRect) - : stret.ref = _objc_msgSend_61(this.pointer, _sel_decodeRect); - } - - void encodePoint_forKey_(CGPoint point, NSString key) { - _objc_msgSend_326( - this.pointer, _sel_encodePoint_forKey_, point, key.pointer); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - void encodeSize_forKey_(CGSize size, NSString key) { - _objc_msgSend_327(this.pointer, _sel_encodeSize_forKey_, size, key.pointer); + set gregorianStartDate(objc.NSDate? value) { + return _objc_msgSend_162(this.pointer, _sel_setGregorianStartDate_, + value?.pointer ?? ffi.nullptr); } - void encodeRect_forKey_(CGRect rect, NSString key) { - _objc_msgSend_328(this.pointer, _sel_encodeRect_forKey_, rect, key.pointer); + bool get doesRelativeDateFormatting { + return _objc_msgSend_7(this.pointer, _sel_doesRelativeDateFormatting); } - void decodePointForKey_(ffi.Pointer stret, NSString key) { - objc.useMsgSendVariants - ? _objc_msgSend_329Stret( - stret, this.pointer, _sel_decodePointForKey_, key.pointer) - : stret.ref = _objc_msgSend_329( - this.pointer, _sel_decodePointForKey_, key.pointer); + set doesRelativeDateFormatting(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setDoesRelativeDateFormatting_, value); } - void decodeSizeForKey_(ffi.Pointer stret, NSString key) { - objc.useMsgSendVariants - ? _objc_msgSend_330Stret( - stret, this.pointer, _sel_decodeSizeForKey_, key.pointer) - : stret.ref = _objc_msgSend_330( - this.pointer, _sel_decodeSizeForKey_, key.pointer); + objc.NSObject initWithDateFormat_allowNaturalLanguage_( + objc.NSString format, bool flag) { + final _ret = _objc_msgSend_164(this.pointer, + _sel_initWithDateFormat_allowNaturalLanguage_, format.pointer, flag); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void decodeRectForKey_(ffi.Pointer stret, NSString key) { - objc.useMsgSendVariants - ? _objc_msgSend_331Stret( - stret, this.pointer, _sel_decodeRectForKey_, key.pointer) - : stret.ref = _objc_msgSend_331( - this.pointer, _sel_decodeRectForKey_, key.pointer); + bool allowsNaturalLanguage() { + return _objc_msgSend_7(this.pointer, _sel_allowsNaturalLanguage); } @override - NSCoder init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSCoder._(_ret, retain: true, release: true); + NSDateFormatter init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSDateFormatter.castFromPointer(_ret, retain: true, release: true); } - static NSCoder new1() { - final _ret = _objc_msgSend_2(_class_NSCoder, _sel_new); - return NSCoder._(_ret, retain: false, release: true); + static NSDateFormatter new1() { + final _ret = _objc_msgSend_40(_class_NSDateFormatter, _sel_new); + return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); } - static NSCoder allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSCoder, _sel_allocWithZone_, zone); - return NSCoder._(_ret, retain: false, release: true); + static NSDateFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSDateFormatter, _sel_allocWithZone_, zone); + return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); } - static NSCoder alloc() { - final _ret = _objc_msgSend_2(_class_NSCoder, _sel_alloc); - return NSCoder._(_ret, retain: false, release: true); + static NSDateFormatter alloc() { + final _ret = _objc_msgSend_40(_class_NSDateFormatter, _sel_alloc); + return NSDateFormatter.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSCoder, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSDateFormatter, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSCoder, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSDateFormatter, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSCoder, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSDateFormatter, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSCoder, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSDateFormatter, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSCoder, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSDateFormatter, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSCoder, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSDateFormatter, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSCoder, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSDateFormatter, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSCoder, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSDateFormatter, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSCoder, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSDateFormatter, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSCoder = objc.getClass("NSCoder"); -late final _sel_encodeValueOfObjCType_at_ = - objc.registerName("encodeValueOfObjCType:at:"); -final _objc_msgSend_19 = 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 _class_NSDateFormatter = objc.getClass("NSDateFormatter"); -class NSData extends NSObject { - NSData._(ffi.Pointer pointer, +class NSFormatter extends objc.NSObject { + NSFormatter._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSData] that points to the same underlying object as [other]. - static NSData castFrom(T other) { - return NSData._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSFormatter] that points to the same underlying object as [other]. + NSFormatter.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSData] that wraps the given raw object pointer. - static NSData castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSData._(other, retain: retain, release: release); - } + /// 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); - /// Returns whether [obj] is an instance of [NSData]. + /// Returns whether [obj] is an instance of [NSFormatter]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSData); - } - - int get length { - return _objc_msgSend_10(this.pointer, _sel_length); - } - - ffi.Pointer get bytes { - return _objc_msgSend_20(this.pointer, _sel_bytes); - } - - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - void getBytes_length_(ffi.Pointer buffer, int length) { - _objc_msgSend_22(this.pointer, _sel_getBytes_length_, buffer, length); - } - - void getBytes_range_(ffi.Pointer buffer, _NSRange range) { - _objc_msgSend_23(this.pointer, _sel_getBytes_range_, buffer, range); - } - - bool isEqualToData_(NSData other) { - return _objc_msgSend_24(this.pointer, _sel_isEqualToData_, other.pointer); - } - - NSData subdataWithRange_(_NSRange range) { - final _ret = _objc_msgSend_25(this.pointer, _sel_subdataWithRange_, range); - return NSData._(_ret, retain: true, release: true); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _objc_msgSend_26(this.pointer, _sel_writeToFile_atomically_, - path.pointer, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _objc_msgSend_134( - this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); - } - - bool writeToFile_options_error_(NSString path, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _objc_msgSend_269(this.pointer, _sel_writeToFile_options_error_, - path.pointer, writeOptionsMask, errorPtr); - } - - bool writeToURL_options_error_(NSURL url, int writeOptionsMask, - ffi.Pointer> errorPtr) { - return _objc_msgSend_270(this.pointer, _sel_writeToURL_options_error_, - url.pointer, writeOptionsMask, errorPtr); - } - - void rangeOfData_options_range_(ffi.Pointer<_NSRange> stret, - NSData dataToFind, int mask, _NSRange searchRange) { - objc.useMsgSendVariants - ? _objc_msgSend_271Stret( - stret, - this.pointer, - _sel_rangeOfData_options_range_, - dataToFind.pointer, - mask, - searchRange) - : stret.ref = _objc_msgSend_271( - this.pointer, - _sel_rangeOfData_options_range_, - dataToFind.pointer, - mask, - searchRange); - } - - void enumerateByteRangesUsingBlock_( - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool block) { - _objc_msgSend_272( - this.pointer, _sel_enumerateByteRangesUsingBlock_, block.pointer); - } - - static NSData data() { - final _ret = _objc_msgSend_2(_class_NSData, _sel_data); - return NSData._(_ret, retain: true, release: true); - } - - static NSData dataWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - _class_NSData, _sel_dataWithBytes_length_, bytes, length); - return NSData._(_ret, retain: true, release: true); - } - - static NSData dataWithBytesNoCopy_length_( - ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - _class_NSData, _sel_dataWithBytesNoCopy_length_, bytes, length); - return NSData._(_ret, retain: false, release: true); - } - - static NSData dataWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _objc_msgSend_274(_class_NSData, - _sel_dataWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); - return NSData._(_ret, retain: false, release: true); - } - - static NSData? dataWithContentsOfFile_options_error_(NSString path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_275( - _class_NSData, - _sel_dataWithContentsOfFile_options_error_, - path.pointer, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSFormatter); } - static NSData? dataWithContentsOfURL_options_error_(NSURL url, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_276( - _class_NSData, - _sel_dataWithContentsOfURL_options_error_, - url.pointer, - readOptionsMask, - errorPtr); + objc.NSString? stringForObjectValue_(objc.NSObject? obj) { + final _ret = _objc_msgSend_83( + this.pointer, _sel_stringForObjectValue_, obj?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSData._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSData? dataWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSData, _sel_dataWithContentsOfFile_, path.pointer); + NSAttributedString? attributedStringForObjectValue_withDefaultAttributes_( + objc.NSObject obj, objc.NSDictionary? attrs) { + final _ret = _objc_msgSend_84( + this.pointer, + _sel_attributedStringForObjectValue_withDefaultAttributes_, + obj.pointer, + attrs?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSData._(_ret, retain: true, release: true); + : NSAttributedString.castFromPointer(_ret, retain: true, release: true); } - static NSData? dataWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - _class_NSData, _sel_dataWithContentsOfURL_, url.pointer); + objc.NSString? editingStringForObjectValue_(objc.NSObject obj) { + final _ret = _objc_msgSend_85( + this.pointer, _sel_editingStringForObjectValue_, obj.pointer); return _ret.address == 0 ? null - : NSData._(_ret, retain: true, release: true); - } - - NSData initWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - this.pointer, _sel_initWithBytes_length_, bytes, length); - return NSData._(_ret, retain: true, release: true); - } - - NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - this.pointer, _sel_initWithBytesNoCopy_length_, bytes, length); - return NSData._(_ret, retain: false, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _objc_msgSend_274(this.pointer, - _sel_initWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); - return NSData._(_ret, retain: false, release: true); - } - - NSData initWithBytesNoCopy_length_deallocator_(ffi.Pointer bytes, - int length, ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _objc_msgSend_278( - this.pointer, - _sel_initWithBytesNoCopy_length_deallocator_, - bytes, - length, - deallocator?.pointer ?? ffi.nullptr); - return NSData._(_ret, retain: false, release: true); - } - - NSData? initWithContentsOfFile_options_error_(NSString path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_275( + bool getObjectValue_forString_errorDescription_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer> error) { + return _objc_msgSend_86( this.pointer, - _sel_initWithContentsOfFile_options_error_, - path.pointer, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); + _sel_getObjectValue_forString_errorDescription_, + obj, + string.pointer, + error); } - NSData? initWithContentsOfURL_options_error_(NSURL url, int readOptionsMask, - ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_276( + bool isPartialStringValid_newEditingString_errorDescription_( + objc.NSString partialString, + ffi.Pointer> newString, + ffi.Pointer> error) { + return _objc_msgSend_87( this.pointer, - _sel_initWithContentsOfURL_options_error_, - url.pointer, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSData? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSData? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSData initWithData_(NSData data) { - final _ret = - _objc_msgSend_279(this.pointer, _sel_initWithData_, data.pointer); - return NSData._(_ret, retain: true, release: true); - } - - static NSData dataWithData_(NSData data) { - final _ret = - _objc_msgSend_279(_class_NSData, _sel_dataWithData_, data.pointer); - return NSData._(_ret, retain: true, release: true); + _sel_isPartialStringValid_newEditingString_errorDescription_, + partialString.pointer, + newString, + error); } - NSData? initWithBase64EncodedString_options_( - NSString base64String, int options) { - final _ret = _objc_msgSend_280( + bool + isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_( + ffi.Pointer> partialStringPtr, + ffi.Pointer<_NSRange> proposedSelRangePtr, + objc.NSString origString, + _NSRange origSelRange, + ffi.Pointer> error) { + return _objc_msgSend_88( this.pointer, - _sel_initWithBase64EncodedString_options_, - base64String.pointer, - options); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSString base64EncodedStringWithOptions_(int options) { - final _ret = _objc_msgSend_281( - this.pointer, _sel_base64EncodedStringWithOptions_, options); - return NSString._(_ret, retain: true, release: true); - } - - NSData? initWithBase64EncodedData_options_(NSData base64Data, int options) { - final _ret = _objc_msgSend_282(this.pointer, - _sel_initWithBase64EncodedData_options_, base64Data.pointer, options); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSData base64EncodedDataWithOptions_(int options) { - final _ret = _objc_msgSend_283( - this.pointer, _sel_base64EncodedDataWithOptions_, options); - return NSData._(_ret, retain: true, release: true); - } - - NSData? decompressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _objc_msgSend_284(this.pointer, - _sel_decompressedDataUsingAlgorithm_error_, algorithm, error); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSData? compressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _objc_msgSend_284(this.pointer, - _sel_compressedDataUsingAlgorithm_error_, algorithm, error); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - void getBytes_(ffi.Pointer buffer) { - _objc_msgSend_52(this.pointer, _sel_getBytes_, buffer); - } - - static NSObject? dataWithContentsOfMappedFile_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSData, _sel_dataWithContentsOfMappedFile_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? initWithContentsOfMappedFile_(NSString path) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithContentsOfMappedFile_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? initWithBase64Encoding_(NSString base64String) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithBase64Encoding_, base64String.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSString base64Encoding() { - final _ret = _objc_msgSend_21(this.pointer, _sel_base64Encoding); - return NSString._(_ret, retain: true, release: true); + _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_, + partialStringPtr, + proposedSelRangePtr, + origString.pointer, + origSelRange, + error); } @override - NSData init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSData._(_ret, retain: true, release: true); + NSFormatter init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFormatter.castFromPointer(_ret, retain: true, release: true); } - static NSData new1() { - final _ret = _objc_msgSend_2(_class_NSData, _sel_new); - return NSData._(_ret, retain: false, release: true); + static NSFormatter new1() { + final _ret = _objc_msgSend_40(_class_NSFormatter, _sel_new); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } - static NSData allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSData, _sel_allocWithZone_, zone); - return NSData._(_ret, retain: false, release: true); + static NSFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSFormatter, _sel_allocWithZone_, zone); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } - static NSData alloc() { - final _ret = _objc_msgSend_2(_class_NSData, _sel_alloc); - return NSData._(_ret, retain: false, release: true); + static NSFormatter alloc() { + final _ret = _objc_msgSend_40(_class_NSFormatter, _sel_alloc); + return NSFormatter.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSData, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFormatter, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSData, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFormatter, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSData, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSFormatter, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSData, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSFormatter, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSData, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFormatter, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64( - _class_NSData, _sel_automaticallyNotifiesObserversForKey_, key.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSData, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFormatter, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSData, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFormatter, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSData, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSFormatter, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSData = objc.getClass("NSData"); -late final _sel_bytes = objc.registerName("bytes"); -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_description = objc.registerName("description"); -final _objc_msgSend_21 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_getBytes_length_ = objc.registerName("getBytes:length:"); -final _objc_msgSend_22 = objc.msgSendPointer +late final _class_NSFormatter = objc.getClass("NSFormatter"); +late final _sel_stringForObjectValue_ = + objc.registerName("stringForObjectValue:"); +final _objc_msgSend_83 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); - -final class _NSRange extends ffi.Struct { - @ffi.UnsignedLong() - external int location; - - @ffi.UnsignedLong() - external int length; -} - -late final _sel_getBytes_range_ = objc.registerName("getBytes:range:"); -final _objc_msgSend_23 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_attributedStringForObjectValue_withDefaultAttributes_ = + objc.registerName("attributedStringForObjectValue:withDefaultAttributes:"); +final _objc_msgSend_84 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - _NSRange)>>() + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, _NSRange)>(); -late final _sel_isEqualToData_ = objc.registerName("isEqualToData:"); -final _objc_msgSend_24 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_editingStringForObjectValue_ = + objc.registerName("editingStringForObjectValue:"); +final _objc_msgSend_85 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_subdataWithRange_ = objc.registerName("subdataWithRange:"); -final _objc_msgSend_25 = 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_writeToFile_atomically_ = - objc.registerName("writeToFile:atomically:"); -final _objc_msgSend_26 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_getObjectValue_forString_errorDescription_ = + objc.registerName("getObjectValue:forString:errorDescription:"); +final _objc_msgSend_86 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer>, ffi.Pointer, - ffi.Bool)>>() + ffi.Pointer>)>>() .asFunction< bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer>, ffi.Pointer, - bool)>(); - -class NSURL extends NSObject { - NSURL._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSURL] that points to the same underlying object as [other]. - static NSURL castFrom(T other) { - return NSURL._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSURL] that wraps the given raw object pointer. - static NSURL castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURL._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURL]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSURL); - } + ffi.Pointer>)>(); +late final _sel_isPartialStringValid_newEditingString_errorDescription_ = objc + .registerName("isPartialStringValid:newEditingString:errorDescription:"); +final _objc_msgSend_87 = 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_88 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer<_NSRange>, + ffi.Pointer, + _NSRange, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer<_NSRange>, + ffi.Pointer, + _NSRange, + ffi.Pointer>)>(); - NSURL? initWithScheme_host_path_( - NSString scheme, NSString? host, NSString path) { - final _ret = _objc_msgSend_27(this.pointer, _sel_initWithScheme_host_path_, - scheme.pointer, host?.pointer ?? ffi.nullptr, path.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } +abstract class NSFormattingContext { + static const int NSFormattingContextUnknown = 0; + static const int NSFormattingContextDynamic = 1; + static const int NSFormattingContextStandalone = 2; + static const int NSFormattingContextListItem = 3; + static const int NSFormattingContextBeginningOfSentence = 4; + static const int NSFormattingContextMiddleOfSentence = 5; +} - NSURL initFileURLWithPath_isDirectory_relativeToURL_( - NSString path, bool isDir, NSURL? baseURL) { - final _ret = _objc_msgSend_28( - this.pointer, - _sel_initFileURLWithPath_isDirectory_relativeToURL_, - path.pointer, - isDir, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); - } +late final _sel_formattingContext = objc.registerName("formattingContext"); +final _objc_msgSend_89 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setFormattingContext_ = + objc.registerName("setFormattingContext:"); +final _objc_msgSend_90 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_getObjectValue_forString_range_error_ = + objc.registerName("getObjectValue:forString:range:error:"); +final _objc_msgSend_91 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer<_NSRange>, + ffi.Pointer>)>>() + .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_92 = 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_dateFromString_ = objc.registerName("dateFromString:"); +final _objc_msgSend_93 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - NSURL initFileURLWithPath_relativeToURL_(NSString path, NSURL? baseURL) { - final _ret = _objc_msgSend_29( - this.pointer, - _sel_initFileURLWithPath_relativeToURL_, - path.pointer, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); - } +abstract class NSDateFormatterStyle { + static const int NSDateFormatterNoStyle = 0; + static const int NSDateFormatterShortStyle = 1; + static const int NSDateFormatterMediumStyle = 2; + static const int NSDateFormatterLongStyle = 3; + static const int NSDateFormatterFullStyle = 4; +} - NSURL initFileURLWithPath_isDirectory_(NSString path, bool isDir) { - final _ret = _objc_msgSend_30(this.pointer, - _sel_initFileURLWithPath_isDirectory_, path.pointer, isDir); - return NSURL._(_ret, retain: true, release: true); - } +late final _sel_localizedStringFromDate_dateStyle_timeStyle_ = + objc.registerName("localizedStringFromDate:dateStyle:timeStyle:"); +final _objc_msgSend_94 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32)>>() + .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_95 = 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)>(); - NSURL initFileURLWithPath_(NSString path) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initFileURLWithPath_, path.pointer); - return NSURL._(_ret, retain: true, release: true); - } +abstract class NSDateFormatterBehavior { + static const int NSDateFormatterBehaviorDefault = 0; + static const int NSDateFormatterBehavior10_0 = 1000; + static const int NSDateFormatterBehavior10_4 = 1040; +} - static NSURL fileURLWithPath_isDirectory_relativeToURL_( - NSString path, bool isDir, NSURL? baseURL) { - final _ret = _objc_msgSend_32( - _class_NSURL, - _sel_fileURLWithPath_isDirectory_relativeToURL_, - path.pointer, - isDir, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); - } +late final _sel_defaultFormatterBehavior = + objc.registerName("defaultFormatterBehavior"); +final _objc_msgSend_96 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDefaultFormatterBehavior_ = + objc.registerName("setDefaultFormatterBehavior:"); +final _objc_msgSend_97 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setLocalizedDateFormatFromTemplate_ = + objc.registerName("setLocalizedDateFormatFromTemplate:"); +final _objc_msgSend_98 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dateFormat = objc.registerName("dateFormat"); +late final _sel_setDateFormat_ = objc.registerName("setDateFormat:"); +final _objc_msgSend_99 = 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_dateStyle = objc.registerName("dateStyle"); +final _objc_msgSend_100 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDateStyle_ = objc.registerName("setDateStyle:"); +final _objc_msgSend_101 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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"); +final _objc_msgSend_102 = 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_103 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_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:"); - static NSURL fileURLWithPath_relativeToURL_(NSString path, NSURL? baseURL) { - final _ret = _objc_msgSend_33( - _class_NSURL, - _sel_fileURLWithPath_relativeToURL_, - path.pointer, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); - } +class NSTimeZone extends objc.NSObject { + NSTimeZone._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - static NSURL fileURLWithPath_isDirectory_(NSString path, bool isDir) { - final _ret = _objc_msgSend_34( - _class_NSURL, _sel_fileURLWithPath_isDirectory_, path.pointer, isDir); - return NSURL._(_ret, retain: true, release: true); - } + /// Constructs a [NSTimeZone] that points to the same underlying object as [other]. + NSTimeZone.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static NSURL fileURLWithPath_(NSString path) { - final _ret = - _objc_msgSend_35(_class_NSURL, _sel_fileURLWithPath_, path.pointer); - return NSURL._(_ret, 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); - NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - ffi.Pointer path, bool isDir, NSURL? baseURL) { - final _ret = _objc_msgSend_36( - this.pointer, - _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_, - path, - isDir, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSTimeZone]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTimeZone); } - static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( - ffi.Pointer path, bool isDir, NSURL? baseURL) { - final _ret = _objc_msgSend_37( - _class_NSURL, - _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_, - path, - isDir, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSURL? initWithString_(NSString URLString) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_initWithString_, URLString.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + objc.NSData get data { + final _ret = _objc_msgSend_104(this.pointer, _sel_data); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSURL? initWithString_relativeToURL_(NSString URLString, NSURL? baseURL) { - final _ret = _objc_msgSend_39( - this.pointer, - _sel_initWithString_relativeToURL_, - URLString.pointer, - baseURL?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + int secondsFromGMTForDate_(objc.NSDate aDate) { + return _objc_msgSend_105( + this.pointer, _sel_secondsFromGMTForDate_, aDate.pointer); } - static NSURL? URLWithString_(NSString URLString) { - final _ret = - _objc_msgSend_38(_class_NSURL, _sel_URLWithString_, URLString.pointer); + objc.NSString? abbreviationForDate_(objc.NSDate aDate) { + final _ret = _objc_msgSend_106( + this.pointer, _sel_abbreviationForDate_, aDate.pointer); return _ret.address == 0 ? null - : NSURL._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSURL? URLWithString_relativeToURL_( - NSString URLString, NSURL? baseURL) { - final _ret = _objc_msgSend_39( - _class_NSURL, - _sel_URLWithString_relativeToURL_, - URLString.pointer, - baseURL?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + bool isDaylightSavingTimeForDate_(objc.NSDate aDate) { + return _objc_msgSend_107( + this.pointer, _sel_isDaylightSavingTimeForDate_, aDate.pointer); } - NSURL? initWithString_encodingInvalidCharacters_( - NSString URLString, bool encodingInvalidCharacters) { - final _ret = _objc_msgSend_40( - this.pointer, - _sel_initWithString_encodingInvalidCharacters_, - URLString.pointer, - encodingInvalidCharacters); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + double daylightSavingTimeOffsetForDate_(objc.NSDate aDate) { + return objc.useMsgSendVariants + ? _objc_msgSend_108Fpret( + this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer) + : _objc_msgSend_108( + this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer); } - static NSURL? URLWithString_encodingInvalidCharacters_( - NSString URLString, bool encodingInvalidCharacters) { - final _ret = _objc_msgSend_40( - _class_NSURL, - _sel_URLWithString_encodingInvalidCharacters_, - URLString.pointer, - encodingInvalidCharacters); + objc.NSDate? nextDaylightSavingTimeTransitionAfterDate_(objc.NSDate aDate) { + final _ret = _objc_msgSend_109(this.pointer, + _sel_nextDaylightSavingTimeTransitionAfterDate_, aDate.pointer); return _ret.address == 0 ? null - : NSURL._(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSURL initWithDataRepresentation_relativeToURL_(NSData data, NSURL? baseURL) { - final _ret = _objc_msgSend_41( - this.pointer, - _sel_initWithDataRepresentation_relativeToURL_, - data.pointer, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); + static NSTimeZone getSystemTimeZone() { + final _ret = _objc_msgSend_110(_class_NSTimeZone, _sel_systemTimeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static NSURL URLWithDataRepresentation_relativeToURL_( - NSData data, NSURL? baseURL) { - final _ret = _objc_msgSend_42( - _class_NSURL, - _sel_URLWithDataRepresentation_relativeToURL_, - data.pointer, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); + static void resetSystemTimeZone() { + _objc_msgSend_82(_class_NSTimeZone, _sel_resetSystemTimeZone); } - NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( - NSData data, NSURL? baseURL) { - final _ret = _objc_msgSend_41( - this.pointer, - _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_, - data.pointer, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); + static NSTimeZone getDefaultTimeZone() { + final _ret = _objc_msgSend_110(_class_NSTimeZone, _sel_defaultTimeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - static NSURL absoluteURLWithDataRepresentation_relativeToURL_( - NSData data, NSURL? baseURL) { - final _ret = _objc_msgSend_42( - _class_NSURL, - _sel_absoluteURLWithDataRepresentation_relativeToURL_, - data.pointer, - baseURL?.pointer ?? ffi.nullptr); - return NSURL._(_ret, retain: true, release: true); + static void setDefaultTimeZone(NSTimeZone value) { + return _objc_msgSend_111( + _class_NSTimeZone, _sel_setDefaultTimeZone_, value.pointer); } - NSData get dataRepresentation { - final _ret = _objc_msgSend_43(this.pointer, _sel_dataRepresentation); - return NSData._(_ret, retain: true, release: true); + static NSTimeZone getLocalTimeZone() { + final _ret = _objc_msgSend_110(_class_NSTimeZone, _sel_localTimeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSString? get absoluteString { - final _ret = _objc_msgSend_44(this.pointer, _sel_absoluteString); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static objc.NSArray getKnownTimeZoneNames() { + final _ret = _objc_msgSend_6(_class_NSTimeZone, _sel_knownTimeZoneNames); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get relativeString { - final _ret = _objc_msgSend_21(this.pointer, _sel_relativeString); - return NSString._(_ret, retain: true, release: true); + static objc.NSDictionary getAbbreviationDictionary() { + final _ret = + _objc_msgSend_112(_class_NSTimeZone, _sel_abbreviationDictionary); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSURL? get baseURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_baseURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + static void setAbbreviationDictionary(objc.NSDictionary value) { + return _objc_msgSend_113( + _class_NSTimeZone, _sel_setAbbreviationDictionary_, value.pointer); } - NSURL? get absoluteURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_absoluteURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + static objc.NSString getTimeZoneDataVersion() { + final _ret = _objc_msgSend_12(_class_NSTimeZone, _sel_timeZoneDataVersion); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get scheme { - final _ret = _objc_msgSend_44(this.pointer, _sel_scheme); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + int get secondsFromGMT { + return _objc_msgSend_114(this.pointer, _sel_secondsFromGMT); } - NSString? get resourceSpecifier { - final _ret = _objc_msgSend_44(this.pointer, _sel_resourceSpecifier); + objc.NSString? get abbreviation { + final _ret = _objc_msgSend_13(this.pointer, _sel_abbreviation); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get host { - final _ret = _objc_msgSend_44(this.pointer, _sel_host); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + bool get daylightSavingTime { + return _objc_msgSend_7(this.pointer, _sel_isDaylightSavingTime); } - NSNumber? get port { - final _ret = _objc_msgSend_215(this.pointer, _sel_port); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); + double get daylightSavingTimeOffset { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_daylightSavingTimeOffset) + : _objc_msgSend_115(this.pointer, _sel_daylightSavingTimeOffset); } - NSString? get user { - final _ret = _objc_msgSend_44(this.pointer, _sel_user); + objc.NSDate? get nextDaylightSavingTimeTransition { + final _ret = + _objc_msgSend_116(this.pointer, _sel_nextDaylightSavingTimeTransition); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSString? get password { - final _ret = _objc_msgSend_44(this.pointer, _sel_password); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get path { - final _ret = _objc_msgSend_44(this.pointer, _sel_path); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + bool isEqualToTimeZone_(NSTimeZone aTimeZone) { + return _objc_msgSend_117( + this.pointer, _sel_isEqualToTimeZone_, aTimeZone.pointer); } - NSString? get fragment { - final _ret = _objc_msgSend_44(this.pointer, _sel_fragment); + objc.NSString? localizedName_locale_(int style, objc.NSLocale? locale) { + final _ret = _objc_msgSend_118(this.pointer, _sel_localizedName_locale_, + style, locale?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get parameterString { - final _ret = _objc_msgSend_44(this.pointer, _sel_parameterString); + static NSTimeZone? timeZoneWithName_(objc.NSString tzName) { + final _ret = _objc_msgSend_2( + _class_NSTimeZone, _sel_timeZoneWithName_, tzName.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSString? get query { - final _ret = _objc_msgSend_44(this.pointer, _sel_query); + static NSTimeZone? timeZoneWithName_data_( + objc.NSString tzName, objc.NSData? aData) { + final _ret = _objc_msgSend_119( + _class_NSTimeZone, + _sel_timeZoneWithName_data_, + tzName.pointer, + aData?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSString? get relativePath { - final _ret = _objc_msgSend_44(this.pointer, _sel_relativePath); + NSTimeZone? initWithName_(objc.NSString tzName) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithName_, tzName.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); - } - - bool get hasDirectoryPath { - return _objc_msgSend_12(this.pointer, _sel_hasDirectoryPath); - } - - bool getFileSystemRepresentation_maxLength_( - ffi.Pointer buffer, int maxBufferLength) { - return _objc_msgSend_242(this.pointer, - _sel_getFileSystemRepresentation_maxLength_, buffer, maxBufferLength); - } - - ffi.Pointer get fileSystemRepresentation { - return _objc_msgSend_13(this.pointer, _sel_fileSystemRepresentation); - } - - bool get fileURL { - return _objc_msgSend_12(this.pointer, _sel_isFileURL); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSURL? get standardizedURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_standardizedURL); + NSTimeZone? initWithName_data_(objc.NSString tzName, objc.NSData? aData) { + final _ret = _objc_msgSend_119(this.pointer, _sel_initWithName_data_, + tzName.pointer, aData?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSURL._(_ret, retain: true, release: true); - } - - bool isFileReferenceURL() { - return _objc_msgSend_12(this.pointer, _sel_isFileReferenceURL); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSURL? fileReferenceURL() { - final _ret = _objc_msgSend_45(this.pointer, _sel_fileReferenceURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + static NSTimeZone timeZoneForSecondsFromGMT_(int seconds) { + final _ret = _objc_msgSend_120( + _class_NSTimeZone, _sel_timeZoneForSecondsFromGMT_, seconds); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSURL? get filePathURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_filePathURL); + static NSTimeZone? timeZoneWithAbbreviation_(objc.NSString abbreviation) { + final _ret = _objc_msgSend_2(_class_NSTimeZone, + _sel_timeZoneWithAbbreviation_, abbreviation.pointer); return _ret.address == 0 ? null - : NSURL._(_ret, retain: true, release: true); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - bool getResourceValue_forKey_error_( - ffi.Pointer> value, - NSString key, - ffi.Pointer> error) { - return _objc_msgSend_243(this.pointer, _sel_getResourceValue_forKey_error_, - value, key.pointer, error); + @override + NSTimeZone init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSObject? resourceValuesForKeys_error_( - NSArray keys, ffi.Pointer> error) { - final _ret = _objc_msgSend_244( - this.pointer, _sel_resourceValuesForKeys_error_, keys.pointer, error); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + static NSTimeZone new1() { + final _ret = _objc_msgSend_40(_class_NSTimeZone, _sel_new); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - bool setResourceValue_forKey_error_(NSObject? value, NSString key, - ffi.Pointer> error) { - return _objc_msgSend_245(this.pointer, _sel_setResourceValue_forKey_error_, - value?.pointer ?? ffi.nullptr, key.pointer, error); + static NSTimeZone allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSTimeZone, _sel_allocWithZone_, zone); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - bool setResourceValues_error_( - NSObject keyedValues, ffi.Pointer> error) { - return _objc_msgSend_246(this.pointer, _sel_setResourceValues_error_, - keyedValues.pointer, error); + static NSTimeZone alloc() { + final _ret = _objc_msgSend_40(_class_NSTimeZone, _sel_alloc); + return NSTimeZone.castFromPointer(_ret, retain: false, release: true); } - void removeCachedResourceValueForKey_(NSString key) { - _objc_msgSend_247( - this.pointer, _sel_removeCachedResourceValueForKey_, key.pointer); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTimeZone, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - void removeAllCachedResourceValues() { - _objc_msgSend_1(this.pointer, _sel_removeAllCachedResourceValues); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTimeZone, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - void setTemporaryResourceValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setTemporaryResourceValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSTimeZone, _sel_accessInstanceVariablesDirectly); } - NSData? - bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( - int options, - NSArray? keys, - NSURL? relativeURL, - ffi.Pointer> error) { - final _ret = _objc_msgSend_248( - this.pointer, - _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_, - options, - keys?.pointer ?? ffi.nullptr, - relativeURL?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSTimeZone, _sel_useStoredAccessor); } - NSURL? - initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NSData bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _objc_msgSend_249( - this.pointer, - _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_, - bookmarkData.pointer, - options, - relativeURL?.pointer ?? ffi.nullptr, - isStale, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTimeZone, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSURL? - URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( - NSData bookmarkData, - int options, - NSURL? relativeURL, - ffi.Pointer isStale, - ffi.Pointer> error) { - final _ret = _objc_msgSend_249( - _class_NSURL, - _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_, - bookmarkData.pointer, - options, - relativeURL?.pointer ?? ffi.nullptr, - isStale, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSTimeZone, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSObject? resourceValuesForKeys_fromBookmarkData_( - NSArray keys, NSData bookmarkData) { - final _ret = _objc_msgSend_250( - _class_NSURL, - _sel_resourceValuesForKeys_fromBookmarkData_, + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTimeZone, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, - bookmarkData.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static bool writeBookmarkData_toURL_options_error_( - NSData bookmarkData, - NSURL bookmarkFileURL, - int options, - ffi.Pointer> error) { - return _objc_msgSend_251( - _class_NSURL, - _sel_writeBookmarkData_toURL_options_error_, - bookmarkData.pointer, - bookmarkFileURL.pointer, - options, - error); - } - - static NSData? bookmarkDataWithContentsOfURL_error_( - NSURL bookmarkFileURL, ffi.Pointer> error) { - final _ret = _objc_msgSend_252( - _class_NSURL, - _sel_bookmarkDataWithContentsOfURL_error_, - bookmarkFileURL.pointer, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - static NSURL? URLByResolvingAliasFileAtURL_options_error_( - NSURL url, int options, ffi.Pointer> error) { - final _ret = _objc_msgSend_253( - _class_NSURL, - _sel_URLByResolvingAliasFileAtURL_options_error_, - url.pointer, - options, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - bool startAccessingSecurityScopedResource() { - return _objc_msgSend_12( - this.pointer, _sel_startAccessingSecurityScopedResource); - } - - void stopAccessingSecurityScopedResource() { - _objc_msgSend_1(this.pointer, _sel_stopAccessingSecurityScopedResource); - } - - bool getPromisedItemResourceValue_forKey_error_( - ffi.Pointer> value, - NSString key, - ffi.Pointer> error) { - return _objc_msgSend_243( - this.pointer, - _sel_getPromisedItemResourceValue_forKey_error_, - value, - key.pointer, - error); - } - - NSDictionary? promisedItemResourceValuesForKeys_error_( - NSArray keys, ffi.Pointer> error) { - final _ret = _objc_msgSend_254(this.pointer, - _sel_promisedItemResourceValuesForKeys_error_, keys.pointer, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - bool checkPromisedItemIsReachableAndReturnError_( - ffi.Pointer> error) { - return _objc_msgSend_255( - this.pointer, _sel_checkPromisedItemIsReachableAndReturnError_, error); - } - - static NSURL? fileURLWithPathComponents_(NSArray components) { - final _ret = _objc_msgSend_256( - _class_NSURL, _sel_fileURLWithPathComponents_, components.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSArray? get pathComponents { - final _ret = _objc_msgSend_84(this.pointer, _sel_pathComponents); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSString? get lastPathComponent { - final _ret = _objc_msgSend_44(this.pointer, _sel_lastPathComponent); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get pathExtension { - final _ret = _objc_msgSend_44(this.pointer, _sel_pathExtension); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSURL? URLByAppendingPathComponent_(NSString pathComponent) { - final _ret = _objc_msgSend_257( - this.pointer, _sel_URLByAppendingPathComponent_, pathComponent.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? URLByAppendingPathComponent_isDirectory_( - NSString pathComponent, bool isDirectory) { - final _ret = _objc_msgSend_258( - this.pointer, - _sel_URLByAppendingPathComponent_isDirectory_, - pathComponent.pointer, - isDirectory); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? get URLByDeletingLastPathComponent { - final _ret = - _objc_msgSend_45(this.pointer, _sel_URLByDeletingLastPathComponent); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? URLByAppendingPathExtension_(NSString pathExtension) { - final _ret = _objc_msgSend_257( - this.pointer, _sel_URLByAppendingPathExtension_, pathExtension.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + dependentKey.pointer); } - NSURL? get URLByDeletingPathExtension { + static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = - _objc_msgSend_45(this.pointer, _sel_URLByDeletingPathExtension); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - bool checkResourceIsReachableAndReturnError_( - ffi.Pointer> error) { - return _objc_msgSend_255( - this.pointer, _sel_checkResourceIsReachableAndReturnError_, error); - } - - NSURL? get URLByStandardizingPath { - final _ret = _objc_msgSend_45(this.pointer, _sel_URLByStandardizingPath); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + _objc_msgSend_6(_class_NSTimeZone, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSURL? get URLByResolvingSymlinksInPath { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_45(this.pointer, _sel_URLByResolvingSymlinksInPath); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSData? resourceDataUsingCache_(bool shouldUseCache) { - final _ret = _objc_msgSend_259( - this.pointer, _sel_resourceDataUsingCache_, shouldUseCache); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - void loadResourceDataNotifyingClient_usingCache_( - NSObject client, bool shouldUseCache) { - _objc_msgSend_260( - this.pointer, - _sel_loadResourceDataNotifyingClient_usingCache_, - client.pointer, - shouldUseCache); + _objc_msgSend_40(_class_NSTimeZone, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSObject? propertyForKey_(NSString propertyKey) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_propertyForKey_, propertyKey.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - bool setResourceData_(NSData data) { - return _objc_msgSend_24(this.pointer, _sel_setResourceData_, data.pointer); - } - - bool setProperty_forKey_(NSObject property, NSString propertyKey) { - return _objc_msgSend_261(this.pointer, _sel_setProperty_forKey_, - property.pointer, propertyKey.pointer); - } - - NSURLHandle? URLHandleUsingCache_(bool shouldUseCache) { - final _ret = _objc_msgSend_268( - this.pointer, _sel_URLHandleUsingCache_, shouldUseCache); - return _ret.address == 0 - ? null - : NSURLHandle._(_ret, retain: true, release: true); - } - - @override - NSURL init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURL._(_ret, retain: true, release: true); - } - - static NSURL new1() { - final _ret = _objc_msgSend_2(_class_NSURL, _sel_new); - return NSURL._(_ret, retain: false, release: true); - } - - static NSURL allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSURL, _sel_allocWithZone_, zone); - return NSURL._(_ret, retain: false, release: true); - } - - static NSURL alloc() { - final _ret = _objc_msgSend_2(_class_NSURL, _sel_alloc); - return NSURL._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURL, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURL, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12(_class_NSURL, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURL, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63( - _class_NSURL, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64( - _class_NSURL, _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURL, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSURL, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSURL, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSURL = objc.getClass("NSURL"); -late final _sel_initWithScheme_host_path_ = - objc.registerName("initWithScheme:host:path:"); -final _objc_msgSend_27 = objc.msgSendPointer +late final _class_NSTimeZone = objc.getClass("NSTimeZone"); +late final _sel_name = objc.registerName("name"); +late final _sel_data = objc.registerName("data"); +final _objc_msgSend_104 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + 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_105 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long 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_initFileURLWithPath_isDirectory_relativeToURL_ = - objc.registerName("initFileURLWithPath:isDirectory:relativeToURL:"); -final _objc_msgSend_28 = objc.msgSendPointer + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_abbreviationForDate_ = + objc.registerName("abbreviationForDate:"); +final _objc_msgSend_106 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Bool, ffi.Pointer)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); -late final _sel_initFileURLWithPath_relativeToURL_ = - objc.registerName("initFileURLWithPath:relativeToURL:"); -final _objc_msgSend_29 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isDaylightSavingTimeForDate_ = + objc.registerName("isDaylightSavingTimeForDate:"); +final _objc_msgSend_107 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_initFileURLWithPath_isDirectory_ = - objc.registerName("initFileURLWithPath:isDirectory:"); -final _objc_msgSend_30 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_daylightSavingTimeOffsetForDate_ = + objc.registerName("daylightSavingTimeOffsetForDate:"); +final _objc_msgSend_108 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Double Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() + ffi.Pointer)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_initFileURLWithPath_ = - objc.registerName("initFileURLWithPath:"); -final _objc_msgSend_31 = objc.msgSendPointer + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_108Fpret = objc.msgSendFpretPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Double Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, + double Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_fileURLWithPath_isDirectory_relativeToURL_ = - objc.registerName("fileURLWithPath:isDirectory:relativeToURL:"); -final _objc_msgSend_32 = objc.msgSendPointer +late final _sel_nextDaylightSavingTimeTransitionAfterDate_ = + objc.registerName("nextDaylightSavingTimeTransitionAfterDate:"); +final _objc_msgSend_109 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Bool, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_systemTimeZone = objc.registerName("systemTimeZone"); +final _objc_msgSend_110 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); -late final _sel_fileURLWithPath_relativeToURL_ = - objc.registerName("fileURLWithPath:relativeToURL:"); -final _objc_msgSend_33 = objc.msgSendPointer + 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_111 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_fileURLWithPath_isDirectory_ = - objc.registerName("fileURLWithPath:isDirectory:"); -final _objc_msgSend_34 = objc.msgSendPointer + 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_112 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_fileURLWithPath_ = objc.registerName("fileURLWithPath:"); -final _objc_msgSend_35 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setAbbreviationDictionary_ = + objc.registerName("setAbbreviationDictionary:"); +final _objc_msgSend_113 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_ = - objc.registerName( - "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); -final _objc_msgSend_36 = objc.msgSendPointer +late final _sel_timeZoneDataVersion = objc.registerName("timeZoneDataVersion"); +late final _sel_secondsFromGMT = objc.registerName("secondsFromGMT"); +final _objc_msgSend_114 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>() + ffi.Long Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); -late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_ = - objc.registerName( - "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); -final _objc_msgSend_37 = 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"); +final _objc_msgSend_115 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>() + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); -late final _sel_initWithString_ = objc.registerName("initWithString:"); -final _objc_msgSend_38 = objc.msgSendPointer + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_115Fpret = objc.msgSendFpretPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithString_relativeToURL_ = - objc.registerName("initWithString:relativeToURL:"); -final _objc_msgSend_39 = objc.msgSendPointer + double Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_nextDaylightSavingTimeTransition = + objc.registerName("nextDaylightSavingTimeTransition"); +final _objc_msgSend_116 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_URLWithString_ = objc.registerName("URLWithString:"); -late final _sel_URLWithString_relativeToURL_ = - objc.registerName("URLWithString:relativeToURL:"); -late final _sel_initWithString_encodingInvalidCharacters_ = - objc.registerName("initWithString:encodingInvalidCharacters:"); -final _objc_msgSend_40 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_description = objc.registerName("description"); +late final _sel_isEqualToTimeZone_ = objc.registerName("isEqualToTimeZone:"); +final _objc_msgSend_117 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() + ffi.Pointer)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_URLWithString_encodingInvalidCharacters_ = - objc.registerName("URLWithString:encodingInvalidCharacters:"); -late final _sel_initWithDataRepresentation_relativeToURL_ = - objc.registerName("initWithDataRepresentation:relativeToURL:"); -final _objc_msgSend_41 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSTimeZoneNameStyle { + static const int NSTimeZoneNameStyleStandard = 0; + static const int NSTimeZoneNameStyleShortStandard = 1; + static const int NSTimeZoneNameStyleDaylightSaving = 2; + static const int NSTimeZoneNameStyleShortDaylightSaving = 3; + static const int NSTimeZoneNameStyleGeneric = 4; + static const int NSTimeZoneNameStyleShortGeneric = 5; +} + +late final _sel_localizedName_locale_ = + objc.registerName("localizedName:locale:"); +final _objc_msgSend_118 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Int32, ffi.Pointer)>>() .asFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + int, ffi.Pointer)>(); -late final _sel_URLWithDataRepresentation_relativeToURL_ = - objc.registerName("URLWithDataRepresentation:relativeToURL:"); -final _objc_msgSend_42 = objc.msgSendPointer +late final _sel_timeZoneWithName_ = objc.registerName("timeZoneWithName:"); +late final _sel_timeZoneWithName_data_ = + objc.registerName("timeZoneWithName:data:"); +final _objc_msgSend_119 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_ = - objc.registerName("initAbsoluteURLWithDataRepresentation:relativeToURL:"); -late final _sel_absoluteURLWithDataRepresentation_relativeToURL_ = - objc.registerName("absoluteURLWithDataRepresentation:relativeToURL:"); -late final _sel_dataRepresentation = objc.registerName("dataRepresentation"); -final _objc_msgSend_43 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_absoluteString = objc.registerName("absoluteString"); -final _objc_msgSend_44 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_relativeString = objc.registerName("relativeString"); -late final _sel_baseURL = objc.registerName("baseURL"); -final _objc_msgSend_45 = objc.msgSendPointer +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_120 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_absoluteURL = objc.registerName("absoluteURL"); -late final _sel_scheme = objc.registerName("scheme"); -late final _sel_resourceSpecifier = objc.registerName("resourceSpecifier"); -late final _sel_host = objc.registerName("host"); + 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:"); -class NSNumber extends NSValue { - NSNumber._(ffi.Pointer pointer, +class NSCalendar extends objc.NSObject { + NSCalendar._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSNumber] that points to the same underlying object as [other]. - static NSNumber castFrom(T other) { - return NSNumber._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSCalendar] that points to the same underlying object as [other]. + NSCalendar.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSNumber] that wraps the given raw object pointer. - static NSNumber castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNumber._(other, 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); - /// Returns whether [obj] is an instance of [NSNumber]. + /// Returns whether [obj] is an instance of [NSCalendar]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSNumber); - } - - @override - NSNumber? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithChar_(int value) { - final _ret = _objc_msgSend_220(this.pointer, _sel_initWithChar_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithUnsignedChar_(int value) { - final _ret = - _objc_msgSend_221(this.pointer, _sel_initWithUnsignedChar_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithShort_(int value) { - final _ret = _objc_msgSend_222(this.pointer, _sel_initWithShort_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithUnsignedShort_(int value) { - final _ret = - _objc_msgSend_223(this.pointer, _sel_initWithUnsignedShort_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithInt_(int value) { - final _ret = _objc_msgSend_224(this.pointer, _sel_initWithInt_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithUnsignedInt_(int value) { - final _ret = - _objc_msgSend_225(this.pointer, _sel_initWithUnsignedInt_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithLong_(int value) { - final _ret = _objc_msgSend_226(this.pointer, _sel_initWithLong_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithUnsignedLong_(int value) { - final _ret = - _objc_msgSend_227(this.pointer, _sel_initWithUnsignedLong_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithLongLong_(int value) { - final _ret = _objc_msgSend_228(this.pointer, _sel_initWithLongLong_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithUnsignedLongLong_(int value) { - final _ret = - _objc_msgSend_229(this.pointer, _sel_initWithUnsignedLongLong_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithFloat_(double value) { - final _ret = _objc_msgSend_230(this.pointer, _sel_initWithFloat_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithDouble_(double value) { - final _ret = _objc_msgSend_231(this.pointer, _sel_initWithDouble_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - NSNumber initWithBool_(bool value) { - final _ret = _objc_msgSend_232(this.pointer, _sel_initWithBool_, value); - return NSNumber._(_ret, retain: true, release: true); + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSCalendar); } - NSNumber initWithInteger_(int value) { - final _ret = _objc_msgSend_226(this.pointer, _sel_initWithInteger_, value); - return NSNumber._(_ret, retain: true, release: true); + static NSCalendar getCurrentCalendar() { + final _ret = _objc_msgSend_121(_class_NSCalendar, _sel_currentCalendar); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); } - NSNumber initWithUnsignedInteger_(int value) { + static NSCalendar getAutoupdatingCurrentCalendar() { final _ret = - _objc_msgSend_227(this.pointer, _sel_initWithUnsignedInteger_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - int get charValue { - return _objc_msgSend_233(this.pointer, _sel_charValue); - } - - int get unsignedCharValue { - return _objc_msgSend_234(this.pointer, _sel_unsignedCharValue); + _objc_msgSend_121(_class_NSCalendar, _sel_autoupdatingCurrentCalendar); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); } - int get shortValue { - return _objc_msgSend_235(this.pointer, _sel_shortValue); + static NSCalendar? calendarWithIdentifier_( + objc.NSString calendarIdentifierConstant) { + final _ret = _objc_msgSend_122(_class_NSCalendar, + _sel_calendarWithIdentifier_, calendarIdentifierConstant.pointer); + return _ret.address == 0 + ? null + : NSCalendar.castFromPointer(_ret, retain: true, release: true); } - int get unsignedShortValue { - return _objc_msgSend_236(this.pointer, _sel_unsignedShortValue); + @override + NSCalendar init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSCalendar.castFromPointer(_ret, retain: true, release: true); } - int get intValue { - return _objc_msgSend_237(this.pointer, _sel_intValue); + objc.NSObject? initWithCalendarIdentifier_(objc.NSString ident) { + final _ret = _objc_msgSend_2( + this.pointer, _sel_initWithCalendarIdentifier_, ident.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get unsignedIntValue { - return _objc_msgSend_214(this.pointer, _sel_unsignedIntValue); + objc.NSString get calendarIdentifier { + final _ret = _objc_msgSend_12(this.pointer, _sel_calendarIdentifier); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get longValue { - return _objc_msgSend_83(this.pointer, _sel_longValue); + objc.NSLocale? get locale { + final _ret = _objc_msgSend_123(this.pointer, _sel_locale); + return _ret.address == 0 + ? null + : objc.NSLocale.castFromPointer(_ret, retain: true, release: true); } - int get unsignedLongValue { - return _objc_msgSend_10(this.pointer, _sel_unsignedLongValue); + set locale(objc.NSLocale? value) { + return _objc_msgSend_124( + this.pointer, _sel_setLocale_, value?.pointer ?? ffi.nullptr); } - int get longLongValue { - return _objc_msgSend_238(this.pointer, _sel_longLongValue); + NSTimeZone get timeZone { + final _ret = _objc_msgSend_110(this.pointer, _sel_timeZone); + return NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - int get unsignedLongLongValue { - return _objc_msgSend_164(this.pointer, _sel_unsignedLongLongValue); + set timeZone(NSTimeZone value) { + return _objc_msgSend_111(this.pointer, _sel_setTimeZone_, value.pointer); } - double get floatValue { - return objc.useMsgSendVariants - ? _objc_msgSend_239Fpret(this.pointer, _sel_floatValue) - : _objc_msgSend_239(this.pointer, _sel_floatValue); + int get firstWeekday { + return _objc_msgSend_29(this.pointer, _sel_firstWeekday); } - double get doubleValue { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_doubleValue) - : _objc_msgSend_165(this.pointer, _sel_doubleValue); + set firstWeekday(int value) { + return _objc_msgSend_125(this.pointer, _sel_setFirstWeekday_, value); } - bool get boolValue { - return _objc_msgSend_12(this.pointer, _sel_boolValue); + int get minimumDaysInFirstWeek { + return _objc_msgSend_29(this.pointer, _sel_minimumDaysInFirstWeek); } - int get integerValue { - return _objc_msgSend_83(this.pointer, _sel_integerValue); + set minimumDaysInFirstWeek(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumDaysInFirstWeek_, value); } - int get unsignedIntegerValue { - return _objc_msgSend_10(this.pointer, _sel_unsignedIntegerValue); + objc.NSArray get eraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_eraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get stringValue { - final _ret = _objc_msgSend_21(this.pointer, _sel_stringValue); - return NSString._(_ret, retain: true, release: true); + objc.NSArray get longEraSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_longEraSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int compare_(NSNumber otherNumber) { - return _objc_msgSend_240(this.pointer, _sel_compare_, otherNumber.pointer); + objc.NSArray get monthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_monthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool isEqualToNumber_(NSNumber number) { - return _objc_msgSend_241( - this.pointer, _sel_isEqualToNumber_, number.pointer); + objc.NSArray get shortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _objc_msgSend_70(this.pointer, _sel_descriptionWithLocale_, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); + objc.NSArray get veryShortMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSNumber numberWithChar_(int value) { - final _ret = - _objc_msgSend_220(_class_NSNumber, _sel_numberWithChar_, value); - return NSNumber._(_ret, retain: true, release: true); + objc.NSArray get standaloneMonthSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSNumber numberWithUnsignedChar_(int value) { + objc.NSArray get shortStandaloneMonthSymbols { final _ret = - _objc_msgSend_221(_class_NSNumber, _sel_numberWithUnsignedChar_, value); - return NSNumber._(_ret, retain: true, release: true); + _objc_msgSend_6(this.pointer, _sel_shortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSNumber numberWithShort_(int value) { + objc.NSArray get veryShortStandaloneMonthSymbols { final _ret = - _objc_msgSend_222(_class_NSNumber, _sel_numberWithShort_, value); - return NSNumber._(_ret, retain: true, release: true); + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneMonthSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSNumber numberWithUnsignedShort_(int value) { - final _ret = _objc_msgSend_223( - _class_NSNumber, _sel_numberWithUnsignedShort_, value); - return NSNumber._(_ret, retain: true, release: true); + objc.NSArray get weekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_weekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSNumber numberWithInt_(int value) { - final _ret = _objc_msgSend_224(_class_NSNumber, _sel_numberWithInt_, value); - return NSNumber._(_ret, retain: true, release: true); + objc.NSArray get shortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSNumber numberWithUnsignedInt_(int value) { - final _ret = - _objc_msgSend_225(_class_NSNumber, _sel_numberWithUnsignedInt_, value); - return NSNumber._(_ret, retain: true, release: true); + objc.NSArray get veryShortWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_veryShortWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSNumber numberWithLong_(int value) { - final _ret = - _objc_msgSend_226(_class_NSNumber, _sel_numberWithLong_, value); - return NSNumber._(_ret, retain: true, release: true); + objc.NSArray get standaloneWeekdaySymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSNumber numberWithUnsignedLong_(int value) { + objc.NSArray get shortStandaloneWeekdaySymbols { final _ret = - _objc_msgSend_227(_class_NSNumber, _sel_numberWithUnsignedLong_, value); - return NSNumber._(_ret, retain: true, release: true); + _objc_msgSend_6(this.pointer, _sel_shortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSNumber numberWithLongLong_(int value) { + objc.NSArray get veryShortStandaloneWeekdaySymbols { final _ret = - _objc_msgSend_228(_class_NSNumber, _sel_numberWithLongLong_, value); - return NSNumber._(_ret, retain: true, release: true); + _objc_msgSend_6(this.pointer, _sel_veryShortStandaloneWeekdaySymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSNumber numberWithUnsignedLongLong_(int value) { - final _ret = _objc_msgSend_229( - _class_NSNumber, _sel_numberWithUnsignedLongLong_, value); - return NSNumber._(_ret, retain: true, release: true); + objc.NSArray get quarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_quarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSNumber numberWithFloat_(double value) { - final _ret = - _objc_msgSend_230(_class_NSNumber, _sel_numberWithFloat_, value); - return NSNumber._(_ret, retain: true, release: true); - } - - static NSNumber numberWithDouble_(double value) { - final _ret = - _objc_msgSend_231(_class_NSNumber, _sel_numberWithDouble_, value); - return NSNumber._(_ret, retain: true, release: true); + objc.NSArray get shortQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_shortQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSNumber numberWithBool_(bool value) { - final _ret = - _objc_msgSend_232(_class_NSNumber, _sel_numberWithBool_, value); - return NSNumber._(_ret, retain: true, release: true); + objc.NSArray get standaloneQuarterSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_standaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSNumber numberWithInteger_(int value) { + objc.NSArray get shortStandaloneQuarterSymbols { final _ret = - _objc_msgSend_226(_class_NSNumber, _sel_numberWithInteger_, value); - return NSNumber._(_ret, retain: true, release: true); + _objc_msgSend_6(this.pointer, _sel_shortStandaloneQuarterSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSNumber numberWithUnsignedInteger_(int value) { - final _ret = _objc_msgSend_227( - _class_NSNumber, _sel_numberWithUnsignedInteger_, value); - return NSNumber._(_ret, retain: true, release: true); + objc.NSString get AMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_AMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSNumber initWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _objc_msgSend_46( - this.pointer, _sel_initWithBytes_objCType_, value, type); - return NSNumber._(_ret, retain: true, release: true); + objc.NSString get PMSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_PMSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSValue valueWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _objc_msgSend_48( - _class_NSNumber, _sel_valueWithBytes_objCType_, value, type); - return NSValue._(_ret, retain: true, release: true); + void minimumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { + objc.useMsgSendVariants + ? _objc_msgSend_126Stret( + stret, this.pointer, _sel_minimumRangeOfUnit_, unit) + : stret.ref = + _objc_msgSend_126(this.pointer, _sel_minimumRangeOfUnit_, unit); } - static NSValue value_withObjCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _objc_msgSend_48( - _class_NSNumber, _sel_value_withObjCType_, value, type); - return NSValue._(_ret, retain: true, release: true); + void maximumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { + objc.useMsgSendVariants + ? _objc_msgSend_126Stret( + stret, this.pointer, _sel_maximumRangeOfUnit_, unit) + : stret.ref = + _objc_msgSend_126(this.pointer, _sel_maximumRangeOfUnit_, unit); } - static NSValue valueWithNonretainedObject_(NSObject? anObject) { - final _ret = _objc_msgSend_49(_class_NSNumber, - _sel_valueWithNonretainedObject_, anObject?.pointer ?? ffi.nullptr); - return NSValue._(_ret, retain: true, release: true); + void rangeOfUnit_inUnit_forDate_( + ffi.Pointer<_NSRange> stret, int smaller, int larger, objc.NSDate date) { + objc.useMsgSendVariants + ? _objc_msgSend_127Stret(stret, this.pointer, + _sel_rangeOfUnit_inUnit_forDate_, smaller, larger, date.pointer) + : stret.ref = _objc_msgSend_127(this.pointer, + _sel_rangeOfUnit_inUnit_forDate_, smaller, larger, date.pointer); } - static NSValue valueWithPointer_(ffi.Pointer pointer) { - final _ret = - _objc_msgSend_50(_class_NSNumber, _sel_valueWithPointer_, pointer); - return NSValue._(_ret, retain: true, release: true); + int ordinalityOfUnit_inUnit_forDate_( + int smaller, int larger, objc.NSDate date) { + return _objc_msgSend_128(this.pointer, + _sel_ordinalityOfUnit_inUnit_forDate_, smaller, larger, date.pointer); } - static NSValue valueWithRange_(_NSRange range) { - final _ret = _objc_msgSend_53(_class_NSNumber, _sel_valueWithRange_, range); - return NSValue._(_ret, retain: true, release: true); + bool rangeOfUnit_startDate_interval_forDate_( + int unit, + ffi.Pointer> datep, + ffi.Pointer tip, + objc.NSDate date) { + return _objc_msgSend_129( + this.pointer, + _sel_rangeOfUnit_startDate_interval_forDate_, + unit, + datep, + tip, + date.pointer); } - static NSValue valueWithPoint_(CGPoint point) { - final _ret = _objc_msgSend_55(_class_NSNumber, _sel_valueWithPoint_, point); - return NSValue._(_ret, retain: true, release: true); + objc.NSDate? dateFromComponents_(NSDateComponents comps) { + final _ret = _objc_msgSend_139( + this.pointer, _sel_dateFromComponents_, comps.pointer); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static NSValue valueWithSize_(CGSize size) { - final _ret = _objc_msgSend_56(_class_NSNumber, _sel_valueWithSize_, size); - return NSValue._(_ret, retain: true, release: true); + NSDateComponents components_fromDate_(int unitFlags, objc.NSDate date) { + final _ret = _objc_msgSend_140( + this.pointer, _sel_components_fromDate_, unitFlags, date.pointer); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - static NSValue valueWithRect_(CGRect rect) { - final _ret = _objc_msgSend_57(_class_NSNumber, _sel_valueWithRect_, rect); - return NSValue._(_ret, retain: true, release: true); + objc.NSDate? dateByAddingComponents_toDate_options_( + NSDateComponents comps, objc.NSDate date, int opts) { + final _ret = _objc_msgSend_141( + this.pointer, + _sel_dateByAddingComponents_toDate_options_, + comps.pointer, + date.pointer, + opts); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static NSValue valueWithEdgeInsets_(NSEdgeInsets insets) { - final _ret = - _objc_msgSend_58(_class_NSNumber, _sel_valueWithEdgeInsets_, insets); - return NSValue._(_ret, retain: true, release: true); + NSDateComponents components_fromDate_toDate_options_(int unitFlags, + objc.NSDate startingDate, objc.NSDate resultDate, int opts) { + final _ret = _objc_msgSend_142( + this.pointer, + _sel_components_fromDate_toDate_options_, + unitFlags, + startingDate.pointer, + resultDate.pointer, + opts); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - @override - NSNumber init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSNumber._(_ret, retain: true, release: true); + void getEra_year_month_day_fromDate_( + ffi.Pointer eraValuePointer, + ffi.Pointer yearValuePointer, + ffi.Pointer monthValuePointer, + ffi.Pointer dayValuePointer, + objc.NSDate date) { + _objc_msgSend_143( + this.pointer, + _sel_getEra_year_month_day_fromDate_, + eraValuePointer, + yearValuePointer, + monthValuePointer, + dayValuePointer, + date.pointer); } - static NSNumber new1() { - final _ret = _objc_msgSend_2(_class_NSNumber, _sel_new); - return NSNumber._(_ret, retain: false, release: true); + void getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_( + ffi.Pointer eraValuePointer, + ffi.Pointer yearValuePointer, + ffi.Pointer weekValuePointer, + ffi.Pointer weekdayValuePointer, + objc.NSDate date) { + _objc_msgSend_143( + this.pointer, + _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_, + eraValuePointer, + yearValuePointer, + weekValuePointer, + weekdayValuePointer, + date.pointer); } - static NSNumber allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSNumber, _sel_allocWithZone_, zone); - return NSNumber._(_ret, retain: false, release: true); + void getHour_minute_second_nanosecond_fromDate_( + ffi.Pointer hourValuePointer, + ffi.Pointer minuteValuePointer, + ffi.Pointer secondValuePointer, + ffi.Pointer nanosecondValuePointer, + objc.NSDate date) { + _objc_msgSend_143( + this.pointer, + _sel_getHour_minute_second_nanosecond_fromDate_, + hourValuePointer, + minuteValuePointer, + secondValuePointer, + nanosecondValuePointer, + date.pointer); } - static NSNumber alloc() { - final _ret = _objc_msgSend_2(_class_NSNumber, _sel_alloc); - return NSNumber._(_ret, retain: false, release: true); + int component_fromDate_(int unit, objc.NSDate date) { + return _objc_msgSend_144( + this.pointer, _sel_component_fromDate_, unit, date.pointer); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSNumber, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSNumber, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + 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_145( + this.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); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSNumber, _sel_accessInstanceVariablesDirectly); + 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_145( + this.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); } - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSNumber, _sel_useStoredAccessor); + objc.NSDate startOfDayForDate_(objc.NSDate date) { + final _ret = + _objc_msgSend_146(this.pointer, _sel_startOfDayForDate_, date.pointer); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSNumber, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + NSDateComponents componentsInTimeZone_fromDate_( + NSTimeZone timezone, objc.NSDate date) { + final _ret = _objc_msgSend_147(this.pointer, + _sel_componentsInTimeZone_fromDate_, timezone.pointer, date.pointer); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSNumber, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + int compareDate_toDate_toUnitGranularity_( + objc.NSDate date1, objc.NSDate date2, int unit) { + return _objc_msgSend_148( + this.pointer, + _sel_compareDate_toDate_toUnitGranularity_, + date1.pointer, + date2.pointer, + unit); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSNumber, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + bool isDate_equalToDate_toUnitGranularity_( + objc.NSDate date1, objc.NSDate date2, int unit) { + return _objc_msgSend_149( + this.pointer, + _sel_isDate_equalToDate_toUnitGranularity_, + date1.pointer, + date2.pointer, + unit); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSNumber, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + bool isDate_inSameDayAsDate_(objc.NSDate date1, objc.NSDate date2) { + return _objc_msgSend_150(this.pointer, _sel_isDate_inSameDayAsDate_, + date1.pointer, date2.pointer); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSNumber, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + bool isDateInToday_(objc.NSDate date) { + return _objc_msgSend_107(this.pointer, _sel_isDateInToday_, date.pointer); } -} -late final _class_NSNumber = objc.getClass("NSNumber"); - -class NSValue extends NSObject { - NSValue._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSValue] that points to the same underlying object as [other]. - static NSValue castFrom(T other) { - return NSValue._(other.pointer, retain: true, release: true); + bool isDateInYesterday_(objc.NSDate date) { + return _objc_msgSend_107( + this.pointer, _sel_isDateInYesterday_, date.pointer); } - /// Returns a [NSValue] that wraps the given raw object pointer. - static NSValue castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSValue._(other, retain: retain, release: release); + bool isDateInTomorrow_(objc.NSDate date) { + return _objc_msgSend_107( + this.pointer, _sel_isDateInTomorrow_, date.pointer); } - /// Returns whether [obj] is an instance of [NSValue]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSValue); + bool isDateInWeekend_(objc.NSDate date) { + return _objc_msgSend_107(this.pointer, _sel_isDateInWeekend_, date.pointer); } - void getValue_size_(ffi.Pointer value, int size) { - _objc_msgSend_22(this.pointer, _sel_getValue_size_, value, size); + bool rangeOfWeekendStartDate_interval_containingDate_( + ffi.Pointer> datep, + ffi.Pointer tip, + objc.NSDate date) { + return _objc_msgSend_151( + this.pointer, + _sel_rangeOfWeekendStartDate_interval_containingDate_, + datep, + tip, + date.pointer); } - ffi.Pointer get objCType { - return _objc_msgSend_13(this.pointer, _sel_objCType); + bool nextWeekendStartDate_interval_options_afterDate_( + ffi.Pointer> datep, + ffi.Pointer tip, + int options, + objc.NSDate date) { + return _objc_msgSend_152( + this.pointer, + _sel_nextWeekendStartDate_interval_options_afterDate_, + datep, + tip, + options, + date.pointer); } - NSValue initWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _objc_msgSend_46( - this.pointer, _sel_initWithBytes_objCType_, value, type); - return NSValue._(_ret, retain: true, release: true); + NSDateComponents components_fromDateComponents_toDateComponents_options_( + int unitFlags, + NSDateComponents startingDateComp, + NSDateComponents resultDateComp, + int options) { + final _ret = _objc_msgSend_153( + this.pointer, + _sel_components_fromDateComponents_toDateComponents_options_, + unitFlags, + startingDateComp.pointer, + resultDateComp.pointer, + options); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - NSValue? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); + objc.NSDate? dateByAddingUnit_value_toDate_options_( + int unit, int value, objc.NSDate date, int options) { + final _ret = _objc_msgSend_154( + this.pointer, + _sel_dateByAddingUnit_value_toDate_options_, + unit, + value, + date.pointer, + options); return _ret.address == 0 ? null - : NSValue._(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - static NSValue valueWithBytes_objCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = _objc_msgSend_48( - _class_NSValue, _sel_valueWithBytes_objCType_, value, type); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue value_withObjCType_( - ffi.Pointer value, ffi.Pointer type) { - final _ret = - _objc_msgSend_48(_class_NSValue, _sel_value_withObjCType_, value, type); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithNonretainedObject_(NSObject? anObject) { - final _ret = _objc_msgSend_49(_class_NSValue, - _sel_valueWithNonretainedObject_, anObject?.pointer ?? ffi.nullptr); - return NSValue._(_ret, retain: true, release: true); + void enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_( + objc.NSDate start, + NSDateComponents comps, + int opts, + ObjCBlock_ffiVoid_NSDate_bool_bool block) { + _objc_msgSend_155( + this.pointer, + _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_, + start.pointer, + comps.pointer, + opts, + block.pointer); } - NSObject? get nonretainedObjectValue { - final _ret = _objc_msgSend_17(this.pointer, _sel_nonretainedObjectValue); + objc.NSDate? nextDateAfterDate_matchingComponents_options_( + objc.NSDate date, NSDateComponents comps, int options) { + final _ret = _objc_msgSend_156( + this.pointer, + _sel_nextDateAfterDate_matchingComponents_options_, + date.pointer, + comps.pointer, + options); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSValue valueWithPointer_(ffi.Pointer pointer) { - final _ret = - _objc_msgSend_50(_class_NSValue, _sel_valueWithPointer_, pointer); - return NSValue._(_ret, retain: true, release: true); - } - - ffi.Pointer get pointerValue { - return _objc_msgSend_20(this.pointer, _sel_pointerValue); - } - - bool isEqualToValue_(NSValue value) { - return _objc_msgSend_51(this.pointer, _sel_isEqualToValue_, value.pointer); - } - - void getValue_(ffi.Pointer value) { - _objc_msgSend_52(this.pointer, _sel_getValue_, value); - } - - static NSValue valueWithRange_(_NSRange range) { - final _ret = _objc_msgSend_53(_class_NSValue, _sel_valueWithRange_, range); - return NSValue._(_ret, retain: true, release: true); - } - - void getRangeValue(ffi.Pointer<_NSRange> stret) { - objc.useMsgSendVariants - ? _objc_msgSend_54Stret(stret, this.pointer, _sel_rangeValue) - : stret.ref = _objc_msgSend_54(this.pointer, _sel_rangeValue); - } - - static NSValue valueWithPoint_(CGPoint point) { - final _ret = _objc_msgSend_55(_class_NSValue, _sel_valueWithPoint_, point); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithSize_(CGSize size) { - final _ret = _objc_msgSend_56(_class_NSValue, _sel_valueWithSize_, size); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithRect_(CGRect rect) { - final _ret = _objc_msgSend_57(_class_NSValue, _sel_valueWithRect_, rect); - return NSValue._(_ret, retain: true, release: true); - } - - static NSValue valueWithEdgeInsets_(NSEdgeInsets insets) { - final _ret = - _objc_msgSend_58(_class_NSValue, _sel_valueWithEdgeInsets_, insets); - return NSValue._(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - void getPointValue(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_59Stret(stret, this.pointer, _sel_pointValue) - : stret.ref = _objc_msgSend_59(this.pointer, _sel_pointValue); + objc.NSDate? nextDateAfterDate_matchingUnit_value_options_( + objc.NSDate date, int unit, int value, int options) { + final _ret = _objc_msgSend_157( + this.pointer, + _sel_nextDateAfterDate_matchingUnit_value_options_, + date.pointer, + unit, + value, + options); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - void getSizeValue(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_60Stret(stret, this.pointer, _sel_sizeValue) - : stret.ref = _objc_msgSend_60(this.pointer, _sel_sizeValue); + objc.NSDate? nextDateAfterDate_matchingHour_minute_second_options_( + objc.NSDate date, + int hourValue, + int minuteValue, + int secondValue, + int options) { + final _ret = _objc_msgSend_158( + this.pointer, + _sel_nextDateAfterDate_matchingHour_minute_second_options_, + date.pointer, + hourValue, + minuteValue, + secondValue, + options); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - void getRectValue(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_61Stret(stret, this.pointer, _sel_rectValue) - : stret.ref = _objc_msgSend_61(this.pointer, _sel_rectValue); + objc.NSDate? dateBySettingUnit_value_ofDate_options_( + int unit, int v, objc.NSDate date, int opts) { + final _ret = _objc_msgSend_154( + this.pointer, + _sel_dateBySettingUnit_value_ofDate_options_, + unit, + v, + date.pointer, + opts); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - void getEdgeInsetsValue(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_62Stret(stret, this.pointer, _sel_edgeInsetsValue) - : stret.ref = _objc_msgSend_62(this.pointer, _sel_edgeInsetsValue); + objc.NSDate? dateBySettingHour_minute_second_ofDate_options_( + int h, int m, int s, objc.NSDate date, int opts) { + final _ret = _objc_msgSend_159( + this.pointer, + _sel_dateBySettingHour_minute_second_ofDate_options_, + h, + m, + s, + date.pointer, + opts); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - @override - NSValue init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSValue._(_ret, retain: true, release: true); + bool date_matchesComponents_(objc.NSDate date, NSDateComponents components) { + return _objc_msgSend_160(this.pointer, _sel_date_matchesComponents_, + date.pointer, components.pointer); } - static NSValue new1() { - final _ret = _objc_msgSend_2(_class_NSValue, _sel_new); - return NSValue._(_ret, retain: false, release: true); + static NSCalendar new1() { + final _ret = _objc_msgSend_40(_class_NSCalendar, _sel_new); + return NSCalendar.castFromPointer(_ret, retain: false, release: true); } - static NSValue allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSValue, _sel_allocWithZone_, zone); - return NSValue._(_ret, retain: false, release: true); + static NSCalendar allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSCalendar, _sel_allocWithZone_, zone); + return NSCalendar.castFromPointer(_ret, retain: false, release: true); } - static NSValue alloc() { - final _ret = _objc_msgSend_2(_class_NSValue, _sel_alloc); - return NSValue._(_ret, retain: false, release: true); + static NSCalendar alloc() { + final _ret = _objc_msgSend_40(_class_NSCalendar, _sel_alloc); + return NSCalendar.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSValue, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSCalendar, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSValue, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSCalendar, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSValue, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSCalendar, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSValue, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSCalendar, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSValue, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSCalendar, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSValue, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSCalendar, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSValue, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSCalendar, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { + static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = - _objc_msgSend_85(_class_NSValue, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + _objc_msgSend_6(_class_NSCalendar, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSValue, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSCalendar, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSValue = objc.getClass("NSValue"); -late final _sel_getValue_size_ = objc.registerName("getValue:size:"); -late final _sel_objCType = objc.registerName("objCType"); -late final _sel_initWithBytes_objCType_ = - objc.registerName("initWithBytes:objCType:"); -final _objc_msgSend_46 = 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_initWithCoder_ = objc.registerName("initWithCoder:"); -final _objc_msgSend_47 = 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_valueWithBytes_objCType_ = - objc.registerName("valueWithBytes:objCType:"); -final _objc_msgSend_48 = objc.msgSendPointer +late final _class_NSCalendar = objc.getClass("NSCalendar"); +late final _sel_currentCalendar = objc.registerName("currentCalendar"); +final _objc_msgSend_121 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_value_withObjCType_ = objc.registerName("value:withObjCType:"); -late final _sel_valueWithNonretainedObject_ = - objc.registerName("valueWithNonretainedObject:"); -final _objc_msgSend_49 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_autoupdatingCurrentCalendar = + objc.registerName("autoupdatingCurrentCalendar"); +late final _sel_calendarWithIdentifier_ = + objc.registerName("calendarWithIdentifier:"); +final _objc_msgSend_122 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -6260,929 +5351,603 @@ final _objc_msgSend_49 = objc.msgSendPointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_nonretainedObjectValue = - objc.registerName("nonretainedObjectValue"); -late final _sel_valueWithPointer_ = objc.registerName("valueWithPointer:"); -final _objc_msgSend_50 = objc.msgSendPointer +late final _sel_initWithCalendarIdentifier_ = + objc.registerName("initWithCalendarIdentifier:"); +late final _sel_calendarIdentifier = objc.registerName("calendarIdentifier"); +final _objc_msgSend_123 = 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)>(); -late final _sel_pointerValue = objc.registerName("pointerValue"); -late final _sel_isEqualToValue_ = objc.registerName("isEqualToValue:"); -final _objc_msgSend_51 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_124 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - bool Function(ffi.Pointer, + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_getValue_ = objc.registerName("getValue:"); -final _objc_msgSend_52 = objc.msgSendPointer +late final _sel_firstWeekday = objc.registerName("firstWeekday"); +late final _sel_setFirstWeekday_ = objc.registerName("setFirstWeekday:"); +final _objc_msgSend_125 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_valueWithRange_ = objc.registerName("valueWithRange:"); -final _objc_msgSend_53 = 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_rangeValue = objc.registerName("rangeValue"); -final _objc_msgSend_54 = objc.msgSendPointer + 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"); + +abstract class NSCalendarUnit { + static const int NSCalendarUnitEra = 2; + static const int NSCalendarUnitYear = 4; + static const int NSCalendarUnitMonth = 8; + static const int NSCalendarUnitDay = 16; + static const int NSCalendarUnitHour = 32; + static const int NSCalendarUnitMinute = 64; + static const int NSCalendarUnitSecond = 128; + static const int NSCalendarUnitWeekday = 512; + static const int NSCalendarUnitWeekdayOrdinal = 1024; + static const int NSCalendarUnitQuarter = 2048; + static const int NSCalendarUnitWeekOfMonth = 4096; + static const int NSCalendarUnitWeekOfYear = 8192; + static const int NSCalendarUnitYearForWeekOfYear = 16384; + static const int NSCalendarUnitNanosecond = 32768; + static const int NSCalendarUnitCalendar = 1048576; + static const int NSCalendarUnitTimeZone = 2097152; + static const int NSEraCalendarUnit = 2; + static const int NSYearCalendarUnit = 4; + static const int NSMonthCalendarUnit = 8; + static const int NSDayCalendarUnit = 16; + static const int NSHourCalendarUnit = 32; + static const int NSMinuteCalendarUnit = 64; + static const int NSSecondCalendarUnit = 128; + static const int NSWeekCalendarUnit = 256; + static const int NSWeekdayCalendarUnit = 512; + static const int NSWeekdayOrdinalCalendarUnit = 1024; + static const int NSQuarterCalendarUnit = 2048; + static const int NSWeekOfMonthCalendarUnit = 4096; + static const int NSWeekOfYearCalendarUnit = 8192; + static const int NSYearForWeekOfYearCalendarUnit = 16384; + static const int NSCalendarCalendarUnit = 1048576; + static const int NSTimeZoneCalendarUnit = 2097152; +} + +late final _sel_minimumRangeOfUnit_ = objc.registerName("minimumRangeOfUnit:"); +final _objc_msgSend_126 = objc.msgSendPointer .cast< ffi.NativeFunction< _NSRange Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, ffi.Int32)>>() .asFunction< - _NSRange Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_54Stret = objc.msgSendStretPointer + _NSRange Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_126Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Int32)>>() .asFunction< void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>(); - -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_55 = 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_56 = 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_57 = 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_58 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSEdgeInsets)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, NSEdgeInsets)>(); -late final _sel_pointValue = objc.registerName("pointValue"); -final _objc_msgSend_59 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - CGPoint Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - CGPoint Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_59Stret = objc.msgSendStretPointer + ffi.Pointer, int)>(); +late final _sel_maximumRangeOfUnit_ = objc.registerName("maximumRangeOfUnit:"); +late final _sel_rangeOfUnit_inUnit_forDate_ = + objc.registerName("rangeOfUnit:inUnit:forDate:"); +final _objc_msgSend_127 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, + _NSRange Function( ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_sizeValue = objc.registerName("sizeValue"); -final _objc_msgSend_60 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - CGSize Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - CGSize Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_60Stret = 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_rectValue = objc.registerName("rectValue"); -final _objc_msgSend_61 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - CGRect Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - CGRect Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_61Stret = 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_edgeInsetsValue = objc.registerName("edgeInsetsValue"); -final _objc_msgSend_62 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - NSEdgeInsets Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>() .asFunction< - NSEdgeInsets Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_62Stret = objc.msgSendStretPointer + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +final _objc_msgSend_127Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer, + ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_keyPathsForValuesAffectingValueForKey_ = - objc.registerName("keyPathsForValuesAffectingValueForKey:"); -final _objc_msgSend_63 = objc.msgSendPointer + 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_128 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer, + ffi.Int32, + ffi.Int32, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_automaticallyNotifiesObserversForKey_ = - objc.registerName("automaticallyNotifiesObserversForKey:"); -final _objc_msgSend_64 = objc.msgSendPointer + 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_129 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Int32, + ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>, + ffi.Pointer, + ffi.Pointer)>(); -class NSArray extends NSObject { - NSArray._(ffi.Pointer pointer, +class NSDateComponents extends objc.NSObject { + NSDateComponents._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSArray] that points to the same underlying object as [other]. - static NSArray castFrom(T other) { - return NSArray._(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.pointer, retain: true, release: true); - /// Returns a [NSArray] that wraps the given raw object pointer. - static NSArray castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSArray._(other, retain: retain, release: release); - } + /// 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 [NSArray]. + /// Returns whether [obj] is an instance of [NSDateComponents]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSArray); - } - - int get count { - return _objc_msgSend_10(this.pointer, _sel_count); - } - - NSObject objectAtIndex_(int index) { - final _ret = _objc_msgSend_65(this.pointer, _sel_objectAtIndex_, index); - return NSObject._(_ret, retain: true, release: true); - } - - @override - NSArray init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - this.pointer, _sel_initWithObjects_count_, objects, cnt); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSArray arrayByAddingObject_(NSObject anObject) { - final _ret = _objc_msgSend_67( - this.pointer, _sel_arrayByAddingObject_, anObject.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray arrayByAddingObjectsFromArray_(NSArray otherArray) { - final _ret = _objc_msgSend_68( - this.pointer, _sel_arrayByAddingObjectsFromArray_, otherArray.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSString componentsJoinedByString_(NSString separator) { - final _ret = _objc_msgSend_69( - this.pointer, _sel_componentsJoinedByString_, separator.pointer); - return NSString._(_ret, retain: true, release: true); - } - - bool containsObject_(NSObject anObject) { return _objc_msgSend_0( - this.pointer, _sel_containsObject_, anObject.pointer); - } - - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _objc_msgSend_70(this.pointer, _sel_descriptionWithLocale_, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_indent_(NSObject? locale, int level) { - final _ret = _objc_msgSend_71( - this.pointer, - _sel_descriptionWithLocale_indent_, - locale?.pointer ?? ffi.nullptr, - level); - return NSString._(_ret, retain: true, release: true); + obj.pointer, _sel_isKindOfClass_, _class_NSDateComponents); } - NSObject? firstObjectCommonWithArray_(NSArray otherArray) { - final _ret = _objc_msgSend_72( - this.pointer, _sel_firstObjectCommonWithArray_, otherArray.pointer); + NSCalendar? get calendar { + final _ret = _objc_msgSend_130(this.pointer, _sel_calendar); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); - } - - void getObjects_range_( - ffi.Pointer> objects, _NSRange range) { - _objc_msgSend_73(this.pointer, _sel_getObjects_range_, objects, range); - } - - int indexOfObject_(NSObject anObject) { - return _objc_msgSend_74( - this.pointer, _sel_indexOfObject_, anObject.pointer); - } - - int indexOfObject_inRange_(NSObject anObject, _NSRange range) { - return _objc_msgSend_75( - this.pointer, _sel_indexOfObject_inRange_, anObject.pointer, range); - } - - int indexOfObjectIdenticalTo_(NSObject anObject) { - return _objc_msgSend_74( - this.pointer, _sel_indexOfObjectIdenticalTo_, anObject.pointer); - } - - int indexOfObjectIdenticalTo_inRange_(NSObject anObject, _NSRange range) { - return _objc_msgSend_75(this.pointer, - _sel_indexOfObjectIdenticalTo_inRange_, anObject.pointer, range); - } - - bool isEqualToArray_(NSArray otherArray) { - return _objc_msgSend_76( - this.pointer, _sel_isEqualToArray_, otherArray.pointer); + : NSCalendar.castFromPointer(_ret, retain: true, release: true); } - NSObject? get firstObject { - final _ret = _objc_msgSend_17(this.pointer, _sel_firstObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + set calendar(NSCalendar? value) { + return _objc_msgSend_131( + this.pointer, _sel_setCalendar_, value?.pointer ?? ffi.nullptr); } - NSObject? get lastObject { - final _ret = _objc_msgSend_17(this.pointer, _sel_lastObject); + NSTimeZone? get timeZone { + final _ret = _objc_msgSend_132(this.pointer, _sel_timeZone); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSEnumerator objectEnumerator() { - final _ret = _objc_msgSend_77(this.pointer, _sel_objectEnumerator); - return NSEnumerator._(_ret, retain: true, release: true); - } - - NSEnumerator reverseObjectEnumerator() { - final _ret = _objc_msgSend_77(this.pointer, _sel_reverseObjectEnumerator); - return NSEnumerator._(_ret, retain: true, release: true); - } - - NSData get sortedArrayHint { - final _ret = _objc_msgSend_43(this.pointer, _sel_sortedArrayHint); - return NSData._(_ret, retain: true, release: true); - } - - NSArray sortedArrayUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context) { - final _ret = _objc_msgSend_78(this.pointer, - _sel_sortedArrayUsingFunction_context_, comparator, context); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray sortedArrayUsingFunction_context_hint_( - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - comparator, - ffi.Pointer context, - NSData? hint) { - final _ret = _objc_msgSend_79( - this.pointer, - _sel_sortedArrayUsingFunction_context_hint_, - comparator, - context, - hint?.pointer ?? ffi.nullptr); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { - final _ret = _objc_msgSend_80( - this.pointer, _sel_sortedArrayUsingSelector_, comparator); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray subarrayWithRange_(_NSRange range) { - final _ret = _objc_msgSend_81(this.pointer, _sel_subarrayWithRange_, range); - return NSArray._(_ret, retain: true, release: true); - } - - bool writeToURL_error_( - NSURL url, ffi.Pointer> error) { - return _objc_msgSend_89( - this.pointer, _sel_writeToURL_error_, url.pointer, error); - } - - void makeObjectsPerformSelector_(ffi.Pointer aSelector) { - _objc_msgSend_7(this.pointer, _sel_makeObjectsPerformSelector_, aSelector); - } - - void makeObjectsPerformSelector_withObject_( - ffi.Pointer aSelector, NSObject? argument) { - _objc_msgSend_90(this.pointer, _sel_makeObjectsPerformSelector_withObject_, - aSelector, argument?.pointer ?? ffi.nullptr); - } - - NSArray objectsAtIndexes_(NSIndexSet indexes) { - final _ret = _objc_msgSend_111( - this.pointer, _sel_objectsAtIndexes_, indexes.pointer); - return NSArray._(_ret, retain: true, release: true); + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - NSObject objectAtIndexedSubscript_(int idx) { - final _ret = - _objc_msgSend_65(this.pointer, _sel_objectAtIndexedSubscript_, idx); - return NSObject._(_ret, retain: true, release: true); + set timeZone(NSTimeZone? value) { + return _objc_msgSend_133( + this.pointer, _sel_setTimeZone_, value?.pointer ?? ffi.nullptr); } - void enumerateObjectsUsingBlock_( - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { - _objc_msgSend_112( - this.pointer, _sel_enumerateObjectsUsingBlock_, block.pointer); + int get era { + return _objc_msgSend_114(this.pointer, _sel_era); } - void enumerateObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { - _objc_msgSend_113(this.pointer, - _sel_enumerateObjectsWithOptions_usingBlock_, opts, block.pointer); + set era(int value) { + return _objc_msgSend_134(this.pointer, _sel_setEra_, value); } - void enumerateObjectsAtIndexes_options_usingBlock_(NSIndexSet s, int opts, - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { - _objc_msgSend_114( - this.pointer, - _sel_enumerateObjectsAtIndexes_options_usingBlock_, - s.pointer, - opts, - block.pointer); + int get year { + return _objc_msgSend_114(this.pointer, _sel_year); } - int indexOfObjectPassingTest_( - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_115( - this.pointer, _sel_indexOfObjectPassingTest_, predicate.pointer); + set year(int value) { + return _objc_msgSend_134(this.pointer, _sel_setYear_, value); } - int indexOfObjectWithOptions_passingTest_( - int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_116(this.pointer, - _sel_indexOfObjectWithOptions_passingTest_, opts, predicate.pointer); + int get month { + return _objc_msgSend_114(this.pointer, _sel_month); } - int indexOfObjectAtIndexes_options_passingTest_(NSIndexSet s, int opts, - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_117( - this.pointer, - _sel_indexOfObjectAtIndexes_options_passingTest_, - s.pointer, - opts, - predicate.pointer); + set month(int value) { + return _objc_msgSend_134(this.pointer, _sel_setMonth_, value); } - NSIndexSet indexesOfObjectsPassingTest_( - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_118( - this.pointer, _sel_indexesOfObjectsPassingTest_, predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); + int get day { + return _objc_msgSend_114(this.pointer, _sel_day); } - NSIndexSet indexesOfObjectsWithOptions_passingTest_( - int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_119(this.pointer, - _sel_indexesOfObjectsWithOptions_passingTest_, opts, predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); + set day(int value) { + return _objc_msgSend_134(this.pointer, _sel_setDay_, value); } - NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_(NSIndexSet s, - int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_120( - this.pointer, - _sel_indexesOfObjectsAtIndexes_options_passingTest_, - s.pointer, - opts, - predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); + int get hour { + return _objc_msgSend_114(this.pointer, _sel_hour); } - NSArray sortedArrayUsingComparator_( - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - final _ret = _objc_msgSend_121( - this.pointer, _sel_sortedArrayUsingComparator_, cmptr.pointer); - return NSArray._(_ret, retain: true, release: true); + set hour(int value) { + return _objc_msgSend_134(this.pointer, _sel_setHour_, value); } - NSArray sortedArrayWithOptions_usingComparator_(int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - final _ret = _objc_msgSend_122(this.pointer, - _sel_sortedArrayWithOptions_usingComparator_, opts, cmptr.pointer); - return NSArray._(_ret, retain: true, release: true); + int get minute { + return _objc_msgSend_114(this.pointer, _sel_minute); } - int indexOfObject_inSortedRange_options_usingComparator_( - NSObject obj, - _NSRange r, - int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmp) { - return _objc_msgSend_123( - this.pointer, - _sel_indexOfObject_inSortedRange_options_usingComparator_, - obj.pointer, - r, - opts, - cmp.pointer); + set minute(int value) { + return _objc_msgSend_134(this.pointer, _sel_setMinute_, value); } - static NSArray array() { - final _ret = _objc_msgSend_2(_class_NSArray, _sel_array); - return NSArray._(_ret, retain: true, release: true); + int get second { + return _objc_msgSend_114(this.pointer, _sel_second); } - static NSArray arrayWithObject_(NSObject anObject) { - final _ret = _objc_msgSend_124( - _class_NSArray, _sel_arrayWithObject_, anObject.pointer); - return NSArray._(_ret, retain: true, release: true); + set second(int value) { + return _objc_msgSend_134(this.pointer, _sel_setSecond_, value); } - static NSArray arrayWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - _class_NSArray, _sel_arrayWithObjects_count_, objects, cnt); - return NSArray._(_ret, retain: true, release: true); + int get nanosecond { + return _objc_msgSend_114(this.pointer, _sel_nanosecond); } - static NSArray arrayWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - _class_NSArray, _sel_arrayWithObjects_, firstObj.pointer); - return NSArray._(_ret, retain: true, release: true); + set nanosecond(int value) { + return _objc_msgSend_134(this.pointer, _sel_setNanosecond_, value); } - static NSArray arrayWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(_class_NSArray, _sel_arrayWithArray_, array.pointer); - return NSArray._(_ret, retain: true, release: true); + int get weekday { + return _objc_msgSend_114(this.pointer, _sel_weekday); } - NSArray initWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjects_, firstObj.pointer); - return NSArray._(_ret, retain: true, release: true); + set weekday(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekday_, value); } - NSArray initWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(this.pointer, _sel_initWithArray_, array.pointer); - return NSArray._(_ret, retain: true, release: true); + int get weekdayOrdinal { + return _objc_msgSend_114(this.pointer, _sel_weekdayOrdinal); } - NSArray initWithArray_copyItems_(NSArray array, bool flag) { - final _ret = _objc_msgSend_126( - this.pointer, _sel_initWithArray_copyItems_, array.pointer, flag); - return NSArray._(_ret, retain: false, release: true); + set weekdayOrdinal(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekdayOrdinal_, value); } - NSArray? initWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_127( - this.pointer, _sel_initWithContentsOfURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + int get quarter { + return _objc_msgSend_114(this.pointer, _sel_quarter); } - static NSArray? arrayWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_127( - _class_NSArray, _sel_arrayWithContentsOfURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + set quarter(int value) { + return _objc_msgSend_134(this.pointer, _sel_setQuarter_, value); } - NSObject differenceFromArray_withOptions_usingEquivalenceTest_(NSArray other, - int options, ObjCBlock_bool_objcObjCObject_objcObjCObject block) { - final _ret = _objc_msgSend_128( - this.pointer, - _sel_differenceFromArray_withOptions_usingEquivalenceTest_, - other.pointer, - options, - block.pointer); - return NSObject._(_ret, retain: true, release: true); + int get weekOfMonth { + return _objc_msgSend_114(this.pointer, _sel_weekOfMonth); } - NSObject differenceFromArray_withOptions_(NSArray other, int options) { - final _ret = _objc_msgSend_129(this.pointer, - _sel_differenceFromArray_withOptions_, other.pointer, options); - return NSObject._(_ret, retain: true, release: true); + set weekOfMonth(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekOfMonth_, value); } - NSObject differenceFromArray_(NSArray other) { - final _ret = _objc_msgSend_125( - this.pointer, _sel_differenceFromArray_, other.pointer); - return NSObject._(_ret, retain: true, release: true); + int get weekOfYear { + return _objc_msgSend_114(this.pointer, _sel_weekOfYear); } - NSArray? arrayByApplyingDifference_(NSObject difference) { - final _ret = _objc_msgSend_130( - this.pointer, _sel_arrayByApplyingDifference_, difference.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + set weekOfYear(int value) { + return _objc_msgSend_134(this.pointer, _sel_setWeekOfYear_, value); } - void getObjects_(ffi.Pointer> objects) { - _objc_msgSend_131(this.pointer, _sel_getObjects_, objects); + int get yearForWeekOfYear { + return _objc_msgSend_114(this.pointer, _sel_yearForWeekOfYear); } - static NSArray? arrayWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_132( - _class_NSArray, _sel_arrayWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + set yearForWeekOfYear(int value) { + return _objc_msgSend_134(this.pointer, _sel_setYearForWeekOfYear_, value); } - static NSArray? arrayWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_133( - _class_NSArray, _sel_arrayWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + bool get leapMonth { + return _objc_msgSend_7(this.pointer, _sel_isLeapMonth); } - NSArray? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_132( - this.pointer, _sel_initWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + set leapMonth(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLeapMonth_, value); } - NSArray? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_133( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); + objc.NSDate? get date { + final _ret = _objc_msgSend_116(this.pointer, _sel_date); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); - } - - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _objc_msgSend_26(this.pointer, _sel_writeToFile_atomically_, - path.pointer, useAuxiliaryFile); - } - - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _objc_msgSend_134( - this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); - } - - NSArray pathsMatchingExtensions_(NSArray filterTypes) { - final _ret = _objc_msgSend_68( - this.pointer, _sel_pathsMatchingExtensions_, filterTypes.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSObject valueForKey_(NSString key) { - final _ret = _objc_msgSend_31(this.pointer, _sel_valueForKey_, key.pointer); - return NSObject._(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - @override - void setValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); + int week() { + return _objc_msgSend_114(this.pointer, _sel_week); } - void addObserver_toObjectsAtIndexes_forKeyPath_options_context_( - NSObject observer, - NSIndexSet indexes, - NSString keyPath, - int options, - ffi.Pointer context) { - _objc_msgSend_136( - this.pointer, - _sel_addObserver_toObjectsAtIndexes_forKeyPath_options_context_, - observer.pointer, - indexes.pointer, - keyPath.pointer, - options, - context); + void setWeek_(int v) { + _objc_msgSend_135(this.pointer, _sel_setWeek_, v); } - void removeObserver_fromObjectsAtIndexes_forKeyPath_context_( - NSObject observer, - NSIndexSet indexes, - NSString keyPath, - ffi.Pointer context) { - _objc_msgSend_137( - this.pointer, - _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_context_, - observer.pointer, - indexes.pointer, - keyPath.pointer, - context); + void setValue_forComponent_(int value, int unit) { + _objc_msgSend_136(this.pointer, _sel_setValue_forComponent_, value, unit); } - void removeObserver_fromObjectsAtIndexes_forKeyPath_( - NSObject observer, NSIndexSet indexes, NSString keyPath) { - _objc_msgSend_138( - this.pointer, - _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_, - observer.pointer, - indexes.pointer, - keyPath.pointer); + int valueForComponent_(int unit) { + return _objc_msgSend_137(this.pointer, _sel_valueForComponent_, unit); } - @override - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _objc_msgSend_139( - this.pointer, - _sel_addObserver_forKeyPath_options_context_, - observer.pointer, - keyPath.pointer, - options, - context); + bool get validDate { + return _objc_msgSend_7(this.pointer, _sel_isValidDate); } - @override - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _objc_msgSend_140(this.pointer, _sel_removeObserver_forKeyPath_context_, - observer.pointer, keyPath.pointer, context); + bool isValidDateInCalendar_(NSCalendar calendar) { + return _objc_msgSend_138( + this.pointer, _sel_isValidDateInCalendar_, calendar.pointer); } @override - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _objc_msgSend_141(this.pointer, _sel_removeObserver_forKeyPath_, - observer.pointer, keyPath.pointer); - } - - NSArray sortedArrayUsingDescriptors_(NSArray sortDescriptors) { - final _ret = _objc_msgSend_68(this.pointer, - _sel_sortedArrayUsingDescriptors_, sortDescriptors.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray filteredArrayUsingPredicate_(NSPredicate predicate) { - final _ret = _objc_msgSend_219( - this.pointer, _sel_filteredArrayUsingPredicate_, predicate.pointer); - return NSArray._(_ret, retain: true, release: true); + NSDateComponents init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSDateComponents.castFromPointer(_ret, retain: true, release: true); } - static NSArray new1() { - final _ret = _objc_msgSend_2(_class_NSArray, _sel_new); - return NSArray._(_ret, retain: false, release: true); + static NSDateComponents new1() { + final _ret = _objc_msgSend_40(_class_NSDateComponents, _sel_new); + return NSDateComponents.castFromPointer(_ret, retain: false, release: true); } - static NSArray allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSArray, _sel_allocWithZone_, zone); - return NSArray._(_ret, retain: false, release: true); + static NSDateComponents allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSDateComponents, _sel_allocWithZone_, zone); + return NSDateComponents.castFromPointer(_ret, retain: false, release: true); } - static NSArray alloc() { - final _ret = _objc_msgSend_2(_class_NSArray, _sel_alloc); - return NSArray._(_ret, retain: false, release: true); + static NSDateComponents alloc() { + final _ret = _objc_msgSend_40(_class_NSDateComponents, _sel_alloc); + return NSDateComponents.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSArray, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSDateComponents, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSArray, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSDateComponents, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSArray, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSDateComponents, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSArray, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSDateComponents, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSArray, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSDateComponents, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSArray, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSDateComponents, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSArray, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSDateComponents, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSArray, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSDateComponents, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSArray, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSDateComponents, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSArray = objc.getClass("NSArray"); -late final _sel_objectAtIndex_ = objc.registerName("objectAtIndex:"); -final _objc_msgSend_65 = objc.msgSendPointer +late final _class_NSDateComponents = objc.getClass("NSDateComponents"); +late final _sel_calendar = objc.registerName("calendar"); +final _objc_msgSend_130 = 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)>(); -late final _sel_initWithObjects_count_ = - objc.registerName("initWithObjects:count:"); -final _objc_msgSend_66 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCalendar_ = objc.registerName("setCalendar:"); +final _objc_msgSend_131 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.UnsignedLong)>>() + ffi.Pointer)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - int)>(); -late final _sel_arrayByAddingObject_ = - objc.registerName("arrayByAddingObject:"); -final _objc_msgSend_67 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_132 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_133 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_arrayByAddingObjectsFromArray_ = - objc.registerName("arrayByAddingObjectsFromArray:"); -final _objc_msgSend_68 = objc.msgSendPointer +late final _sel_era = objc.registerName("era"); +late final _sel_setEra_ = objc.registerName("setEra:"); +final _objc_msgSend_134 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + 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_135 = 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_136 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Long, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_valueForComponent_ = objc.registerName("valueForComponent:"); +final _objc_msgSend_137 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_138 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, + bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_componentsJoinedByString_ = - objc.registerName("componentsJoinedByString:"); -final _objc_msgSend_69 = objc.msgSendPointer +late final _sel_dateFromComponents_ = objc.registerName("dateFromComponents:"); +final _objc_msgSend_139 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -7192,506 +5957,355 @@ final _objc_msgSend_69 = objc.msgSendPointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_containsObject_ = objc.registerName("containsObject:"); -late final _sel_descriptionWithLocale_ = - objc.registerName("descriptionWithLocale:"); -final _objc_msgSend_70 = objc.msgSendPointer +late final _sel_components_fromDate_ = + objc.registerName("components:fromDate:"); +final _objc_msgSend_140 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_descriptionWithLocale_indent_ = - objc.registerName("descriptionWithLocale:indent:"); -final _objc_msgSend_71 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +abstract class NSCalendarOptions { + static const int NSCalendarWrapComponents = 1; + static const int NSCalendarMatchStrictly = 2; + static const int NSCalendarSearchBackwards = 4; + static const int NSCalendarMatchPreviousTimePreservingSmallerUnits = 256; + static const int NSCalendarMatchNextTimePreservingSmallerUnits = 512; + static const int NSCalendarMatchNextTime = 1024; + static const int NSCalendarMatchFirst = 4096; + static const int NSCalendarMatchLast = 8192; +} + +late final _sel_dateByAddingComponents_toDate_options_ = + objc.registerName("dateByAddingComponents:toDate:options:"); +final _objc_msgSend_141 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Pointer, + ffi.Int32)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, int)>(); -late final _sel_firstObjectCommonWithArray_ = - objc.registerName("firstObjectCommonWithArray:"); -final _objc_msgSend_72 = objc.msgSendPointer +late final _sel_components_fromDate_toDate_options_ = + objc.registerName("components:fromDate:toDate:options:"); +final _objc_msgSend_142 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_getObjects_range_ = objc.registerName("getObjects:range:"); -final _objc_msgSend_73 = 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_143 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - _NSRange)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - _NSRange)>(); -late final _sel_indexOfObject_ = objc.registerName("indexOfObject:"); -final _objc_msgSend_74 = objc.msgSendPointer + 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_144 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( + ffi.Long Function( ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer)>>() .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_indexOfObject_inRange_ = - objc.registerName("indexOfObject:inRange:"); -final _objc_msgSend_75 = 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_145 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - _NSRange)>>() + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Long)>>() .asFunction< - int Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_indexOfObjectIdenticalTo_ = - objc.registerName("indexOfObjectIdenticalTo:"); -late final _sel_indexOfObjectIdenticalTo_inRange_ = - objc.registerName("indexOfObjectIdenticalTo:inRange:"); -late final _sel_isEqualToArray_ = objc.registerName("isEqualToArray:"); -final _objc_msgSend_76 = objc.msgSendPointer + 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_146 = 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_firstObject = objc.registerName("firstObject"); -late final _sel_lastObject = objc.registerName("lastObject"); -late final _sel_objectEnumerator = objc.registerName("objectEnumerator"); -final _objc_msgSend_77 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_reverseObjectEnumerator = - objc.registerName("reverseObjectEnumerator"); -late final _sel_sortedArrayHint = objc.registerName("sortedArrayHint"); -late final _sel_sortedArrayUsingFunction_context_ = - objc.registerName("sortedArrayUsingFunction:context:"); -final _objc_msgSend_78 = objc.msgSendPointer +late final _sel_componentsInTimeZone_fromDate_ = + objc.registerName("componentsInTimeZone:fromDate:"); +final _objc_msgSend_147 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); -late final _sel_sortedArrayUsingFunction_context_hint_ = - objc.registerName("sortedArrayUsingFunction:context:hint:"); -final _objc_msgSend_79 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer)>(); + +abstract class NSComparisonResult { + static const int NSOrderedAscending = -1; + static const int NSOrderedSame = 0; + static const int NSOrderedDescending = 1; +} + +late final _sel_compareDate_toDate_toUnitGranularity_ = + objc.registerName("compareDate:toDate:toUnitGranularity:"); +final _objc_msgSend_148 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Int32 Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() .asFunction< - ffi.Pointer Function( + int Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_sortedArrayUsingSelector_ = - objc.registerName("sortedArrayUsingSelector:"); -final _objc_msgSend_80 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_isDate_equalToDate_toUnitGranularity_ = + objc.registerName("isDate:equalToDate:toUnitGranularity:"); +final _objc_msgSend_149 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_subarrayWithRange_ = objc.registerName("subarrayWithRange:"); -final _objc_msgSend_81 = 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_150 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); - -class NSError extends NSObject { - NSError._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSError] that points to the same underlying object as [other]. - static NSError castFrom(T other) { - return NSError._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSError] that wraps the given raw object pointer. - static NSError castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSError._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSError]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSError); - } - - NSError initWithDomain_code_userInfo_( - NSString domain, int code, NSObject? dict) { - final _ret = _objc_msgSend_82( - this.pointer, - _sel_initWithDomain_code_userInfo_, - domain.pointer, - code, - dict?.pointer ?? ffi.nullptr); - return NSError._(_ret, retain: true, release: true); - } - - static NSError errorWithDomain_code_userInfo_( - NSString domain, int code, NSObject? dict) { - final _ret = _objc_msgSend_82( - _class_NSError, - _sel_errorWithDomain_code_userInfo_, - domain.pointer, - code, - dict?.pointer ?? ffi.nullptr); - return NSError._(_ret, retain: true, release: true); - } - - NSString get domain { - final _ret = _objc_msgSend_21(this.pointer, _sel_domain); - return NSString._(_ret, retain: true, release: true); - } - - int get code { - return _objc_msgSend_83(this.pointer, _sel_code); - } - - NSObject get userInfo { - final _ret = _objc_msgSend_2(this.pointer, _sel_userInfo); - return NSObject._(_ret, retain: true, release: true); - } - - NSString get localizedDescription { - final _ret = _objc_msgSend_21(this.pointer, _sel_localizedDescription); - return NSString._(_ret, retain: true, release: true); - } - - NSString? get localizedFailureReason { - final _ret = _objc_msgSend_44(this.pointer, _sel_localizedFailureReason); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get localizedRecoverySuggestion { - final _ret = - _objc_msgSend_44(this.pointer, _sel_localizedRecoverySuggestion); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSArray? get localizedRecoveryOptions { - final _ret = _objc_msgSend_84(this.pointer, _sel_localizedRecoveryOptions); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSObject? get recoveryAttempter { - final _ret = _objc_msgSend_17(this.pointer, _sel_recoveryAttempter); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSString? get helpAnchor { - final _ret = _objc_msgSend_44(this.pointer, _sel_helpAnchor); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSArray get underlyingErrors { - final _ret = _objc_msgSend_85(this.pointer, _sel_underlyingErrors); - return NSArray._(_ret, retain: true, release: true); - } - - static void setUserInfoValueProviderForDomain_provider_(NSString errorDomain, - ObjCBlock_objcObjCObject_NSError_NSString? provider) { - _objc_msgSend_86( - _class_NSError, - _sel_setUserInfoValueProviderForDomain_provider_, - errorDomain.pointer, - provider?.pointer ?? ffi.nullptr); - } - - static ObjCBlock_objcObjCObject_NSError_NSString? - userInfoValueProviderForDomain_( - NSError err, NSString userInfoKey, NSString errorDomain) { - final _ret = _objc_msgSend_87( - _class_NSError, - _sel_userInfoValueProviderForDomain_, - err.pointer, - userInfoKey.pointer, - errorDomain.pointer); - return _ret.address == 0 - ? null - : ObjCBlock_objcObjCObject_NSError_NSString._(_ret, - retain: true, release: true); - } - - @override - NSError init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSError._(_ret, retain: true, release: true); - } - - static NSError new1() { - final _ret = _objc_msgSend_2(_class_NSError, _sel_new); - return NSError._(_ret, retain: false, release: true); - } - - static NSError allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSError, _sel_allocWithZone_, zone); - return NSError._(_ret, retain: false, release: true); - } - - static NSError alloc() { - final _ret = _objc_msgSend_2(_class_NSError, _sel_alloc); - return NSError._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSError, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSError, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSError, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSError, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSError, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSError, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSError, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSError, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSError, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSError = objc.getClass("NSError"); -late final _sel_initWithDomain_code_userInfo_ = - objc.registerName("initWithDomain:code:userInfo:"); -final _objc_msgSend_82 = 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_151 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Long, + ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - instancetype Function( + bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int, + ffi.Pointer>, + ffi.Pointer, ffi.Pointer)>(); -late final _sel_errorWithDomain_code_userInfo_ = - objc.registerName("errorWithDomain:code:userInfo:"); -late final _sel_domain = objc.registerName("domain"); -late final _sel_code = objc.registerName("code"); -final _objc_msgSend_83 = objc.msgSendPointer +late final _sel_nextWeekendStartDate_interval_options_afterDate_ = + objc.registerName("nextWeekendStartDate:interval:options:afterDate:"); +final _objc_msgSend_152 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_userInfo = objc.registerName("userInfo"); -late final _sel_localizedDescription = - objc.registerName("localizedDescription"); -late final _sel_localizedFailureReason = - objc.registerName("localizedFailureReason"); -late final _sel_localizedRecoverySuggestion = - objc.registerName("localizedRecoverySuggestion"); -late final _sel_localizedRecoveryOptions = - objc.registerName("localizedRecoveryOptions"); -final _objc_msgSend_84 = objc.msgSendPointer + 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_153 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_recoveryAttempter = objc.registerName("recoveryAttempter"); -late final _sel_helpAnchor = objc.registerName("helpAnchor"); -late final _sel_underlyingErrors = objc.registerName("underlyingErrors"); -final _objc_msgSend_85 = objc.msgSendPointer + 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_154 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Long, + ffi.Pointer, + ffi.Int32)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -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); -final _ObjCBlock_objcObjCObject_NSError_NSString_closureRegistry = Function( - ffi.Pointer, ffi.Pointer)>{}; -int _ObjCBlock_objcObjCObject_NSError_NSString_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_objcObjCObject_NSError_NSString_registerClosure( - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_objcObjCObject_NSError_NSString_closureRegistryIndex; - _ObjCBlock_objcObjCObject_NSError_NSString_closureRegistry[id] = fn; + 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); +final _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry = , bool, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( + void Function(ffi.Pointer, bool, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -ffi.Pointer - _ObjCBlock_objcObjCObject_NSError_NSString_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_objcObjCObject_NSError_NSString_closureRegistry[ - block.ref.target.address]!(arg0, arg1); +void _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_objcObjCObject_NSError_NSString extends objc.ObjCBlockBase { - ObjCBlock_objcObjCObject_NSError_NSString._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) +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); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_objcObjCObject_NSError_NSString castFromPointer( + static ObjCBlock_ffiVoid_NSDate_bool_bool castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { - return ObjCBlock_objcObjCObject_NSError_NSString._(pointer, + return ObjCBlock_ffiVoid_NSDate_bool_bool._(pointer, retain: retain, release: release); } @@ -7700,20 +6314,20 @@ class ObjCBlock_objcObjCObject_NSError_NSString extends objc.ObjCBlockBase { /// This block must be invoked by native 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_objcObjCObject_NSError_NSString.fromFunctionPointer( + ObjCBlock_ffiVoid_NSDate_bool_bool.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0, - ffi.Pointer arg1)>> + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>> ptr) : this._(objc.newBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_NSError_NSString_fnPtrTrampoline) + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDate_bool_bool_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; @@ -7723,3034 +6337,2909 @@ class ObjCBlock_objcObjCObject_NSError_NSString extends objc.ObjCBlockBase { /// This block must be invoked by native 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_objcObjCObject_NSError_NSString.fromFunction(NSObject? Function(NSError, NSString) fn) + ObjCBlock_ffiVoid_NSDate_bool_bool.fromFunction( + void Function(objc.NSDate?, bool, ffi.Pointer) fn) : this._(objc.newBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_objcObjCObject_NSError_NSString_closureTrampoline) + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) .cast(), - _ObjCBlock_objcObjCObject_NSError_NSString_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(NSError._(arg0, retain: true, release: true), NSString._(arg1, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr))); + _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( + (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; - NSObject? call(NSError arg0, NSString arg1) => pointer.ref.invoke + /// 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_NSDate_bool_bool.listener( + void Function(objc.NSDate?, bool, ffi.Pointer) fn) + : this._(objc.newBlock( + (_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(), + _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( + (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.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(objc.NSDate? arg0, bool arg1, ffi.Pointer arg2) => + pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer block, ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>() - (pointer, arg0.pointer, arg1.pointer) - .address == - 0 - ? null - : NSObject._( - pointer.ref.invoke - .cast Function(ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1)>>() - .asFunction Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(pointer, arg0.pointer, arg1.pointer), - retain: false, - release: true); + ffi.Bool arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2); } -late final _sel_setUserInfoValueProviderForDomain_provider_ = - objc.registerName("setUserInfoValueProviderForDomain:provider:"); -final _objc_msgSend_86 = objc.msgSendPointer +late final _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_ = + objc.registerName( + "enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:"); +final _objc_msgSend_155 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Int32, ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, + int, ffi.Pointer)>(); -late final _sel_userInfoValueProviderForDomain_ = - objc.registerName("userInfoValueProviderForDomain:"); -final _objc_msgSend_87 = objc.msgSendPointer +late final _sel_nextDateAfterDate_matchingComponents_options_ = + objc.registerName("nextDateAfterDate:matchingComponents:options:"); +final _objc_msgSend_156 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32)>>() .asFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_setKeys_triggerChangeNotificationsForDependentKey_ = - objc.registerName("setKeys:triggerChangeNotificationsForDependentKey:"); -final _objc_msgSend_88 = objc.msgSendPointer + int)>(); +late final _sel_nextDateAfterDate_matchingUnit_value_options_ = + objc.registerName("nextDateAfterDate:matchingUnit:value:options:"); +final _objc_msgSend_157 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32, + ffi.Long, + ffi.Int32)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_classFallbacksForKeyedArchiver = - objc.registerName("classFallbacksForKeyedArchiver"); -late final _sel_classForKeyedUnarchiver = - objc.registerName("classForKeyedUnarchiver"); -late final _sel_writeToURL_error_ = objc.registerName("writeToURL:error:"); -final _objc_msgSend_89 = objc.msgSendPointer + int, + int, + int)>(); +late final _sel_nextDateAfterDate_matchingHour_minute_second_options_ = + objc.registerName("nextDateAfterDate:matchingHour:minute:second:options:"); +final _objc_msgSend_158 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>() + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Int32)>>() .asFunction< - bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); -late final _sel_makeObjectsPerformSelector_ = - objc.registerName("makeObjectsPerformSelector:"); -late final _sel_makeObjectsPerformSelector_withObject_ = - objc.registerName("makeObjectsPerformSelector:withObject:"); -final _objc_msgSend_90 = objc.msgSendPointer + 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_159 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Long, + ffi.Long, + ffi.Long, + ffi.Pointer, + ffi.Int32)>>() + .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_160 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( + bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_161 = 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_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_162 = 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_defaultDate = objc.registerName("defaultDate"); +late final _sel_setDefaultDate_ = objc.registerName("setDefaultDate:"); +late final _sel_setEraSymbols_ = objc.registerName("setEraSymbols:"); +final _objc_msgSend_163 = 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_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_164 = 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_allowsNaturalLanguage = + objc.registerName("allowsNaturalLanguage"); -class NSIndexSet extends NSObject { - NSIndexSet._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSIndexSet] that points to the same underlying object as [other]. - static NSIndexSet castFrom(T other) { - return NSIndexSet._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSIndexSet] that wraps the given raw object pointer. - static NSIndexSet castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSIndexSet._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSIndexSet]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSIndexSet); - } - - static NSIndexSet indexSet() { - final _ret = _objc_msgSend_2(_class_NSIndexSet, _sel_indexSet); - return NSIndexSet._(_ret, retain: true, release: true); - } - - static NSIndexSet indexSetWithIndex_(int value) { - final _ret = - _objc_msgSend_65(_class_NSIndexSet, _sel_indexSetWithIndex_, value); - return NSIndexSet._(_ret, retain: true, release: true); - } - - static NSIndexSet indexSetWithIndexesInRange_(_NSRange range) { - final _ret = _objc_msgSend_91( - _class_NSIndexSet, _sel_indexSetWithIndexesInRange_, range); - return NSIndexSet._(_ret, retain: true, release: true); - } - - NSIndexSet initWithIndexesInRange_(_NSRange range) { - final _ret = - _objc_msgSend_91(this.pointer, _sel_initWithIndexesInRange_, range); - return NSIndexSet._(_ret, retain: true, release: true); - } - - NSIndexSet initWithIndexSet_(NSIndexSet indexSet) { - final _ret = _objc_msgSend_92( - this.pointer, _sel_initWithIndexSet_, indexSet.pointer); - return NSIndexSet._(_ret, retain: true, release: true); - } - - NSIndexSet initWithIndex_(int value) { - final _ret = _objc_msgSend_65(this.pointer, _sel_initWithIndex_, value); - return NSIndexSet._(_ret, retain: true, release: true); - } - - bool isEqualToIndexSet_(NSIndexSet indexSet) { - return _objc_msgSend_93( - this.pointer, _sel_isEqualToIndexSet_, indexSet.pointer); - } - - int get count { - return _objc_msgSend_10(this.pointer, _sel_count); - } - - int get firstIndex { - return _objc_msgSend_10(this.pointer, _sel_firstIndex); +class NSNumberFormatter extends NSFormatter { + NSNumberFormatter._(ffi.Pointer pointer, + {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.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); + + /// Returns whether [obj] is an instance of [NSNumberFormatter]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSNumberFormatter); } - int get lastIndex { - return _objc_msgSend_10(this.pointer, _sel_lastIndex); + int get formattingContext { + return _objc_msgSend_89(this.pointer, _sel_formattingContext); } - int indexGreaterThanIndex_(int value) { - return _objc_msgSend_94(this.pointer, _sel_indexGreaterThanIndex_, value); + set formattingContext(int value) { + return _objc_msgSend_90(this.pointer, _sel_setFormattingContext_, value); } - int indexLessThanIndex_(int value) { - return _objc_msgSend_94(this.pointer, _sel_indexLessThanIndex_, value); + bool getObjectValue_forString_range_error_( + ffi.Pointer> obj, + objc.NSString string, + ffi.Pointer<_NSRange> rangep, + ffi.Pointer> error) { + return _objc_msgSend_91( + this.pointer, + _sel_getObjectValue_forString_range_error_, + obj, + string.pointer, + rangep, + error); } - int indexGreaterThanOrEqualToIndex_(int value) { - return _objc_msgSend_94( - this.pointer, _sel_indexGreaterThanOrEqualToIndex_, value); + objc.NSString? stringFromNumber_(objc.NSNumber number) { + final _ret = + _objc_msgSend_165(this.pointer, _sel_stringFromNumber_, number.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int indexLessThanOrEqualToIndex_(int value) { - return _objc_msgSend_94( - this.pointer, _sel_indexLessThanOrEqualToIndex_, value); + objc.NSNumber? numberFromString_(objc.NSString string) { + final _ret = + _objc_msgSend_166(this.pointer, _sel_numberFromString_, string.pointer); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); } - int getIndexes_maxCount_inIndexRange_( - ffi.Pointer indexBuffer, - int bufferSize, - ffi.Pointer<_NSRange> range) { - return _objc_msgSend_95(this.pointer, - _sel_getIndexes_maxCount_inIndexRange_, indexBuffer, bufferSize, range); + static objc.NSString localizedStringFromNumber_numberStyle_( + objc.NSNumber num, int nstyle) { + final _ret = _objc_msgSend_167(_class_NSNumberFormatter, + _sel_localizedStringFromNumber_numberStyle_, num.pointer, nstyle); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int countOfIndexesInRange_(_NSRange range) { - return _objc_msgSend_96(this.pointer, _sel_countOfIndexesInRange_, range); + static int defaultFormatterBehavior() { + return _objc_msgSend_168( + _class_NSNumberFormatter, _sel_defaultFormatterBehavior); } - bool containsIndex_(int value) { - return _objc_msgSend_97(this.pointer, _sel_containsIndex_, value); + static void setDefaultFormatterBehavior_(int behavior) { + _objc_msgSend_169( + _class_NSNumberFormatter, _sel_setDefaultFormatterBehavior_, behavior); } - bool containsIndexesInRange_(_NSRange range) { - return _objc_msgSend_98(this.pointer, _sel_containsIndexesInRange_, range); + int get numberStyle { + return _objc_msgSend_170(this.pointer, _sel_numberStyle); } - bool containsIndexes_(NSIndexSet indexSet) { - return _objc_msgSend_93( - this.pointer, _sel_containsIndexes_, indexSet.pointer); + set numberStyle(int value) { + return _objc_msgSend_171(this.pointer, _sel_setNumberStyle_, value); } - bool intersectsIndexesInRange_(_NSRange range) { - return _objc_msgSend_98( - this.pointer, _sel_intersectsIndexesInRange_, range); + objc.NSLocale get locale { + final _ret = _objc_msgSend_102(this.pointer, _sel_locale); + return objc.NSLocale.castFromPointer(_ret, retain: true, release: true); } - void enumerateIndexesUsingBlock_( - ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { - _objc_msgSend_99( - this.pointer, _sel_enumerateIndexesUsingBlock_, block.pointer); + set locale(objc.NSLocale value) { + return _objc_msgSend_103(this.pointer, _sel_setLocale_, value.pointer); } - void enumerateIndexesWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { - _objc_msgSend_100(this.pointer, - _sel_enumerateIndexesWithOptions_usingBlock_, opts, block.pointer); + bool get generatesDecimalNumbers { + return _objc_msgSend_7(this.pointer, _sel_generatesDecimalNumbers); } - void enumerateIndexesInRange_options_usingBlock_( - _NSRange range, int opts, ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { - _objc_msgSend_101( - this.pointer, - _sel_enumerateIndexesInRange_options_usingBlock_, - range, - opts, - block.pointer); + set generatesDecimalNumbers(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setGeneratesDecimalNumbers_, value); } - int indexPassingTest_(ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_102( - this.pointer, _sel_indexPassingTest_, predicate.pointer); + int get formatterBehavior { + return _objc_msgSend_168(this.pointer, _sel_formatterBehavior); } - int indexWithOptions_passingTest_( - int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_103(this.pointer, _sel_indexWithOptions_passingTest_, - opts, predicate.pointer); + set formatterBehavior(int value) { + return _objc_msgSend_172(this.pointer, _sel_setFormatterBehavior_, value); } - int indexInRange_options_passingTest_( - _NSRange range, int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_104(this.pointer, - _sel_indexInRange_options_passingTest_, range, opts, predicate.pointer); + objc.NSString get negativeFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativeFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSIndexSet indexesPassingTest_( - ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_105( - this.pointer, _sel_indexesPassingTest_, predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); + set negativeFormat(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativeFormat_, value.pointer); } - NSIndexSet indexesWithOptions_passingTest_( - int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_106(this.pointer, - _sel_indexesWithOptions_passingTest_, opts, predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); + objc.NSDictionary? get textAttributesForNegativeValues { + final _ret = + _objc_msgSend_65(this.pointer, _sel_textAttributesForNegativeValues); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSIndexSet indexesInRange_options_passingTest_( - _NSRange range, int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_107( + set textAttributesForNegativeValues(objc.NSDictionary? value) { + return _objc_msgSend_173( this.pointer, - _sel_indexesInRange_options_passingTest_, - range, - opts, - predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); + _sel_setTextAttributesForNegativeValues_, + value?.pointer ?? ffi.nullptr); + } + + objc.NSString get positiveFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_positiveFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void enumerateRangesUsingBlock_(ObjCBlock_ffiVoid_NSRange_bool block) { - _objc_msgSend_108( - this.pointer, _sel_enumerateRangesUsingBlock_, block.pointer); + set positiveFormat(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositiveFormat_, value.pointer); } - void enumerateRangesWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_NSRange_bool block) { - _objc_msgSend_109(this.pointer, _sel_enumerateRangesWithOptions_usingBlock_, - opts, block.pointer); + objc.NSDictionary? get textAttributesForPositiveValues { + final _ret = + _objc_msgSend_65(this.pointer, _sel_textAttributesForPositiveValues); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - void enumerateRangesInRange_options_usingBlock_( - _NSRange range, int opts, ObjCBlock_ffiVoid_NSRange_bool block) { - _objc_msgSend_110( + set textAttributesForPositiveValues(objc.NSDictionary? value) { + return _objc_msgSend_173( this.pointer, - _sel_enumerateRangesInRange_options_usingBlock_, - range, - opts, - block.pointer); + _sel_setTextAttributesForPositiveValues_, + value?.pointer ?? ffi.nullptr); } - @override - NSIndexSet init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSIndexSet._(_ret, retain: true, release: true); + bool get allowsFloats { + return _objc_msgSend_7(this.pointer, _sel_allowsFloats); } - static NSIndexSet new1() { - final _ret = _objc_msgSend_2(_class_NSIndexSet, _sel_new); - return NSIndexSet._(_ret, retain: false, release: true); + set allowsFloats(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setAllowsFloats_, value); } - static NSIndexSet allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSIndexSet, _sel_allocWithZone_, zone); - return NSIndexSet._(_ret, retain: false, release: true); + objc.NSString get decimalSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_decimalSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSIndexSet alloc() { - final _ret = _objc_msgSend_2(_class_NSIndexSet, _sel_alloc); - return NSIndexSet._(_ret, retain: false, release: true); + set decimalSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setDecimalSeparator_, value.pointer); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSIndexSet, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + bool get alwaysShowsDecimalSeparator { + return _objc_msgSend_7(this.pointer, _sel_alwaysShowsDecimalSeparator); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSIndexSet, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + set alwaysShowsDecimalSeparator(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAlwaysShowsDecimalSeparator_, value); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSIndexSet, _sel_accessInstanceVariablesDirectly); + objc.NSString get currencyDecimalSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencyDecimalSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSIndexSet, _sel_useStoredAccessor); + set currencyDecimalSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrencyDecimalSeparator_, value.pointer); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSIndexSet, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + bool get usesGroupingSeparator { + return _objc_msgSend_7(this.pointer, _sel_usesGroupingSeparator); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSIndexSet, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + set usesGroupingSeparator(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesGroupingSeparator_, value); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSIndexSet, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + objc.NSString get groupingSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_groupingSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSIndexSet, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + set groupingSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setGroupingSeparator_, value.pointer); + } + + objc.NSString? get zeroSymbol { + final _ret = _objc_msgSend_13(this.pointer, _sel_zeroSymbol); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set zeroSymbol(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setZeroSymbol_, value?.pointer ?? ffi.nullptr); + } + + objc.NSDictionary? get textAttributesForZero { + final _ret = _objc_msgSend_65(this.pointer, _sel_textAttributesForZero); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + set textAttributesForZero(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setTextAttributesForZero_, + value?.pointer ?? ffi.nullptr); + } + + objc.NSString get nilSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_nilSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set nilSymbol(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setNilSymbol_, value.pointer); } - static NSObject classForKeyedUnarchiver() { + objc.NSDictionary? get textAttributesForNil { + final _ret = _objc_msgSend_65(this.pointer, _sel_textAttributesForNil); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + set textAttributesForNil(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setTextAttributesForNil_, + value?.pointer ?? ffi.nullptr); + } + + objc.NSString get notANumberSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_notANumberSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set notANumberSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNotANumberSymbol_, value.pointer); + } + + objc.NSDictionary? get textAttributesForNotANumber { final _ret = - _objc_msgSend_2(_class_NSIndexSet, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_65(this.pointer, _sel_textAttributesForNotANumber); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } -} -late final _class_NSIndexSet = objc.getClass("NSIndexSet"); -late final _sel_indexSet = objc.registerName("indexSet"); -late final _sel_indexSetWithIndex_ = objc.registerName("indexSetWithIndex:"); -late final _sel_indexSetWithIndexesInRange_ = - objc.registerName("indexSetWithIndexesInRange:"); -final _objc_msgSend_91 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); -late final _sel_initWithIndexesInRange_ = - objc.registerName("initWithIndexesInRange:"); -late final _sel_initWithIndexSet_ = objc.registerName("initWithIndexSet:"); -final _objc_msgSend_92 = 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_initWithIndex_ = objc.registerName("initWithIndex:"); -late final _sel_isEqualToIndexSet_ = objc.registerName("isEqualToIndexSet:"); -final _objc_msgSend_93 = 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_firstIndex = objc.registerName("firstIndex"); -late final _sel_lastIndex = objc.registerName("lastIndex"); -late final _sel_indexGreaterThanIndex_ = - objc.registerName("indexGreaterThanIndex:"); -final _objc_msgSend_94 = 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_indexLessThanIndex_ = objc.registerName("indexLessThanIndex:"); -late final _sel_indexGreaterThanOrEqualToIndex_ = - objc.registerName("indexGreaterThanOrEqualToIndex:"); -late final _sel_indexLessThanOrEqualToIndex_ = - objc.registerName("indexLessThanOrEqualToIndex:"); -late final _sel_getIndexes_maxCount_inIndexRange_ = - objc.registerName("getIndexes:maxCount:inIndexRange:"); -final _objc_msgSend_95 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_NSRange>)>(); -late final _sel_countOfIndexesInRange_ = - objc.registerName("countOfIndexesInRange:"); -final _objc_msgSend_96 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); -late final _sel_containsIndex_ = objc.registerName("containsIndex:"); -final _objc_msgSend_97 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_containsIndexesInRange_ = - objc.registerName("containsIndexesInRange:"); -final _objc_msgSend_98 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); -late final _sel_containsIndexes_ = objc.registerName("containsIndexes:"); -late final _sel_intersectsIndexesInRange_ = - objc.registerName("intersectsIndexesInRange:"); -void _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_fnPtrTrampoline( - ffi.Pointer block, - int arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( - void Function(int, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + set textAttributesForNotANumber(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setTextAttributesForNotANumber_, + value?.pointer ?? ffi.nullptr); + } -void _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer block, - int arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1); + objc.NSString get positiveInfinitySymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_positiveInfinitySymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -class ObjCBlock_ffiVoid_ffiUnsignedLong_bool extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_ffiUnsignedLong_bool._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); + set positiveInfinitySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositiveInfinitySymbol_, value.pointer); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ffiUnsignedLong_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_ffiUnsignedLong_bool._(pointer, - retain: retain, release: release); + objc.NSDictionary? get textAttributesForPositiveInfinity { + final _ret = + _objc_msgSend_65(this.pointer, _sel_textAttributesForPositiveInfinity); + return _ret.address == 0 + ? null + : objc.NSDictionary.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_ffiUnsignedLong_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + set textAttributesForPositiveInfinity(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, + _sel_setTextAttributesForPositiveInfinity_, + value?.pointer ?? ffi.nullptr); + } - /// 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_ffiUnsignedLong_bool.fromFunction( - void Function(int, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( - (int arg0, ffi.Pointer arg1) => fn(arg0, arg1)))); - static ffi.Pointer? _dartFuncTrampoline; + objc.NSString get negativeInfinitySymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativeInfinitySymbol); + return objc.NSString.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_ffiUnsignedLong_bool.listener( - void Function(int, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( - (int arg0, ffi.Pointer arg1) => fn(arg0, arg1)))); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.UnsignedLong, - ffi.Pointer)>? _dartFuncListenerTrampoline; + set negativeInfinitySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativeInfinitySymbol_, value.pointer); + } - void call(int arg0, ffi.Pointer arg1) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, int, - ffi.Pointer)>()(pointer, arg0, arg1); -} + objc.NSDictionary? get textAttributesForNegativeInfinity { + final _ret = + _objc_msgSend_65(this.pointer, _sel_textAttributesForNegativeInfinity); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } -late final _sel_enumerateIndexesUsingBlock_ = - objc.registerName("enumerateIndexesUsingBlock:"); -final _objc_msgSend_99 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + set textAttributesForNegativeInfinity(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, + _sel_setTextAttributesForNegativeInfinity_, + value?.pointer ?? ffi.nullptr); + } -abstract class NSEnumerationOptions { - static const int NSEnumerationConcurrent = 1; - static const int NSEnumerationReverse = 2; -} + objc.NSString get positivePrefix { + final _ret = _objc_msgSend_12(this.pointer, _sel_positivePrefix); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -late final _sel_enumerateIndexesWithOptions_usingBlock_ = - objc.registerName("enumerateIndexesWithOptions:usingBlock:"); -final _objc_msgSend_100 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_enumerateIndexesInRange_options_usingBlock_ = - objc.registerName("enumerateIndexesInRange:options:usingBlock:"); -final _objc_msgSend_101 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); -bool _ObjCBlock_bool_ffiUnsignedLong_bool_fnPtrTrampoline( - ffi.Pointer block, - int arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction)>()(arg0, arg1); -final _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry = - )>{}; -int _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_ffiUnsignedLong_bool_registerClosure( - bool Function(int, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + set positivePrefix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositivePrefix_, value.pointer); + } -bool _ObjCBlock_bool_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer block, - int arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1); + objc.NSString get positiveSuffix { + final _ret = _objc_msgSend_12(this.pointer, _sel_positiveSuffix); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -class ObjCBlock_bool_ffiUnsignedLong_bool extends objc.ObjCBlockBase { - ObjCBlock_bool_ffiUnsignedLong_bool._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); + set positiveSuffix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPositiveSuffix_, value.pointer); + } - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_ffiUnsignedLong_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_bool_ffiUnsignedLong_bool._(pointer, - retain: retain, release: release); + objc.NSString get negativePrefix { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativePrefix); + return objc.NSString.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_bool_ffiUnsignedLong_bool.fromFunctionPointer( - ffi.Pointer< - ffi - .NativeFunction< - ffi.Bool Function( - ffi.UnsignedLong arg0, ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_bool_ffiUnsignedLong_bool_fnPtrTrampoline, false) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + set negativePrefix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativePrefix_, value.pointer); + } - /// 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_ffiUnsignedLong_bool.fromFunction( - bool Function(int, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function(ffi.Pointer, - ffi.UnsignedLong, ffi.Pointer)>( - _ObjCBlock_bool_ffiUnsignedLong_bool_closureTrampoline, - false) - .cast(), - _ObjCBlock_bool_ffiUnsignedLong_bool_registerClosure( - (int arg0, ffi.Pointer arg1) => fn(arg0, arg1)))); - static ffi.Pointer? _dartFuncTrampoline; + objc.NSString get negativeSuffix { + final _ret = _objc_msgSend_12(this.pointer, _sel_negativeSuffix); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - bool call(int arg0, ffi.Pointer arg1) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer block, - ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() - .asFunction< - bool Function(ffi.Pointer, int, - ffi.Pointer)>()(pointer, arg0, arg1); -} + set negativeSuffix(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setNegativeSuffix_, value.pointer); + } -late final _sel_indexPassingTest_ = objc.registerName("indexPassingTest:"); -final _objc_msgSend_102 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_indexWithOptions_passingTest_ = - objc.registerName("indexWithOptions:passingTest:"); -final _objc_msgSend_103 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_indexInRange_options_passingTest_ = - objc.registerName("indexInRange:options:passingTest:"); -final _objc_msgSend_104 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); -late final _sel_indexesPassingTest_ = objc.registerName("indexesPassingTest:"); -final _objc_msgSend_105 = objc.msgSendPointer + objc.NSString get currencyCode { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencyCode); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set currencyCode(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setCurrencyCode_, value.pointer); + } + + objc.NSString get currencySymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencySymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set currencySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrencySymbol_, value.pointer); + } + + objc.NSString get internationalCurrencySymbol { + final _ret = + _objc_msgSend_12(this.pointer, _sel_internationalCurrencySymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set internationalCurrencySymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setInternationalCurrencySymbol_, value.pointer); + } + + objc.NSString get percentSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_percentSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set percentSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPercentSymbol_, value.pointer); + } + + objc.NSString get perMillSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_perMillSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set perMillSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPerMillSymbol_, value.pointer); + } + + objc.NSString get minusSign { + final _ret = _objc_msgSend_12(this.pointer, _sel_minusSign); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set minusSign(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setMinusSign_, value.pointer); + } + + objc.NSString get plusSign { + final _ret = _objc_msgSend_12(this.pointer, _sel_plusSign); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set plusSign(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setPlusSign_, value.pointer); + } + + objc.NSString get exponentSymbol { + final _ret = _objc_msgSend_12(this.pointer, _sel_exponentSymbol); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set exponentSymbol(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setExponentSymbol_, value.pointer); + } + + int get groupingSize { + return _objc_msgSend_29(this.pointer, _sel_groupingSize); + } + + set groupingSize(int value) { + return _objc_msgSend_125(this.pointer, _sel_setGroupingSize_, value); + } + + int get secondaryGroupingSize { + return _objc_msgSend_29(this.pointer, _sel_secondaryGroupingSize); + } + + set secondaryGroupingSize(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setSecondaryGroupingSize_, value); + } + + objc.NSNumber? get multiplier { + final _ret = _objc_msgSend_174(this.pointer, _sel_multiplier); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + set multiplier(objc.NSNumber? value) { + return _objc_msgSend_175( + this.pointer, _sel_setMultiplier_, value?.pointer ?? ffi.nullptr); + } + + int get formatWidth { + return _objc_msgSend_29(this.pointer, _sel_formatWidth); + } + + set formatWidth(int value) { + return _objc_msgSend_125(this.pointer, _sel_setFormatWidth_, value); + } + + objc.NSString get paddingCharacter { + final _ret = _objc_msgSend_12(this.pointer, _sel_paddingCharacter); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set paddingCharacter(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setPaddingCharacter_, value.pointer); + } + + int get paddingPosition { + return _objc_msgSend_176(this.pointer, _sel_paddingPosition); + } + + set paddingPosition(int value) { + return _objc_msgSend_177(this.pointer, _sel_setPaddingPosition_, value); + } + + int get roundingMode { + return _objc_msgSend_178(this.pointer, _sel_roundingMode); + } + + set roundingMode(int value) { + return _objc_msgSend_179(this.pointer, _sel_setRoundingMode_, value); + } + + objc.NSNumber get roundingIncrement { + final _ret = _objc_msgSend_180(this.pointer, _sel_roundingIncrement); + return objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + set roundingIncrement(objc.NSNumber value) { + return _objc_msgSend_181( + this.pointer, _sel_setRoundingIncrement_, value.pointer); + } + + int get minimumIntegerDigits { + return _objc_msgSend_29(this.pointer, _sel_minimumIntegerDigits); + } + + set minimumIntegerDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumIntegerDigits_, value); + } + + int get maximumIntegerDigits { + return _objc_msgSend_29(this.pointer, _sel_maximumIntegerDigits); + } + + set maximumIntegerDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMaximumIntegerDigits_, value); + } + + int get minimumFractionDigits { + return _objc_msgSend_29(this.pointer, _sel_minimumFractionDigits); + } + + set minimumFractionDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumFractionDigits_, value); + } + + int get maximumFractionDigits { + return _objc_msgSend_29(this.pointer, _sel_maximumFractionDigits); + } + + set maximumFractionDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMaximumFractionDigits_, value); + } + + objc.NSNumber? get minimum { + final _ret = _objc_msgSend_174(this.pointer, _sel_minimum); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + set minimum(objc.NSNumber? value) { + return _objc_msgSend_175( + this.pointer, _sel_setMinimum_, value?.pointer ?? ffi.nullptr); + } + + objc.NSNumber? get maximum { + final _ret = _objc_msgSend_174(this.pointer, _sel_maximum); + return _ret.address == 0 + ? null + : objc.NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + set maximum(objc.NSNumber? value) { + return _objc_msgSend_175( + this.pointer, _sel_setMaximum_, value?.pointer ?? ffi.nullptr); + } + + objc.NSString get currencyGroupingSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_currencyGroupingSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set currencyGroupingSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrencyGroupingSeparator_, value.pointer); + } + + bool get lenient { + return _objc_msgSend_7(this.pointer, _sel_isLenient); + } + + set lenient(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLenient_, value); + } + + bool get usesSignificantDigits { + return _objc_msgSend_7(this.pointer, _sel_usesSignificantDigits); + } + + set usesSignificantDigits(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesSignificantDigits_, value); + } + + int get minimumSignificantDigits { + return _objc_msgSend_29(this.pointer, _sel_minimumSignificantDigits); + } + + set minimumSignificantDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMinimumSignificantDigits_, value); + } + + int get maximumSignificantDigits { + return _objc_msgSend_29(this.pointer, _sel_maximumSignificantDigits); + } + + set maximumSignificantDigits(int value) { + return _objc_msgSend_125( + this.pointer, _sel_setMaximumSignificantDigits_, value); + } + + bool get partialStringValidationEnabled { + return _objc_msgSend_7(this.pointer, _sel_isPartialStringValidationEnabled); + } + + set partialStringValidationEnabled(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setPartialStringValidationEnabled_, value); + } + + bool get hasThousandSeparators { + return _objc_msgSend_7(this.pointer, _sel_hasThousandSeparators); + } + + set hasThousandSeparators(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHasThousandSeparators_, value); + } + + objc.NSString get thousandSeparator { + final _ret = _objc_msgSend_12(this.pointer, _sel_thousandSeparator); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set thousandSeparator(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setThousandSeparator_, value.pointer); + } + + bool get localizesFormat { + return _objc_msgSend_7(this.pointer, _sel_localizesFormat); + } + + set localizesFormat(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setLocalizesFormat_, value); + } + + objc.NSString get format { + final _ret = _objc_msgSend_12(this.pointer, _sel_format); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set format(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setFormat_, value.pointer); + } + + NSAttributedString get attributedStringForZero { + final _ret = _objc_msgSend_63(this.pointer, _sel_attributedStringForZero); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); + } + + set attributedStringForZero(NSAttributedString value) { + return _objc_msgSend_182( + this.pointer, _sel_setAttributedStringForZero_, value.pointer); + } + + NSAttributedString get attributedStringForNil { + final _ret = _objc_msgSend_63(this.pointer, _sel_attributedStringForNil); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); + } + + set attributedStringForNil(NSAttributedString value) { + return _objc_msgSend_182( + this.pointer, _sel_setAttributedStringForNil_, value.pointer); + } + + NSAttributedString get attributedStringForNotANumber { + final _ret = + _objc_msgSend_63(this.pointer, _sel_attributedStringForNotANumber); + return NSAttributedString.castFromPointer(_ret, + retain: true, release: true); + } + + set attributedStringForNotANumber(NSAttributedString value) { + return _objc_msgSend_182( + this.pointer, _sel_setAttributedStringForNotANumber_, value.pointer); + } + + NSDecimalNumberHandler get roundingBehavior { + final _ret = _objc_msgSend_183(this.pointer, _sel_roundingBehavior); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); + } + + set roundingBehavior(NSDecimalNumberHandler value) { + return _objc_msgSend_185( + this.pointer, _sel_setRoundingBehavior_, value.pointer); + } + + @override + NSNumberFormatter init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSNumberFormatter.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumberFormatter new1() { + final _ret = _objc_msgSend_40(_class_NSNumberFormatter, _sel_new); + return NSNumberFormatter.castFromPointer(_ret, + retain: false, release: true); + } + + static NSNumberFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSNumberFormatter, _sel_allocWithZone_, zone); + return NSNumberFormatter.castFromPointer(_ret, + retain: false, release: true); + } + + static NSNumberFormatter alloc() { + final _ret = _objc_msgSend_40(_class_NSNumberFormatter, _sel_alloc); + return NSNumberFormatter.castFromPointer(_ret, + retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSNumberFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSNumberFormatter, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSNumberFormatter, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSNumberFormatter, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSNumberFormatter, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSNumberFormatter, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSNumberFormatter, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSNumberFormatter, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSNumberFormatter, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSNumberFormatter = objc.getClass("NSNumberFormatter"); +late final _sel_stringFromNumber_ = objc.registerName("stringFromNumber:"); +final _objc_msgSend_165 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_indexesWithOptions_passingTest_ = - objc.registerName("indexesWithOptions:passingTest:"); -final _objc_msgSend_106 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_numberFromString_ = objc.registerName("numberFromString:"); +final _objc_msgSend_166 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_indexesInRange_options_passingTest_ = - objc.registerName("indexesInRange:options:passingTest:"); -final _objc_msgSend_107 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSNumberFormatterStyle { + static const int NSNumberFormatterNoStyle = 0; + static const int NSNumberFormatterDecimalStyle = 1; + static const int NSNumberFormatterCurrencyStyle = 2; + static const int NSNumberFormatterPercentStyle = 3; + static const int NSNumberFormatterScientificStyle = 4; + static const int NSNumberFormatterSpellOutStyle = 5; + static const int NSNumberFormatterOrdinalStyle = 6; + static const int NSNumberFormatterCurrencyISOCodeStyle = 8; + static const int NSNumberFormatterCurrencyPluralStyle = 9; + static const int NSNumberFormatterCurrencyAccountingStyle = 10; +} + +late final _sel_localizedStringFromNumber_numberStyle_ = + objc.registerName("localizedStringFromNumber:numberStyle:"); +final _objc_msgSend_167 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Int32)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); -void _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline( - ffi.Pointer block, - _NSRange arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(_NSRange arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(_NSRange, ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( - void Function(_NSRange, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline( - ffi.Pointer block, - _NSRange arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_ffiVoid_NSRange_bool extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSRange_bool._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSRange_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSRange_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSRange_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(_NSRange arg0, ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSRange_bool.fromFunction( - void Function(_NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( - (_NSRange arg0, ffi.Pointer arg1) => - fn(arg0, arg1)))); - 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_NSRange_bool.listener( - void Function(_NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( - (_NSRange arg0, ffi.Pointer arg1) => - fn(arg0, arg1)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, _NSRange, ffi.Pointer)>? - _dartFuncListenerTrampoline; + ffi.Pointer, + int)>(); - void call(_NSRange arg0, ffi.Pointer arg1) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - _NSRange arg0, ffi.Pointer arg1)>>() - .asFunction< - void Function(ffi.Pointer, _NSRange, - ffi.Pointer)>()(pointer, arg0, arg1); +abstract class NSNumberFormatterBehavior { + static const int NSNumberFormatterBehaviorDefault = 0; + static const int NSNumberFormatterBehavior10_0 = 1000; + static const int NSNumberFormatterBehavior10_4 = 1040; } -late final _sel_enumerateRangesUsingBlock_ = - objc.registerName("enumerateRangesUsingBlock:"); -final _objc_msgSend_108 = objc.msgSendPointer +final _objc_msgSend_168 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_169 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.Pointer, ffi.Int32)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_enumerateRangesWithOptions_usingBlock_ = - objc.registerName("enumerateRangesWithOptions:usingBlock:"); -final _objc_msgSend_109 = objc.msgSendPointer + ffi.Pointer, int)>(); +late final _sel_numberStyle = objc.registerName("numberStyle"); +final _objc_msgSend_170 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_enumerateRangesInRange_options_usingBlock_ = - objc.registerName("enumerateRangesInRange:options:usingBlock:"); -final _objc_msgSend_110 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setNumberStyle_ = objc.registerName("setNumberStyle:"); +final _objc_msgSend_171 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); -late final _sel_objectsAtIndexes_ = objc.registerName("objectsAtIndexes:"); -final _objc_msgSend_111 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_generatesDecimalNumbers = + objc.registerName("generatesDecimalNumbers"); +late final _sel_setGeneratesDecimalNumbers_ = + objc.registerName("setGeneratesDecimalNumbers:"); +final _objc_msgSend_172 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_173 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_objectAtIndexedSubscript_ = - objc.registerName("objectAtIndexedSubscript:"); -void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_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); -final _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry = - , int, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( - void Function(ffi.Pointer, int, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = - fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool - extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1, ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.fromFunction( - void Function(NSObject, int, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.listener( - void Function(NSObject, int, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject arg0, int 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, arg1, arg2); -} - -late final _sel_enumerateObjectsUsingBlock_ = - objc.registerName("enumerateObjectsUsingBlock:"); -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_enumerateObjectsWithOptions_usingBlock_ = - objc.registerName("enumerateObjectsWithOptions:usingBlock:"); -final _objc_msgSend_113 = objc.msgSendPointer +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"); +final _objc_msgSend_174 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_enumerateObjectsAtIndexes_options_usingBlock_ = - objc.registerName("enumerateObjectsAtIndexes:options:usingBlock:"); -final _objc_msgSend_114 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setMultiplier_ = objc.registerName("setMultiplier:"); +final _objc_msgSend_175 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() + ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() - .asFunction< - bool Function(ffi.Pointer, int, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry = - , int, ffi.Pointer)>{}; -int _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_registerClosure( - bool Function(ffi.Pointer, int, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; - _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool - extends objc.ObjCBlockBase { - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_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_bool_objcObjCObject_ffiUnsignedLong_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1, ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_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_objcObjCObject_ffiUnsignedLong_bool.fromFunction( - bool Function(NSObject, int, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_registerClosure( - (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => - fn(NSObject._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.Pointer? _dartFuncTrampoline; + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +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:"); - bool call(NSObject arg0, int arg1, ffi.Pointer arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.UnsignedLong arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>()(pointer, arg0.pointer, arg1, arg2); +abstract class NSNumberFormatterPadPosition { + static const int NSNumberFormatterPadBeforePrefix = 0; + static const int NSNumberFormatterPadAfterPrefix = 1; + static const int NSNumberFormatterPadBeforeSuffix = 2; + static const int NSNumberFormatterPadAfterSuffix = 3; } -late final _sel_indexOfObjectPassingTest_ = - objc.registerName("indexOfObjectPassingTest:"); -final _objc_msgSend_115 = objc.msgSendPointer +late final _sel_paddingPosition = objc.registerName("paddingPosition"); +final _objc_msgSend_176 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_indexOfObjectWithOptions_passingTest_ = - objc.registerName("indexOfObjectWithOptions:passingTest:"); -final _objc_msgSend_116 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPaddingPosition_ = objc.registerName("setPaddingPosition:"); +final _objc_msgSend_177 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_indexOfObjectAtIndexes_options_passingTest_ = - objc.registerName("indexOfObjectAtIndexes:options:passingTest:"); -final _objc_msgSend_117 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSNumberFormatterRoundingMode { + static const int NSNumberFormatterRoundCeiling = 0; + static const int NSNumberFormatterRoundFloor = 1; + static const int NSNumberFormatterRoundDown = 2; + static const int NSNumberFormatterRoundUp = 3; + static const int NSNumberFormatterRoundHalfEven = 4; + static const int NSNumberFormatterRoundHalfDown = 5; + static const int NSNumberFormatterRoundHalfUp = 6; +} + +late final _sel_roundingMode = objc.registerName("roundingMode"); +final _objc_msgSend_178 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_indexesOfObjectsPassingTest_ = - objc.registerName("indexesOfObjectsPassingTest:"); -final _objc_msgSend_118 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setRoundingMode_ = objc.registerName("setRoundingMode:"); +final _objc_msgSend_179 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_indexesOfObjectsWithOptions_passingTest_ = - objc.registerName("indexesOfObjectsWithOptions:passingTest:"); -final _objc_msgSend_119 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_roundingIncrement = objc.registerName("roundingIncrement"); +final _objc_msgSend_180 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_indexesOfObjectsAtIndexes_options_passingTest_ = - objc.registerName("indexesOfObjectsAtIndexes:options:passingTest:"); -final _objc_msgSend_120 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setRoundingIncrement_ = + objc.registerName("setRoundingIncrement:"); +final _objc_msgSend_181 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer)>()(arg0, arg1); -final _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_registerClosure( - int Function(ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistryIndex; - _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry[ - id] = fn; - return ffi.Pointer.fromAddress(id); -} + 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_182 = 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_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:"); -int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry[ - block.ref.target.address]!(arg0, arg1); +class NSDecimalNumberHandler extends objc.NSObject { + NSDecimalNumberHandler._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -class ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject - extends objc.ObjCBlockBase { - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(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); - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._(pointer, - retain: retain, release: release); + /// 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_0( + obj.pointer, _sel_isKindOfClass_, _class_NSDecimalNumberHandler); } - /// 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_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline, - 0) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + static NSDecimalNumberHandler getDefaultDecimalNumberHandler() { + final _ret = _objc_msgSend_183( + _class_NSDecimalNumberHandler, _sel_defaultDecimalNumberHandler); + return NSDecimalNumberHandler.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. - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunction( - int Function(NSObject, NSObject) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline, 0) - .cast(), - _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(NSObject._(arg0, retain: true, release: true), NSObject._(arg1, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; + NSDecimalNumberHandler + initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( + int roundingMode, + int scale, + bool exact, + bool overflow, + bool underflow, + bool divideByZero) { + final _ret = _objc_msgSend_184( + this.pointer, + _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, + roundingMode, + scale, + exact, + overflow, + underflow, + divideByZero); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); + } - int call(NSObject arg0, NSObject arg1) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, arg0.pointer, arg1.pointer); -} + static NSDecimalNumberHandler + decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( + int roundingMode, + int scale, + bool exact, + bool overflow, + bool underflow, + bool divideByZero) { + final _ret = _objc_msgSend_184( + _class_NSDecimalNumberHandler, + _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, + roundingMode, + scale, + exact, + overflow, + underflow, + divideByZero); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); + } -abstract class NSComparisonResult { - static const int NSOrderedAscending = -1; - static const int NSOrderedSame = 0; - static const int NSOrderedDescending = 1; -} + @override + NSDecimalNumberHandler init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: true, release: true); + } -late final _sel_sortedArrayUsingComparator_ = - objc.registerName("sortedArrayUsingComparator:"); -final _objc_msgSend_121 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + static NSDecimalNumberHandler new1() { + final _ret = _objc_msgSend_40(_class_NSDecimalNumberHandler, _sel_new); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); + } -abstract class NSSortOptions { - static const int NSSortConcurrent = 1; - static const int NSSortStable = 16; + static NSDecimalNumberHandler allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSDecimalNumberHandler, _sel_allocWithZone_, zone); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); + } + + static NSDecimalNumberHandler alloc() { + final _ret = _objc_msgSend_40(_class_NSDecimalNumberHandler, _sel_alloc); + return NSDecimalNumberHandler.castFromPointer(_ret, + retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSDecimalNumberHandler, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSDecimalNumberHandler, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSDecimalNumberHandler, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSDecimalNumberHandler, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSDecimalNumberHandler, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSDecimalNumberHandler, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSDecimalNumberHandler, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSDecimalNumberHandler, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSDecimalNumberHandler, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } } -late final _sel_sortedArrayWithOptions_usingComparator_ = - objc.registerName("sortedArrayWithOptions:usingComparator:"); -final _objc_msgSend_122 = objc.msgSendPointer +late final _class_NSDecimalNumberHandler = + objc.getClass("NSDecimalNumberHandler"); +late final _sel_defaultDecimalNumberHandler = + objc.registerName("defaultDecimalNumberHandler"); +final _objc_msgSend_183 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); + ffi.Pointer, ffi.Pointer)>(); -abstract class NSBinarySearchingOptions { - static const int NSBinarySearchingFirstEqual = 256; - static const int NSBinarySearchingLastEqual = 512; - static const int NSBinarySearchingInsertionIndex = 1024; +abstract class NSRoundingMode { + static const int NSRoundPlain = 0; + static const int NSRoundDown = 1; + static const int NSRoundUp = 2; + static const int NSRoundBankers = 3; } -late final _sel_indexOfObject_inSortedRange_options_usingComparator_ = - objc.registerName("indexOfObject:inSortedRange:options:usingComparator:"); -final _objc_msgSend_123 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); -late final _sel_array = objc.registerName("array"); -late final _sel_arrayWithObject_ = objc.registerName("arrayWithObject:"); -final _objc_msgSend_124 = 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_arrayWithObjects_count_ = - objc.registerName("arrayWithObjects:count:"); -late final _sel_arrayWithObjects_ = objc.registerName("arrayWithObjects:"); -late final _sel_arrayWithArray_ = objc.registerName("arrayWithArray:"); -final _objc_msgSend_125 = 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_initWithObjects_ = objc.registerName("initWithObjects:"); -late final _sel_initWithArray_ = objc.registerName("initWithArray:"); -late final _sel_initWithArray_copyItems_ = - objc.registerName("initWithArray:copyItems:"); -final _objc_msgSend_126 = objc.msgSendPointer +late final _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = + objc.registerName( + "initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); +final _objc_msgSend_184 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Int32, + ffi.Short, + ffi.Bool, + ffi.Bool, + ffi.Bool, ffi.Bool)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + int, + int, + bool, + bool, + bool, bool)>(); -late final _sel_initWithContentsOfURL_error_ = - objc.registerName("initWithContentsOfURL:error:"); -final _objc_msgSend_127 = objc.msgSendPointer +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_185 = 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( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); -late final _sel_arrayWithContentsOfURL_error_ = - objc.registerName("arrayWithContentsOfURL:error:"); + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -abstract class NSOrderedCollectionDifferenceCalculationOptions { - static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = - 1; - static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = - 2; - static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; +abstract class NSLocaleLanguageDirection { + static const int NSLocaleLanguageDirectionUnknown = 0; + static const int NSLocaleLanguageDirectionLeftToRight = 1; + static const int NSLocaleLanguageDirectionRightToLeft = 2; + static const int NSLocaleLanguageDirectionTopToBottom = 3; + static const int NSLocaleLanguageDirectionBottomToTop = 4; } -bool _ObjCBlock_bool_objcObjCObject_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); -final _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_bool_objcObjCObject_objcObjCObject_registerClosure( - bool Function( - ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistryIndex; - _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +class NSScanner extends objc.NSObject { + NSScanner._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry[ - block.ref.target.address]!(arg0, arg1); + /// Constructs a [NSScanner] that points to the same underlying object as [other]. + NSScanner.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class ObjCBlock_bool_objcObjCObject_objcObjCObject extends objc.ObjCBlockBase { - ObjCBlock_bool_objcObjCObject_objcObjCObject._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); + /// 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 a block that wraps the given raw block pointer. - static ObjCBlock_bool_objcObjCObject_objcObjCObject castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_bool_objcObjCObject_objcObjCObject._(pointer, - 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); } - /// 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_objcObjCObject_objcObjCObject.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_objcObjCObject_fnPtrTrampoline, - false) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + objc.NSString get string { + final _ret = _objc_msgSend_12(this.pointer, _sel_string); + return objc.NSString.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. - ObjCBlock_bool_objcObjCObject_objcObjCObject.fromFunction( - bool Function(NSObject, NSObject) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_objcObjCObject_objcObjCObject_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSObject._(arg0, retain: true, release: true), NSObject._(arg1, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; + int get scanLocation { + return _objc_msgSend_29(this.pointer, _sel_scanLocation); + } - bool call(NSObject arg0, NSObject 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); -} + set scanLocation(int value) { + return _objc_msgSend_125(this.pointer, _sel_setScanLocation_, value); + } -late final _sel_differenceFromArray_withOptions_usingEquivalenceTest_ = - objc.registerName("differenceFromArray:withOptions:usingEquivalenceTest:"); -final _objc_msgSend_128 = objc.msgSendPointer + objc.NSCharacterSet? get charactersToBeSkipped { + final _ret = _objc_msgSend_186(this.pointer, _sel_charactersToBeSkipped); + return _ret.address == 0 + ? null + : objc.NSCharacterSet.castFromPointer(_ret, + retain: true, release: true); + } + + set charactersToBeSkipped(objc.NSCharacterSet? value) { + return _objc_msgSend_187(this.pointer, _sel_setCharactersToBeSkipped_, + value?.pointer ?? ffi.nullptr); + } + + bool get caseSensitive { + return _objc_msgSend_7(this.pointer, _sel_caseSensitive); + } + + set caseSensitive(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setCaseSensitive_, value); + } + + objc.NSObject? get locale { + final _ret = _objc_msgSend_66(this.pointer, _sel_locale); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + set locale(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setLocale_, value?.pointer ?? ffi.nullptr); + } + + NSScanner initWithString_(objc.NSString string) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithString_, string.pointer); + return NSScanner.castFromPointer(_ret, retain: true, release: true); + } + + bool scanInt_(ffi.Pointer result) { + return _objc_msgSend_189(this.pointer, _sel_scanInt_, result); + } + + bool scanInteger_(ffi.Pointer result) { + return _objc_msgSend_190(this.pointer, _sel_scanInteger_, result); + } + + bool scanLongLong_(ffi.Pointer result) { + return _objc_msgSend_191(this.pointer, _sel_scanLongLong_, result); + } + + bool scanUnsignedLongLong_(ffi.Pointer result) { + return _objc_msgSend_192(this.pointer, _sel_scanUnsignedLongLong_, result); + } + + bool scanFloat_(ffi.Pointer result) { + return _objc_msgSend_193(this.pointer, _sel_scanFloat_, result); + } + + bool scanDouble_(ffi.Pointer result) { + return _objc_msgSend_194(this.pointer, _sel_scanDouble_, result); + } + + bool scanHexInt_(ffi.Pointer result) { + return _objc_msgSend_195(this.pointer, _sel_scanHexInt_, result); + } + + bool scanHexLongLong_(ffi.Pointer result) { + return _objc_msgSend_192(this.pointer, _sel_scanHexLongLong_, result); + } + + bool scanHexFloat_(ffi.Pointer result) { + return _objc_msgSend_193(this.pointer, _sel_scanHexFloat_, result); + } + + bool scanHexDouble_(ffi.Pointer result) { + return _objc_msgSend_194(this.pointer, _sel_scanHexDouble_, result); + } + + bool scanString_intoString_( + objc.NSString string, ffi.Pointer> result) { + return _objc_msgSend_196( + this.pointer, _sel_scanString_intoString_, string.pointer, result); + } + + bool scanCharactersFromSet_intoString_(objc.NSCharacterSet set, + ffi.Pointer> result) { + return _objc_msgSend_197(this.pointer, + _sel_scanCharactersFromSet_intoString_, set.pointer, result); + } + + bool scanUpToString_intoString_( + objc.NSString string, ffi.Pointer> result) { + return _objc_msgSend_196( + this.pointer, _sel_scanUpToString_intoString_, string.pointer, result); + } + + bool scanUpToCharactersFromSet_intoString_(objc.NSCharacterSet set, + ffi.Pointer> result) { + return _objc_msgSend_197(this.pointer, + _sel_scanUpToCharactersFromSet_intoString_, set.pointer, result); + } + + bool get atEnd { + return _objc_msgSend_7(this.pointer, _sel_isAtEnd); + } + + static NSScanner scannerWithString_(objc.NSString string) { + final _ret = _objc_msgSend_35( + _class_NSScanner, _sel_scannerWithString_, string.pointer); + return NSScanner.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject localizedScannerWithString_(objc.NSString string) { + final _ret = _objc_msgSend_35( + _class_NSScanner, _sel_localizedScannerWithString_, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool scanDecimal_(ffi.Pointer dcm) { + return _objc_msgSend_198(this.pointer, _sel_scanDecimal_, dcm); + } + + @override + NSScanner init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScanner.castFromPointer(_ret, retain: true, release: true); + } + + static NSScanner new1() { + final _ret = _objc_msgSend_40(_class_NSScanner, _sel_new); + return NSScanner.castFromPointer(_ret, retain: false, release: true); + } + + static NSScanner allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSScanner, _sel_allocWithZone_, zone); + return NSScanner.castFromPointer(_ret, retain: false, release: true); + } + + static NSScanner alloc() { + final _ret = _objc_msgSend_40(_class_NSScanner, _sel_alloc); + return NSScanner.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScanner, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScanner, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSScanner, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSScanner, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScanner, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScanner, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScanner, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSScanner, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSScanner, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_186 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_differenceFromArray_withOptions_ = - objc.registerName("differenceFromArray:withOptions:"); -final _objc_msgSend_129 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCharactersToBeSkipped_ = + objc.registerName("setCharactersToBeSkipped:"); +final _objc_msgSend_187 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_differenceFromArray_ = - objc.registerName("differenceFromArray:"); -late final _sel_arrayByApplyingDifference_ = - objc.registerName("arrayByApplyingDifference:"); -final _objc_msgSend_130 = objc.msgSendPointer + 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_188 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_getObjects_ = objc.registerName("getObjects:"); -final _objc_msgSend_131 = objc.msgSendPointer +late final _sel_scanInt_ = objc.registerName("scanInt:"); +final _objc_msgSend_189 = 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_arrayWithContentsOfFile_ = - objc.registerName("arrayWithContentsOfFile:"); -final _objc_msgSend_132 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanInteger_ = objc.registerName("scanInteger:"); +final _objc_msgSend_190 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_arrayWithContentsOfURL_ = - objc.registerName("arrayWithContentsOfURL:"); -final _objc_msgSend_133 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanLongLong_ = objc.registerName("scanLongLong:"); +final _objc_msgSend_191 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithContentsOfFile_ = - objc.registerName("initWithContentsOfFile:"); -late final _sel_initWithContentsOfURL_ = - objc.registerName("initWithContentsOfURL:"); -late final _sel_writeToURL_atomically_ = - objc.registerName("writeToURL:atomically:"); -final _objc_msgSend_134 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanUnsignedLongLong_ = + objc.registerName("scanUnsignedLongLong:"); +final _objc_msgSend_192 = 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, - bool)>(); -late final _sel_pathsMatchingExtensions_ = - objc.registerName("pathsMatchingExtensions:"); -late final _sel_valueForKey_ = objc.registerName("valueForKey:"); -late final _sel_setValue_forKey_ = objc.registerName("setValue:forKey:"); -final _objc_msgSend_135 = 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)>(); - -abstract class NSKeyValueObservingOptions { - static const int NSKeyValueObservingOptionNew = 1; - static const int NSKeyValueObservingOptionOld = 2; - static const int NSKeyValueObservingOptionInitial = 4; - static const int NSKeyValueObservingOptionPrior = 8; -} - -late final _sel_addObserver_toObjectsAtIndexes_forKeyPath_options_context_ = - objc.registerName( - "addObserver:toObjectsAtIndexes:forKeyPath:options:context:"); -final _objc_msgSend_136 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_scanFloat_ = objc.registerName("scanFloat:"); +final _objc_msgSend_193 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_context_ = objc - .registerName("removeObserver:fromObjectsAtIndexes:forKeyPath:context:"); -final _objc_msgSend_137 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanDouble_ = objc.registerName("scanDouble:"); +final _objc_msgSend_194 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_removeObserver_fromObjectsAtIndexes_forKeyPath_ = - objc.registerName("removeObserver:fromObjectsAtIndexes:forKeyPath:"); -final _objc_msgSend_138 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_scanHexInt_ = objc.registerName("scanHexInt:"); +final _objc_msgSend_195 = 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( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_addObserver_forKeyPath_options_context_ = - objc.registerName("addObserver:forKeyPath:options:context:"); -final _objc_msgSend_139 = 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_196 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() + ffi.Pointer>)>>() .asFunction< - void Function( + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_removeObserver_forKeyPath_context_ = - objc.registerName("removeObserver:forKeyPath:context:"); -final _objc_msgSend_140 = objc.msgSendPointer + ffi.Pointer>)>(); +late final _sel_scanCharactersFromSet_intoString_ = + objc.registerName("scanCharactersFromSet:intoString:"); +final _objc_msgSend_197 = 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, - ffi.Pointer)>(); -late final _sel_removeObserver_forKeyPath_ = - objc.registerName("removeObserver:forKeyPath:"); -final _objc_msgSend_141 = objc.msgSendPointer + 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_198 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_sortedArrayUsingDescriptors_ = - objc.registerName("sortedArrayUsingDescriptors:"); + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -class NSPredicate extends NSObject { - NSPredicate._(ffi.Pointer pointer, +class NSException extends objc.NSObject { + NSException._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSPredicate] that points to the same underlying object as [other]. - static NSPredicate castFrom(T other) { - return NSPredicate._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSException] that points to the same underlying object as [other]. + NSException.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSPredicate] that wraps the given raw object pointer. - static NSPredicate castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPredicate._(other, retain: retain, release: release); - } + /// Constructs a [NSException] that wraps the given raw object pointer. + NSException.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSPredicate]. + /// Returns whether [obj] is an instance of [NSException]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSPredicate); + obj.pointer, _sel_isKindOfClass_, _class_NSException); } - static NSPredicate predicateWithFormat_argumentArray_( - NSString predicateFormat, NSArray? arguments) { - final _ret = _objc_msgSend_142( - _class_NSPredicate, - _sel_predicateWithFormat_argumentArray_, - predicateFormat.pointer, - arguments?.pointer ?? ffi.nullptr); - return NSPredicate._(_ret, retain: true, release: true); + static NSException exceptionWithName_reason_userInfo_( + objc.NSString name, objc.NSString? reason, objc.NSDictionary? userInfo) { + final _ret = _objc_msgSend_199( + _class_NSException, + _sel_exceptionWithName_reason_userInfo_, + name.pointer, + reason?.pointer ?? ffi.nullptr, + userInfo?.pointer ?? ffi.nullptr); + return NSException.castFromPointer(_ret, retain: true, release: true); } - static NSPredicate predicateWithFormat_(NSString predicateFormat) { - final _ret = _objc_msgSend_143( - _class_NSPredicate, _sel_predicateWithFormat_, predicateFormat.pointer); - return NSPredicate._(_ret, retain: true, release: true); + NSException initWithName_reason_userInfo_(objc.NSString aName, + objc.NSString? aReason, objc.NSDictionary? aUserInfo) { + final _ret = _objc_msgSend_200( + this.pointer, + _sel_initWithName_reason_userInfo_, + aName.pointer, + aReason?.pointer ?? ffi.nullptr, + aUserInfo?.pointer ?? ffi.nullptr); + return NSException.castFromPointer(_ret, retain: true, release: true); } - static NSPredicate predicateWithFormat_arguments_( - NSString predicateFormat, ffi.Pointer<__va_list_tag> argList) { - final _ret = _objc_msgSend_144(_class_NSPredicate, - _sel_predicateWithFormat_arguments_, predicateFormat.pointer, argList); - return NSPredicate._(_ret, retain: true, release: true); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSPredicate? predicateFromMetadataQueryString_(NSString queryString) { - final _ret = _objc_msgSend_145(_class_NSPredicate, - _sel_predicateFromMetadataQueryString_, queryString.pointer); + objc.NSString? get reason { + final _ret = _objc_msgSend_13(this.pointer, _sel_reason); return _ret.address == 0 ? null - : NSPredicate._(_ret, retain: true, release: true); - } - - static NSPredicate predicateWithValue_(bool value) { - final _ret = - _objc_msgSend_146(_class_NSPredicate, _sel_predicateWithValue_, value); - return NSPredicate._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSPredicate predicateWithBlock_( - ObjCBlock_bool_objcObjCObject_NSDictionary block) { - final _ret = _objc_msgSend_216( - _class_NSPredicate, _sel_predicateWithBlock_, block.pointer); - return NSPredicate._(_ret, retain: true, release: true); + objc.NSDictionary? get userInfo { + final _ret = _objc_msgSend_65(this.pointer, _sel_userInfo); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSString get predicateFormat { - final _ret = _objc_msgSend_21(this.pointer, _sel_predicateFormat); - return NSString._(_ret, retain: true, release: true); + objc.NSArray get callStackReturnAddresses { + final _ret = _objc_msgSend_6(this.pointer, _sel_callStackReturnAddresses); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSPredicate predicateWithSubstitutionVariables_(NSDictionary variables) { - final _ret = _objc_msgSend_159(this.pointer, - _sel_predicateWithSubstitutionVariables_, variables.pointer); - return NSPredicate._(_ret, retain: true, release: true); + objc.NSArray get callStackSymbols { + final _ret = _objc_msgSend_6(this.pointer, _sel_callStackSymbols); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool evaluateWithObject_(NSObject? object) { - return _objc_msgSend_217( - this.pointer, _sel_evaluateWithObject_, object?.pointer ?? ffi.nullptr); + void raise() { + _objc_msgSend_82(this.pointer, _sel_raise); } - bool evaluateWithObject_substitutionVariables_( - NSObject? object, NSDictionary? bindings) { - return _objc_msgSend_218( - this.pointer, - _sel_evaluateWithObject_substitutionVariables_, - object?.pointer ?? ffi.nullptr, - bindings?.pointer ?? ffi.nullptr); + static void raise_format_(objc.NSString name, objc.NSString format) { + _objc_msgSend_201( + _class_NSException, _sel_raise_format_, name.pointer, format.pointer); } - void allowEvaluation() { - _objc_msgSend_1(this.pointer, _sel_allowEvaluation); + static void raise_format_arguments_(objc.NSString name, objc.NSString format, + ffi.Pointer<__va_list_tag> argList) { + _objc_msgSend_202(_class_NSException, _sel_raise_format_arguments_, + name.pointer, format.pointer, argList); } @override - NSPredicate init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSPredicate._(_ret, retain: true, release: true); + NSException init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSException.castFromPointer(_ret, retain: true, release: true); } - static NSPredicate new1() { - final _ret = _objc_msgSend_2(_class_NSPredicate, _sel_new); - return NSPredicate._(_ret, retain: false, release: true); + static NSException new1() { + final _ret = _objc_msgSend_40(_class_NSException, _sel_new); + return NSException.castFromPointer(_ret, retain: false, release: true); } - static NSPredicate allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSPredicate, _sel_allocWithZone_, zone); - return NSPredicate._(_ret, retain: false, release: true); + static NSException allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSException, _sel_allocWithZone_, zone); + return NSException.castFromPointer(_ret, retain: false, release: true); } - static NSPredicate alloc() { - final _ret = _objc_msgSend_2(_class_NSPredicate, _sel_alloc); - return NSPredicate._(_ret, retain: false, release: true); + static NSException alloc() { + final _ret = _objc_msgSend_40(_class_NSException, _sel_alloc); + return NSException.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSPredicate, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSException, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSPredicate, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSException, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSPredicate, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSException, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSPredicate, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSException, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSPredicate, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSException, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSPredicate, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSException, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSPredicate, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSException, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSPredicate, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSException, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSPredicate, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSException, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSPredicate = objc.getClass("NSPredicate"); -late final _sel_predicateWithFormat_argumentArray_ = - objc.registerName("predicateWithFormat:argumentArray:"); -final _objc_msgSend_142 = objc.msgSendPointer +late final _class_NSException = objc.getClass("NSException"); +late final _sel_exceptionWithName_reason_userInfo_ = + objc.registerName("exceptionWithName:reason:userInfo:"); +final _objc_msgSend_199 = 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_predicateWithFormat_ = - objc.registerName("predicateWithFormat:"); -final _objc_msgSend_143 = objc.msgSendPointer +late final _sel_initWithName_reason_userInfo_ = + objc.registerName("initWithName:reason:userInfo:"); +final _objc_msgSend_200 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -final class __va_list_tag extends ffi.Struct { - @ffi.UnsignedInt() - external int gp_offset; - - @ffi.UnsignedInt() - external int fp_offset; - - external ffi.Pointer overflow_arg_area; - - external ffi.Pointer reg_save_area; -} - -late final _sel_predicateWithFormat_arguments_ = - objc.registerName("predicateWithFormat:arguments:"); -final _objc_msgSend_144 = objc.msgSendPointer + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_reason = objc.registerName("reason"); +late final _sel_userInfo = objc.registerName("userInfo"); +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_201 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>() + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); -late final _sel_predicateFromMetadataQueryString_ = - objc.registerName("predicateFromMetadataQueryString:"); -final _objc_msgSend_145 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_raise_format_arguments_ = + objc.registerName("raise:format:arguments:"); +final _objc_msgSend_202 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_predicateWithValue_ = objc.registerName("predicateWithValue:"); -final _objc_msgSend_146 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, bool)>(); -bool _ObjCBlock_bool_objcObjCObject_NSDictionary_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); -final _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_bool_objcObjCObject_NSDictionary_registerClosure( - bool Function( - ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistryIndex; - _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_objcObjCObject_NSDictionary_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_bool_objcObjCObject_NSDictionary extends objc.ObjCBlockBase { - ObjCBlock_bool_objcObjCObject_NSDictionary._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_bool_objcObjCObject_NSDictionary castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_bool_objcObjCObject_NSDictionary._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_objcObjCObject_NSDictionary.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_NSDictionary_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_objcObjCObject_NSDictionary.fromFunction( - bool Function(NSObject?, NSDictionary?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_NSDictionary_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_objcObjCObject_NSDictionary_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => - fn(arg0.address == 0 ? null : NSObject._(arg0, retain: true, release: true), arg1.address == 0 ? null : NSDictionary._(arg1, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject? arg0, NSDictionary? 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 ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr); -} + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); -class NSDictionary extends NSObject { - NSDictionary._(ffi.Pointer pointer, +class NSRunLoop extends objc.NSObject { + NSRunLoop._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSDictionary] that points to the same underlying object as [other]. - static NSDictionary castFrom(T other) { - return NSDictionary._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSRunLoop] that points to the same underlying object as [other]. + NSRunLoop.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSDictionary] that wraps the given raw object pointer. - static NSDictionary castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDictionary._(other, retain: retain, release: release); - } + /// Constructs a [NSRunLoop] that wraps the given raw object pointer. + NSRunLoop.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSDictionary]. + /// Returns whether [obj] is an instance of [NSRunLoop]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSDictionary); - } - - int get count { - return _objc_msgSend_10(this.pointer, _sel_count); - } - - NSObject? objectForKey_(NSObject aKey) { - final _ret = - _objc_msgSend_16(this.pointer, _sel_objectForKey_, aKey.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSEnumerator keyEnumerator() { - final _ret = _objc_msgSend_77(this.pointer, _sel_keyEnumerator); - return NSEnumerator._(_ret, retain: true, release: true); + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSRunLoop); } - @override - NSDictionary init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSDictionary._(_ret, retain: true, release: true); + static NSRunLoop getCurrentRunLoop() { + final _ret = _objc_msgSend_203(_class_NSRunLoop, _sel_currentRunLoop); + return NSRunLoop.castFromPointer(_ret, retain: true, release: true); } - NSDictionary initWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _objc_msgSend_147( - this.pointer, _sel_initWithObjects_forKeys_count_, objects, keys, cnt); - return NSDictionary._(_ret, retain: true, release: true); + static NSRunLoop getMainRunLoop() { + final _ret = _objc_msgSend_203(_class_NSRunLoop, _sel_mainRunLoop); + return NSRunLoop.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); + objc.NSString? get currentMode { + final _ret = _objc_msgSend_13(this.pointer, _sel_currentMode); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSArray get allKeys { - final _ret = _objc_msgSend_85(this.pointer, _sel_allKeys); - return NSArray._(_ret, retain: true, release: true); + ffi.Pointer<__CFRunLoop> getCFRunLoop() { + return _objc_msgSend_204(this.pointer, _sel_getCFRunLoop); } - NSArray allKeysForObject_(NSObject anObject) { - final _ret = _objc_msgSend_67( - this.pointer, _sel_allKeysForObject_, anObject.pointer); - return NSArray._(_ret, retain: true, release: true); + void addTimer_forMode_(NSTimer timer, objc.NSString mode) { + _objc_msgSend_213( + this.pointer, _sel_addTimer_forMode_, timer.pointer, mode.pointer); } - NSArray get allValues { - final _ret = _objc_msgSend_85(this.pointer, _sel_allValues); - return NSArray._(_ret, retain: true, release: true); + void addPort_forMode_(NSPort aPort, objc.NSString mode) { + _objc_msgSend_244( + this.pointer, _sel_addPort_forMode_, aPort.pointer, mode.pointer); } - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); + void removePort_forMode_(NSPort aPort, objc.NSString mode) { + _objc_msgSend_244( + this.pointer, _sel_removePort_forMode_, aPort.pointer, mode.pointer); } - NSString get descriptionInStringsFileFormat { + objc.NSDate? limitDateForMode_(objc.NSString mode) { final _ret = - _objc_msgSend_21(this.pointer, _sel_descriptionInStringsFileFormat); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _objc_msgSend_70(this.pointer, _sel_descriptionWithLocale_, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_indent_(NSObject? locale, int level) { - final _ret = _objc_msgSend_71( - this.pointer, - _sel_descriptionWithLocale_indent_, - locale?.pointer ?? ffi.nullptr, - level); - return NSString._(_ret, retain: true, release: true); - } - - bool isEqualToDictionary_(NSDictionary otherDictionary) { - return _objc_msgSend_148( - this.pointer, _sel_isEqualToDictionary_, otherDictionary.pointer); - } - - NSEnumerator objectEnumerator() { - final _ret = _objc_msgSend_77(this.pointer, _sel_objectEnumerator); - return NSEnumerator._(_ret, retain: true, release: true); - } - - NSArray objectsForKeys_notFoundMarker_(NSArray keys, NSObject marker) { - final _ret = _objc_msgSend_149(this.pointer, - _sel_objectsForKeys_notFoundMarker_, keys.pointer, marker.pointer); - return NSArray._(_ret, retain: true, release: true); + _objc_msgSend_93(this.pointer, _sel_limitDateForMode_, mode.pointer); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - bool writeToURL_error_( - NSURL url, ffi.Pointer> error) { - return _objc_msgSend_89( - this.pointer, _sel_writeToURL_error_, url.pointer, error); + void acceptInputForMode_beforeDate_( + objc.NSString mode, objc.NSDate limitDate) { + _objc_msgSend_245(this.pointer, _sel_acceptInputForMode_beforeDate_, + mode.pointer, limitDate.pointer); } - NSArray keysSortedByValueUsingSelector_( - ffi.Pointer comparator) { - final _ret = _objc_msgSend_80( - this.pointer, _sel_keysSortedByValueUsingSelector_, comparator); - return NSArray._(_ret, retain: true, release: true); + void run() { + _objc_msgSend_82(this.pointer, _sel_run); } - void getObjects_andKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int count) { - _objc_msgSend_150( - this.pointer, _sel_getObjects_andKeys_count_, objects, keys, count); + void runUntilDate_(objc.NSDate limitDate) { + _objc_msgSend_246(this.pointer, _sel_runUntilDate_, limitDate.pointer); } - NSObject? objectForKeyedSubscript_(NSObject key) { - final _ret = _objc_msgSend_16( - this.pointer, _sel_objectForKeyedSubscript_, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + bool runMode_beforeDate_(objc.NSString mode, objc.NSDate limitDate) { + return _objc_msgSend_247(this.pointer, _sel_runMode_beforeDate_, + mode.pointer, limitDate.pointer); } - void enumerateKeysAndObjectsUsingBlock_( - ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool block) { - _objc_msgSend_151( - this.pointer, _sel_enumerateKeysAndObjectsUsingBlock_, block.pointer); + void configureAsServer() { + _objc_msgSend_82(this.pointer, _sel_configureAsServer); } - void enumerateKeysAndObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool block) { - _objc_msgSend_152( - this.pointer, - _sel_enumerateKeysAndObjectsWithOptions_usingBlock_, - opts, - block.pointer); + void performInModes_block_(objc.NSArray modes, ObjCBlock_ffiVoid block) { + _objc_msgSend_248( + this.pointer, _sel_performInModes_block_, modes.pointer, block.pointer); } - NSArray keysSortedByValueUsingComparator_( - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - final _ret = _objc_msgSend_121( - this.pointer, _sel_keysSortedByValueUsingComparator_, cmptr.pointer); - return NSArray._(_ret, retain: true, release: true); + void performBlock_(ObjCBlock_ffiVoid block) { + _objc_msgSend_249(this.pointer, _sel_performBlock_, block.pointer); } - NSArray keysSortedByValueWithOptions_usingComparator_(int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - final _ret = _objc_msgSend_122( + void performSelector_target_argument_order_modes_( + ffi.Pointer aSelector, + objc.NSObject target, + objc.NSObject? arg, + int order, + objc.NSArray modes) { + _objc_msgSend_250( this.pointer, - _sel_keysSortedByValueWithOptions_usingComparator_, - opts, - cmptr.pointer); - return NSArray._(_ret, retain: true, release: true); + _sel_performSelector_target_argument_order_modes_, + aSelector, + target.pointer, + arg?.pointer ?? ffi.nullptr, + order, + modes.pointer); } - NSObject keysOfEntriesPassingTest_( - ObjCBlock_bool_objcObjCObject_objcObjCObject_bool predicate) { - final _ret = _objc_msgSend_153( - this.pointer, _sel_keysOfEntriesPassingTest_, predicate.pointer); - return NSObject._(_ret, retain: true, release: true); + void cancelPerformSelector_target_argument_( + ffi.Pointer aSelector, + objc.NSObject target, + objc.NSObject? arg) { + _objc_msgSend_251(this.pointer, _sel_cancelPerformSelector_target_argument_, + aSelector, target.pointer, arg?.pointer ?? ffi.nullptr); } - NSObject keysOfEntriesWithOptions_passingTest_( - int opts, ObjCBlock_bool_objcObjCObject_objcObjCObject_bool predicate) { - final _ret = _objc_msgSend_154(this.pointer, - _sel_keysOfEntriesWithOptions_passingTest_, opts, predicate.pointer); - return NSObject._(_ret, retain: true, release: true); + void cancelPerformSelectorsWithTarget_(objc.NSObject target) { + _objc_msgSend_49( + this.pointer, _sel_cancelPerformSelectorsWithTarget_, target.pointer); } - void getObjects_andKeys_(ffi.Pointer> objects, - ffi.Pointer> keys) { - _objc_msgSend_155(this.pointer, _sel_getObjects_andKeys_, objects, keys); + @override + NSRunLoop init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSRunLoop.castFromPointer(_ret, retain: true, release: true); } - static NSDictionary? dictionaryWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_156( - _class_NSDictionary, _sel_dictionaryWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + static NSRunLoop new1() { + final _ret = _objc_msgSend_40(_class_NSRunLoop, _sel_new); + return NSRunLoop.castFromPointer(_ret, retain: false, release: true); } - static NSDictionary? dictionaryWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_157( - _class_NSDictionary, _sel_dictionaryWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + static NSRunLoop allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSRunLoop, _sel_allocWithZone_, zone); + return NSRunLoop.castFromPointer(_ret, retain: false, release: true); } - NSDictionary? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_156( - this.pointer, _sel_initWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + static NSRunLoop alloc() { + final _ret = _objc_msgSend_40(_class_NSRunLoop, _sel_alloc); + return NSRunLoop.castFromPointer(_ret, retain: false, release: true); } - NSDictionary? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_157( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSRunLoop, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { - return _objc_msgSend_26(this.pointer, _sel_writeToFile_atomically_, - path.pointer, useAuxiliaryFile); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSRunLoop, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - bool writeToURL_atomically_(NSURL url, bool atomically) { - return _objc_msgSend_134( - this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSRunLoop, _sel_accessInstanceVariablesDirectly); } - static NSDictionary dictionary() { - final _ret = _objc_msgSend_2(_class_NSDictionary, _sel_dictionary); - return NSDictionary._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSRunLoop, _sel_useStoredAccessor); } - static NSDictionary dictionaryWithObject_forKey_( - NSObject object, NSObject key) { - final _ret = _objc_msgSend_158(_class_NSDictionary, - _sel_dictionaryWithObject_forKey_, object.pointer, key.pointer); - return NSDictionary._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSRunLoop, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSDictionary dictionaryWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _objc_msgSend_147(_class_NSDictionary, - _sel_dictionaryWithObjects_forKeys_count_, objects, keys, cnt); - return NSDictionary._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSRunLoop, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSDictionary dictionaryWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _objc_msgSend_124(_class_NSDictionary, - _sel_dictionaryWithObjectsAndKeys_, firstObject.pointer); - return NSDictionary._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSRunLoop, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSDictionary dictionaryWithDictionary_(NSDictionary dict) { - final _ret = _objc_msgSend_159( - _class_NSDictionary, _sel_dictionaryWithDictionary_, dict.pointer); - return NSDictionary._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSRunLoop, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSDictionary dictionaryWithObjects_forKeys_( - NSArray objects, NSArray keys) { - final _ret = _objc_msgSend_160(_class_NSDictionary, - _sel_dictionaryWithObjects_forKeys_, objects.pointer, keys.pointer); - return NSDictionary._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSRunLoop, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjectsAndKeys_, firstObject.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } +late final _class_NSRunLoop = objc.getClass("NSRunLoop"); +late final _sel_currentRunLoop = objc.registerName("currentRunLoop"); +final _objc_msgSend_203 = 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"); - NSDictionary initWithDictionary_(NSDictionary otherDictionary) { - final _ret = _objc_msgSend_159( - this.pointer, _sel_initWithDictionary_, otherDictionary.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } +final class __CFRunLoop extends ffi.Opaque {} - NSDictionary initWithDictionary_copyItems_( - NSDictionary otherDictionary, bool flag) { - final _ret = _objc_msgSend_161(this.pointer, - _sel_initWithDictionary_copyItems_, otherDictionary.pointer, flag); - return NSDictionary._(_ret, retain: false, release: true); - } +late final _sel_getCFRunLoop = objc.registerName("getCFRunLoop"); +final _objc_msgSend_204 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer<__CFRunLoop> Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer<__CFRunLoop> Function( + ffi.Pointer, ffi.Pointer)>(); - NSDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { - final _ret = _objc_msgSend_160(this.pointer, _sel_initWithObjects_forKeys_, - objects.pointer, keys.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } +class NSTimer extends objc.NSObject { + NSTimer._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSDictionary? initWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_162( - this.pointer, _sel_initWithContentsOfURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } + /// Constructs a [NSTimer] that points to the same underlying object as [other]. + NSTimer.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - static NSDictionary? dictionaryWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_162(_class_NSDictionary, - _sel_dictionaryWithContentsOfURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, 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); - static NSObject sharedKeySetForKeys_(NSArray keys) { - final _ret = _objc_msgSend_125( - _class_NSDictionary, _sel_sharedKeySetForKeys_, keys.pointer); - return NSObject._(_ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSTimer]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTimer); } - int countByEnumeratingWithState_objects_count_( - ffi.Pointer state, - ffi.Pointer> buffer, - int len) { - return _objc_msgSend_163(this.pointer, - _sel_countByEnumeratingWithState_objects_count_, state, buffer, len); + static NSTimer timerWithTimeInterval_invocation_repeats_( + double ti, objc.NSInvocation invocation, bool yesOrNo) { + final _ret = _objc_msgSend_205( + _class_NSTimer, + _sel_timerWithTimeInterval_invocation_repeats_, + ti, + invocation.pointer, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - int fileSize() { - return _objc_msgSend_164(this.pointer, _sel_fileSize); + static NSTimer scheduledTimerWithTimeInterval_invocation_repeats_( + double ti, objc.NSInvocation invocation, bool yesOrNo) { + final _ret = _objc_msgSend_205( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_invocation_repeats_, + ti, + invocation.pointer, + yesOrNo); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - NSDate? fileModificationDate() { - final _ret = _objc_msgSend_183(this.pointer, _sel_fileModificationDate); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); + static NSTimer timerWithTimeInterval_target_selector_userInfo_repeats_( + double ti, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? userInfo, + bool yesOrNo) { + final _ret = _objc_msgSend_206( + _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); } - NSString? fileType() { - final _ret = _objc_msgSend_44(this.pointer, _sel_fileType); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static NSTimer + scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_( + double ti, + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? userInfo, + bool yesOrNo) { + final _ret = _objc_msgSend_206( + _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); } - int filePosixPermissions() { - return _objc_msgSend_10(this.pointer, _sel_filePosixPermissions); + static NSTimer timerWithTimeInterval_repeats_block_( + double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { + final _ret = _objc_msgSend_207( + _class_NSTimer, + _sel_timerWithTimeInterval_repeats_block_, + interval, + repeats, + block.pointer); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - NSString? fileOwnerAccountName() { - final _ret = _objc_msgSend_44(this.pointer, _sel_fileOwnerAccountName); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static NSTimer scheduledTimerWithTimeInterval_repeats_block_( + double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { + final _ret = _objc_msgSend_207( + _class_NSTimer, + _sel_scheduledTimerWithTimeInterval_repeats_block_, + interval, + repeats, + block.pointer); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - NSString? fileGroupOwnerAccountName() { - final _ret = _objc_msgSend_44(this.pointer, _sel_fileGroupOwnerAccountName); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + NSTimer initWithFireDate_interval_repeats_block_(objc.NSDate date, + double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { + final _ret = _objc_msgSend_208( + this.pointer, + _sel_initWithFireDate_interval_repeats_block_, + date.pointer, + interval, + repeats, + block.pointer); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - int fileSystemNumber() { - return _objc_msgSend_83(this.pointer, _sel_fileSystemNumber); + NSTimer initWithFireDate_interval_target_selector_userInfo_repeats_( + objc.NSDate date, + double ti, + objc.NSObject t, + ffi.Pointer s, + objc.NSObject? ui, + bool rep) { + final _ret = _objc_msgSend_209( + 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); } - int fileSystemFileNumber() { - return _objc_msgSend_10(this.pointer, _sel_fileSystemFileNumber); + void fire() { + _objc_msgSend_82(this.pointer, _sel_fire); } - bool fileExtensionHidden() { - return _objc_msgSend_12(this.pointer, _sel_fileExtensionHidden); + objc.NSDate get fireDate { + final _ret = _objc_msgSend_210(this.pointer, _sel_fireDate); + return objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - int fileHFSCreatorCode() { - return _objc_msgSend_214(this.pointer, _sel_fileHFSCreatorCode); + set fireDate(objc.NSDate value) { + return _objc_msgSend_211(this.pointer, _sel_setFireDate_, value.pointer); } - int fileHFSTypeCode() { - return _objc_msgSend_214(this.pointer, _sel_fileHFSTypeCode); + double get timeInterval { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeInterval) + : _objc_msgSend_115(this.pointer, _sel_timeInterval); } - bool fileIsImmutable() { - return _objc_msgSend_12(this.pointer, _sel_fileIsImmutable); + double get tolerance { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_tolerance) + : _objc_msgSend_115(this.pointer, _sel_tolerance); } - bool fileIsAppendOnly() { - return _objc_msgSend_12(this.pointer, _sel_fileIsAppendOnly); + set tolerance(double value) { + return _objc_msgSend_212(this.pointer, _sel_setTolerance_, value); } - NSDate? fileCreationDate() { - final _ret = _objc_msgSend_183(this.pointer, _sel_fileCreationDate); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); + void invalidate() { + _objc_msgSend_82(this.pointer, _sel_invalidate); } - NSNumber? fileOwnerAccountID() { - final _ret = _objc_msgSend_215(this.pointer, _sel_fileOwnerAccountID); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); + bool get valid { + return _objc_msgSend_7(this.pointer, _sel_isValid); } - NSNumber? fileGroupOwnerAccountID() { - final _ret = _objc_msgSend_215(this.pointer, _sel_fileGroupOwnerAccountID); + objc.NSObject? get userInfo { + final _ret = _objc_msgSend_66(this.pointer, _sel_userInfo); return _ret.address == 0 ? null - : NSNumber._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } @override - NSObject? valueForKey_(NSString key) { - final _ret = _objc_msgSend_38(this.pointer, _sel_valueForKey_, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + NSTimer init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTimer.castFromPointer(_ret, retain: true, release: true); } - static NSDictionary new1() { - final _ret = _objc_msgSend_2(_class_NSDictionary, _sel_new); - return NSDictionary._(_ret, retain: false, release: true); + static NSTimer new1() { + final _ret = _objc_msgSend_40(_class_NSTimer, _sel_new); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } - static NSDictionary allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSDictionary, _sel_allocWithZone_, zone); - return NSDictionary._(_ret, retain: false, release: true); + static NSTimer allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSTimer, _sel_allocWithZone_, zone); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } - static NSDictionary alloc() { - final _ret = _objc_msgSend_2(_class_NSDictionary, _sel_alloc); - return NSDictionary._(_ret, retain: false, release: true); + static NSTimer alloc() { + final _ret = _objc_msgSend_40(_class_NSTimer, _sel_alloc); + return NSTimer.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSDictionary, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTimer, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSDictionary, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTimer, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSDictionary, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSTimer, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSDictionary, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSTimer, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSDictionary, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTimer, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSDictionary, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSTimer, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSDictionary, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTimer, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSDictionary, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSTimer, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSDictionary, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSTimer, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSDictionary = objc.getClass("NSDictionary"); -late final _sel_objectForKey_ = objc.registerName("objectForKey:"); -late final _sel_keyEnumerator = objc.registerName("keyEnumerator"); -late final _sel_initWithObjects_forKeys_count_ = - objc.registerName("initWithObjects:forKeys:count:"); -final _objc_msgSend_147 = objc.msgSendPointer +late final _class_NSTimer = objc.getClass("NSTimer"); +late final _sel_timerWithTimeInterval_invocation_repeats_ = + objc.registerName("timerWithTimeInterval:invocation:repeats:"); +final _objc_msgSend_205 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.UnsignedLong)>>() + ffi.Double, + ffi.Pointer, + ffi.Bool)>>() .asFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - int)>(); -late final _sel_allKeys = objc.registerName("allKeys"); -late final _sel_allKeysForObject_ = objc.registerName("allKeysForObject:"); -late final _sel_allValues = objc.registerName("allValues"); -late final _sel_descriptionInStringsFileFormat = - objc.registerName("descriptionInStringsFileFormat"); -late final _sel_isEqualToDictionary_ = - objc.registerName("isEqualToDictionary:"); -final _objc_msgSend_148 = objc.msgSendPointer + 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_206 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_objectsForKeys_notFoundMarker_ = - objc.registerName("objectsForKeys:notFoundMarker:"); -final _objc_msgSend_149 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( + ffi.Double, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_keysSortedByValueUsingSelector_ = - objc.registerName("keysSortedByValueUsingSelector:"); -late final _sel_getObjects_andKeys_count_ = - objc.registerName("getObjects:andKeys:count:"); -final _objc_msgSend_150 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - ffi.UnsignedLong)>>() - .asFunction< - void Function( + double, ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>, - int)>(); -late final _sel_objectForKeyedSubscript_ = - objc.registerName("objectForKeyedSubscript:"); -void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => + 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, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureRegistry = - , - ffi.Pointer, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_registerClosure( - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureRegistry[id] = - fn; + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSTimer_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSTimer_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSTimer_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_NSTimer_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSTimer_closureRegistry[block.ref.target.address]!(arg0); -class ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool - extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) +class ObjCBlock_ffiVoid_NSTimer extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSTimer._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool castFromPointer( + static ObjCBlock_ffiVoid_NSTimer castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool._(pointer, + return ObjCBlock_ffiVoid_NSTimer._(pointer, retain: retain, release: release); } @@ -10759,22 +9248,16 @@ class ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool /// This block must be invoked by native 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_objcObjCObject_bool.fromFunctionPointer( + ObjCBlock_ffiVoid_NSTimer.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> + ffi.Void Function(ffi.Pointer arg0)>> ptr) : this._(objc.newBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; @@ -10784,22 +9267,17 @@ class ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool /// This block must be invoked by native 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_objcObjCObject_bool.fromFunction( - void Function(NSObject, NSObject, ffi.Pointer) fn) + ObjCBlock_ffiVoid_NSTimer.fromFunction(void Function(NSTimer) fn) : this._(objc.newBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline) + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, retain: true, release: true), NSObject._(arg1, retain: true, release: true), arg2)))); + _ObjCBlock_ffiVoid_NSTimer_registerClosure( + (ffi.Pointer arg0) => fn( + NSTimer.castFromPointer(arg0, + retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -10811,1670 +9289,1258 @@ class ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool.listener( - void Function(NSObject, NSObject, ffi.Pointer) fn) + ObjCBlock_ffiVoid_NSTimer.listener(void Function(NSTimer) fn) : this._(objc.newBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline) + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, retain: true, release: true), NSObject._(arg1, retain: true, release: true), arg2)))); + _ObjCBlock_ffiVoid_NSTimer_registerClosure( + (ffi.Pointer arg0) => fn( + NSTimer.castFromPointer(arg0, + retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, arg0.pointer, arg1.pointer, arg2); -} - -late final _sel_enumerateKeysAndObjectsUsingBlock_ = - objc.registerName("enumerateKeysAndObjectsUsingBlock:"); -final _objc_msgSend_151 = 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_enumerateKeysAndObjectsWithOptions_usingBlock_ = - objc.registerName("enumerateKeysAndObjectsWithOptions:usingBlock:"); -final _objc_msgSend_152 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_keysSortedByValueUsingComparator_ = - objc.registerName("keysSortedByValueUsingComparator:"); -late final _sel_keysSortedByValueWithOptions_usingComparator_ = - objc.registerName("keysSortedByValueWithOptions:usingComparator:"); -bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_registerClosure( - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureRegistryIndex; - _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_bool_objcObjCObject_objcObjCObject_bool - extends objc.ObjCBlockBase { - ObjCBlock_bool_objcObjCObject_objcObjCObject_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_bool_objcObjCObject_objcObjCObject_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_bool_objcObjCObject_objcObjCObject_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_objcObjCObject_objcObjCObject_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_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_objcObjCObject_objcObjCObject_bool.fromFunction( - bool Function(NSObject, NSObject, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_registerClosure((ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn(NSObject._(arg0, retain: true, release: true), NSObject._(arg1, retain: true, release: true), arg2)))); - static ffi.Pointer? _dartFuncTrampoline; + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - bool call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, arg0.pointer, arg1.pointer, arg2); + void call(NSTimer arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer)>()(pointer, arg0.pointer); } -late final _sel_keysOfEntriesPassingTest_ = - objc.registerName("keysOfEntriesPassingTest:"); -final _objc_msgSend_153 = 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_keysOfEntriesWithOptions_passingTest_ = - objc.registerName("keysOfEntriesWithOptions:passingTest:"); -final _objc_msgSend_154 = objc.msgSendPointer +late final _sel_timerWithTimeInterval_repeats_block_ = + objc.registerName("timerWithTimeInterval:repeats:block:"); +final _objc_msgSend_207 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, + ffi.Double, + ffi.Bool, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - int, + double, + bool, ffi.Pointer)>(); -late final _sel_getObjects_andKeys_ = objc.registerName("getObjects:andKeys:"); -final _objc_msgSend_155 = objc.msgSendPointer +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_208 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>() + ffi.Pointer, + ffi.Double, + ffi.Bool, + ffi.Pointer)>>() .asFunction< - void Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); -late final _sel_dictionaryWithContentsOfFile_ = - objc.registerName("dictionaryWithContentsOfFile:"); -final _objc_msgSend_156 = objc.msgSendPointer + 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_209 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_dictionaryWithContentsOfURL_ = - objc.registerName("dictionaryWithContentsOfURL:"); -final _objc_msgSend_157 = 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_dictionary = objc.registerName("dictionary"); -late final _sel_dictionaryWithObject_forKey_ = - objc.registerName("dictionaryWithObject:forKey:"); -final _objc_msgSend_158 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( + ffi.Double, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_dictionaryWithObjects_forKeys_count_ = - objc.registerName("dictionaryWithObjects:forKeys:count:"); -late final _sel_dictionaryWithObjectsAndKeys_ = - objc.registerName("dictionaryWithObjectsAndKeys:"); -late final _sel_dictionaryWithDictionary_ = - objc.registerName("dictionaryWithDictionary:"); -final _objc_msgSend_159 = objc.msgSendPointer + 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_210 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_dictionaryWithObjects_forKeys_ = - objc.registerName("dictionaryWithObjects:forKeys:"); -final _objc_msgSend_160 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setFireDate_ = objc.registerName("setFireDate:"); +final _objc_msgSend_211 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_initWithObjectsAndKeys_ = - objc.registerName("initWithObjectsAndKeys:"); -late final _sel_initWithDictionary_ = objc.registerName("initWithDictionary:"); -late final _sel_initWithDictionary_copyItems_ = - objc.registerName("initWithDictionary:copyItems:"); -final _objc_msgSend_161 = objc.msgSendPointer + 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_212 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_initWithObjects_forKeys_ = - objc.registerName("initWithObjects:forKeys:"); -final _objc_msgSend_162 = objc.msgSendPointer + 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_213 = 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>)>(); -late final _sel_dictionaryWithContentsOfURL_error_ = - objc.registerName("dictionaryWithContentsOfURL:error:"); -late final _sel_sharedKeySetForKeys_ = - objc.registerName("sharedKeySetForKeys:"); - -final class NSFastEnumerationState extends ffi.Struct { - @ffi.UnsignedLong() - external int state; - - external ffi.Pointer> itemsPtr; - - external ffi.Pointer mutationsPtr; + ffi.Pointer)>(); - @ffi.Array.multi([5]) - external ffi.Array extra; -} +class NSPort extends objc.NSObject { + NSPort._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -late final _sel_countByEnumeratingWithState_objects_count_ = - objc.registerName("countByEnumeratingWithState:objects:count:"); -final _objc_msgSend_163 = 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)>(); -late final _sel_fileSize = objc.registerName("fileSize"); -final _objc_msgSend_164 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLongLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); + /// Constructs a [NSPort] that points to the same underlying object as [other]. + NSPort.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -class NSDate extends NSObject { - NSDate._(ffi.Pointer pointer, + /// Constructs a [NSPort] that wraps the given raw object pointer. + NSPort.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSDate] that points to the same underlying object as [other]. - static NSDate castFrom(T other) { - return NSDate._(other.pointer, retain: true, release: true); - } + : this._(other, retain: retain, release: release); - /// Returns a [NSDate] that wraps the given raw object pointer. - static NSDate castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDate._(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); } - /// Returns whether [obj] is an instance of [NSDate]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSDate); + static NSPort port() { + final _ret = _objc_msgSend_214(_class_NSPort, _sel_port); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - double get timeIntervalSinceReferenceDate { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret( - this.pointer, _sel_timeIntervalSinceReferenceDate) - : _objc_msgSend_165(this.pointer, _sel_timeIntervalSinceReferenceDate); + void invalidate() { + _objc_msgSend_82(this.pointer, _sel_invalidate); } - @override - NSDate init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSDate._(_ret, retain: true, release: true); + bool get valid { + return _objc_msgSend_7(this.pointer, _sel_isValid); } - NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _objc_msgSend_166( - this.pointer, _sel_initWithTimeIntervalSinceReferenceDate_, ti); - return NSDate._(_ret, retain: true, release: true); + void setDelegate_(objc.NSObject? anObject) { + _objc_msgSend_215( + this.pointer, _sel_setDelegate_, anObject?.pointer ?? ffi.nullptr); } - NSDate? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); + objc.NSObject? delegate() { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); return _ret.address == 0 ? null - : NSDate._(_ret, retain: true, release: true); - } - - double timeIntervalSinceDate_(NSDate anotherDate) { - return objc.useMsgSendVariants - ? _objc_msgSend_167Fpret( - this.pointer, _sel_timeIntervalSinceDate_, anotherDate.pointer) - : _objc_msgSend_167( - this.pointer, _sel_timeIntervalSinceDate_, anotherDate.pointer); - } - - double get timeIntervalSinceNow { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_timeIntervalSinceNow) - : _objc_msgSend_165(this.pointer, _sel_timeIntervalSinceNow); - } - - double get timeIntervalSince1970 { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_timeIntervalSince1970) - : _objc_msgSend_165(this.pointer, _sel_timeIntervalSince1970); - } - - NSObject addTimeInterval_(double seconds) { - final _ret = - _objc_msgSend_166(this.pointer, _sel_addTimeInterval_, seconds); - return NSObject._(_ret, retain: true, release: true); - } - - NSDate dateByAddingTimeInterval_(double ti) { - final _ret = - _objc_msgSend_166(this.pointer, _sel_dateByAddingTimeInterval_, ti); - return NSDate._(_ret, retain: true, release: true); - } - - NSDate earlierDate_(NSDate anotherDate) { - final _ret = - _objc_msgSend_168(this.pointer, _sel_earlierDate_, anotherDate.pointer); - return NSDate._(_ret, retain: true, release: true); - } - - NSDate laterDate_(NSDate anotherDate) { - final _ret = - _objc_msgSend_168(this.pointer, _sel_laterDate_, anotherDate.pointer); - return NSDate._(_ret, retain: true, release: true); - } - - int compare_(NSDate other) { - return _objc_msgSend_169(this.pointer, _sel_compare_, other.pointer); - } - - bool isEqualToDate_(NSDate otherDate) { - return _objc_msgSend_170( - this.pointer, _sel_isEqualToDate_, otherDate.pointer); - } - - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _objc_msgSend_70(this.pointer, _sel_descriptionWithLocale_, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } - - static NSDate date() { - final _ret = _objc_msgSend_2(_class_NSDate, _sel_date); - return NSDate._(_ret, retain: true, release: true); - } - - static NSDate dateWithTimeIntervalSinceNow_(double secs) { - final _ret = _objc_msgSend_166( - _class_NSDate, _sel_dateWithTimeIntervalSinceNow_, secs); - return NSDate._(_ret, retain: true, release: true); - } - - static NSDate dateWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _objc_msgSend_166( - _class_NSDate, _sel_dateWithTimeIntervalSinceReferenceDate_, ti); - return NSDate._(_ret, retain: true, release: true); - } - - static NSDate dateWithTimeIntervalSince1970_(double secs) { - final _ret = _objc_msgSend_166( - _class_NSDate, _sel_dateWithTimeIntervalSince1970_, secs); - return NSDate._(_ret, retain: true, release: true); - } - - static NSDate dateWithTimeInterval_sinceDate_( - double secsToBeAdded, NSDate date) { - final _ret = _objc_msgSend_171(_class_NSDate, - _sel_dateWithTimeInterval_sinceDate_, secsToBeAdded, date.pointer); - return NSDate._(_ret, retain: true, release: true); - } - - static NSDate getDistantFuture() { - final _ret = _objc_msgSend_172(_class_NSDate, _sel_distantFuture); - return NSDate._(_ret, retain: true, release: true); - } - - static NSDate getDistantPast() { - final _ret = _objc_msgSend_172(_class_NSDate, _sel_distantPast); - return NSDate._(_ret, retain: true, release: true); - } - - static NSDate getNow() { - final _ret = _objc_msgSend_172(_class_NSDate, _sel_now); - return NSDate._(_ret, retain: true, release: true); - } - - NSDate initWithTimeIntervalSinceNow_(double secs) { - final _ret = _objc_msgSend_166( - this.pointer, _sel_initWithTimeIntervalSinceNow_, secs); - return NSDate._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSDate initWithTimeIntervalSince1970_(double secs) { - final _ret = _objc_msgSend_166( - this.pointer, _sel_initWithTimeIntervalSince1970_, secs); - return NSDate._(_ret, retain: true, release: true); + void scheduleInRunLoop_forMode_(NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + runLoop.pointer, mode.pointer); } - NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate date) { - final _ret = _objc_msgSend_171(this.pointer, - _sel_initWithTimeInterval_sinceDate_, secsToBeAdded, date.pointer); - return NSDate._(_ret, retain: true, release: true); + void removeFromRunLoop_forMode_(NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_removeFromRunLoop_forMode_, + runLoop.pointer, mode.pointer); } - static NSObject? dateWithNaturalLanguageString_locale_( - NSString string, NSObject? locale) { - final _ret = _objc_msgSend_173( - _class_NSDate, - _sel_dateWithNaturalLanguageString_locale_, - string.pointer, - locale?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + int get reservedSpaceLength { + return _objc_msgSend_29(this.pointer, _sel_reservedSpaceLength); } - static NSObject? dateWithNaturalLanguageString_(NSString string) { - final _ret = _objc_msgSend_38( - _class_NSDate, _sel_dateWithNaturalLanguageString_, string.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + bool sendBeforeDate_components_from_reserved_( + objc.NSDate limitDate, + objc.NSMutableArray? components, + NSPort? receivePort, + int headerSpaceReserved) { + return _objc_msgSend_217( + this.pointer, + _sel_sendBeforeDate_components_from_reserved_, + limitDate.pointer, + components?.pointer ?? ffi.nullptr, + receivePort?.pointer ?? ffi.nullptr, + headerSpaceReserved); } - static NSObject dateWithString_(NSString aString) { - final _ret = - _objc_msgSend_31(_class_NSDate, _sel_dateWithString_, aString.pointer); - return NSObject._(_ret, retain: true, release: true); + bool sendBeforeDate_msgid_components_from_reserved_( + objc.NSDate limitDate, + int msgID, + objc.NSMutableArray? components, + NSPort? receivePort, + int headerSpaceReserved) { + return _objc_msgSend_218( + this.pointer, + _sel_sendBeforeDate_msgid_components_from_reserved_, + limitDate.pointer, + msgID, + components?.pointer ?? ffi.nullptr, + receivePort?.pointer ?? ffi.nullptr, + headerSpaceReserved); } - NSCalendarDate dateWithCalendarFormat_timeZone_( - NSString? format, NSTimeZone? aTimeZone) { - final _ret = _objc_msgSend_212( - this.pointer, - _sel_dateWithCalendarFormat_timeZone_, - format?.pointer ?? ffi.nullptr, - aTimeZone?.pointer ?? ffi.nullptr); - return NSCalendarDate._(_ret, retain: true, release: true); + void addConnection_toRunLoop_forMode_( + NSConnection conn, NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_243(this.pointer, _sel_addConnection_toRunLoop_forMode_, + conn.pointer, runLoop.pointer, mode.pointer); } - NSString? descriptionWithCalendarFormat_timeZone_locale_( - NSString? format, NSTimeZone? aTimeZone, NSObject? locale) { - final _ret = _objc_msgSend_213( - this.pointer, - _sel_descriptionWithCalendarFormat_timeZone_locale_, - format?.pointer ?? ffi.nullptr, - aTimeZone?.pointer ?? ffi.nullptr, - locale?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + void removeConnection_fromRunLoop_forMode_( + NSConnection conn, NSRunLoop runLoop, objc.NSString mode) { + _objc_msgSend_243(this.pointer, _sel_removeConnection_fromRunLoop_forMode_, + conn.pointer, runLoop.pointer, mode.pointer); } - NSObject? initWithString_(NSString description) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithString_, description.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + @override + NSPort init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - static NSDate new1() { - final _ret = _objc_msgSend_2(_class_NSDate, _sel_new); - return NSDate._(_ret, retain: false, release: true); + static NSPort new1() { + final _ret = _objc_msgSend_40(_class_NSPort, _sel_new); + return NSPort.castFromPointer(_ret, retain: false, release: true); } - static NSDate allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSDate, _sel_allocWithZone_, zone); - return NSDate._(_ret, retain: false, release: true); + static NSPort allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSPort, _sel_allocWithZone_, zone); + return NSPort.castFromPointer(_ret, retain: false, release: true); } - static NSDate alloc() { - final _ret = _objc_msgSend_2(_class_NSDate, _sel_alloc); - return NSDate._(_ret, retain: false, release: true); + static NSPort alloc() { + final _ret = _objc_msgSend_40(_class_NSPort, _sel_alloc); + return NSPort.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSDate, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPort, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSDate, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPort, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSDate, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7(_class_NSPort, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSDate, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSPort, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSDate, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPort, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64( - _class_NSDate, _sel_automaticallyNotifiesObserversForKey_, key.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51( + _class_NSPort, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSDate, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPort, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { + static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = - _objc_msgSend_85(_class_NSDate, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + _objc_msgSend_6(_class_NSPort, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSDate, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSPort, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSDate = objc.getClass("NSDate"); -late final _sel_timeIntervalSinceReferenceDate = - objc.registerName("timeIntervalSinceReferenceDate"); -final _objc_msgSend_165 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - double Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_165Fpret = objc.msgSendFpretPointer +late final _class_NSPort = objc.getClass("NSPort"); +late final _sel_port = objc.registerName("port"); +final _objc_msgSend_214 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Double Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - double Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithTimeIntervalSinceReferenceDate_ = - objc.registerName("initWithTimeIntervalSinceReferenceDate:"); -final _objc_msgSend_166 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, double)>(); -late final _sel_timeIntervalSinceDate_ = - objc.registerName("timeIntervalSinceDate:"); -final _objc_msgSend_167 = objc.msgSendPointer +late final _sel_setDelegate_ = objc.registerName("setDelegate:"); +final _objc_msgSend_215 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Double Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - double Function(ffi.Pointer, + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_167Fpret = objc.msgSendFpretPointer +late final _sel_delegate = objc.registerName("delegate"); +late final _sel_scheduleInRunLoop_forMode_ = + objc.registerName("scheduleInRunLoop:forMode:"); +final _objc_msgSend_216 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Double Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - double Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_timeIntervalSinceNow = - objc.registerName("timeIntervalSinceNow"); -late final _sel_timeIntervalSince1970 = - objc.registerName("timeIntervalSince1970"); -late final _sel_addTimeInterval_ = objc.registerName("addTimeInterval:"); -late final _sel_dateByAddingTimeInterval_ = - objc.registerName("dateByAddingTimeInterval:"); -late final _sel_earlierDate_ = objc.registerName("earlierDate:"); -final _objc_msgSend_168 = objc.msgSendPointer + 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_217 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, 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_laterDate_ = objc.registerName("laterDate:"); -late final _sel_compare_ = objc.registerName("compare:"); -final _objc_msgSend_169 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_isEqualToDate_ = objc.registerName("isEqualToDate:"); -final _objc_msgSend_170 = objc.msgSendPointer + 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_218 = 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_date = objc.registerName("date"); -late final _sel_dateWithTimeIntervalSinceNow_ = - objc.registerName("dateWithTimeIntervalSinceNow:"); -late final _sel_dateWithTimeIntervalSinceReferenceDate_ = - objc.registerName("dateWithTimeIntervalSinceReferenceDate:"); -late final _sel_dateWithTimeIntervalSince1970_ = - objc.registerName("dateWithTimeIntervalSince1970:"); -late final _sel_dateWithTimeInterval_sinceDate_ = - objc.registerName("dateWithTimeInterval:sinceDate:"); -final _objc_msgSend_171 = 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)>(); -late final _sel_distantFuture = objc.registerName("distantFuture"); -final _objc_msgSend_172 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_distantPast = objc.registerName("distantPast"); -late final _sel_now = objc.registerName("now"); -late final _sel_initWithTimeIntervalSinceNow_ = - objc.registerName("initWithTimeIntervalSinceNow:"); -late final _sel_initWithTimeIntervalSince1970_ = - objc.registerName("initWithTimeIntervalSince1970:"); -late final _sel_initWithTimeInterval_sinceDate_ = - objc.registerName("initWithTimeInterval:sinceDate:"); -late final _sel_dateWithNaturalLanguageString_locale_ = - objc.registerName("dateWithNaturalLanguageString:locale:"); -final _objc_msgSend_173 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( + ffi.UnsignedLong, ffi.Pointer, - ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function( + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_dateWithNaturalLanguageString_ = - objc.registerName("dateWithNaturalLanguageString:"); -late final _sel_dateWithString_ = objc.registerName("dateWithString:"); + int, + ffi.Pointer, + ffi.Pointer, + int)>(); -class NSCalendarDate extends NSDate { - NSCalendarDate._(ffi.Pointer pointer, +class NSConnection extends objc.NSObject { + NSConnection._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSCalendarDate] that points to the same underlying object as [other]. - static NSCalendarDate castFrom(T other) { - return NSCalendarDate._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSConnection] that points to the same underlying object as [other]. + NSConnection.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSCalendarDate] that wraps the given raw object pointer. - static NSCalendarDate castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCalendarDate._(other, retain: retain, release: release); - } + /// 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 [NSCalendarDate]. + /// Returns whether [obj] is an instance of [NSConnection]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSCalendarDate); + obj.pointer, _sel_isKindOfClass_, _class_NSConnection); } - static NSObject calendarDate() { - final _ret = _objc_msgSend_2(_class_NSCalendarDate, _sel_calendarDate); - return NSObject._(_ret, retain: true, release: true); + objc.NSDictionary get statistics { + final _ret = _objc_msgSend_112(this.pointer, _sel_statistics); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSObject? dateWithString_calendarFormat_locale_( - NSString description, NSString format, NSObject? locale) { - final _ret = _objc_msgSend_174( - _class_NSCalendarDate, - _sel_dateWithString_calendarFormat_locale_, - description.pointer, - format.pointer, - locale?.pointer ?? ffi.nullptr); + static objc.NSArray allConnections() { + final _ret = _objc_msgSend_6(_class_NSConnection, _sel_allConnections); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSConnection defaultConnection() { + final _ret = _objc_msgSend_219(_class_NSConnection, _sel_defaultConnection); + return NSConnection.castFromPointer(_ret, retain: true, release: true); + } + + static NSConnection? connectionWithRegisteredName_host_( + objc.NSString name, objc.NSString? hostName) { + final _ret = _objc_msgSend_220( + _class_NSConnection, + _sel_connectionWithRegisteredName_host_, + name.pointer, + hostName?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - static NSObject? dateWithString_calendarFormat_( - NSString description, NSString format) { - final _ret = _objc_msgSend_175( - _class_NSCalendarDate, - _sel_dateWithString_calendarFormat_, - description.pointer, - format.pointer); + static NSConnection? connectionWithRegisteredName_host_usingNameServer_( + objc.NSString name, objc.NSString? hostName, NSPortNameServer server) { + final _ret = _objc_msgSend_225( + _class_NSConnection, + _sel_connectionWithRegisteredName_host_usingNameServer_, + name.pointer, + hostName?.pointer ?? ffi.nullptr, + server.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - static NSObject dateWithYear_month_day_hour_minute_second_timeZone_( - int year, - int month, - int day, - int hour, - int minute, - int second, - NSTimeZone? aTimeZone) { - final _ret = _objc_msgSend_206( - _class_NSCalendarDate, - _sel_dateWithYear_month_day_hour_minute_second_timeZone_, - year, - month, - day, - hour, - minute, - second, - aTimeZone?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); - } - - NSCalendarDate dateByAddingYears_months_days_hours_minutes_seconds_( - int year, int month, int day, int hour, int minute, int second) { - final _ret = _objc_msgSend_207( - this.pointer, - _sel_dateByAddingYears_months_days_hours_minutes_seconds_, - year, - month, - day, - hour, - minute, - second); - return NSCalendarDate._(_ret, retain: true, release: true); + static NSDistantObject? rootProxyForConnectionWithRegisteredName_host_( + objc.NSString name, objc.NSString? hostName) { + final _ret = _objc_msgSend_233( + _class_NSConnection, + _sel_rootProxyForConnectionWithRegisteredName_host_, + name.pointer, + hostName?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - int dayOfCommonEra() { - return _objc_msgSend_83(this.pointer, _sel_dayOfCommonEra); + static NSDistantObject? + rootProxyForConnectionWithRegisteredName_host_usingNameServer_( + objc.NSString name, + objc.NSString? hostName, + NSPortNameServer server) { + final _ret = _objc_msgSend_234( + _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); } - int dayOfMonth() { - return _objc_msgSend_83(this.pointer, _sel_dayOfMonth); + static NSConnection? serviceConnectionWithName_rootObject_usingNameServer_( + objc.NSString name, objc.NSObject root, NSPortNameServer server) { + final _ret = _objc_msgSend_235( + _class_NSConnection, + _sel_serviceConnectionWithName_rootObject_usingNameServer_, + name.pointer, + root.pointer, + server.pointer); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - int dayOfWeek() { - return _objc_msgSend_83(this.pointer, _sel_dayOfWeek); + static NSConnection? serviceConnectionWithName_rootObject_( + objc.NSString name, objc.NSObject root) { + final _ret = _objc_msgSend_236(_class_NSConnection, + _sel_serviceConnectionWithName_rootObject_, name.pointer, root.pointer); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - int dayOfYear() { - return _objc_msgSend_83(this.pointer, _sel_dayOfYear); + double get requestTimeout { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_requestTimeout) + : _objc_msgSend_115(this.pointer, _sel_requestTimeout); } - int hourOfDay() { - return _objc_msgSend_83(this.pointer, _sel_hourOfDay); + set requestTimeout(double value) { + return _objc_msgSend_212(this.pointer, _sel_setRequestTimeout_, value); } - int minuteOfHour() { - return _objc_msgSend_83(this.pointer, _sel_minuteOfHour); + double get replyTimeout { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_replyTimeout) + : _objc_msgSend_115(this.pointer, _sel_replyTimeout); } - int monthOfYear() { - return _objc_msgSend_83(this.pointer, _sel_monthOfYear); + set replyTimeout(double value) { + return _objc_msgSend_212(this.pointer, _sel_setReplyTimeout_, value); } - int secondOfMinute() { - return _objc_msgSend_83(this.pointer, _sel_secondOfMinute); + objc.NSObject? get rootObject { + final _ret = _objc_msgSend_66(this.pointer, _sel_rootObject); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int yearOfCommonEra() { - return _objc_msgSend_83(this.pointer, _sel_yearOfCommonEra); + set rootObject(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setRootObject_, value?.pointer ?? ffi.nullptr); } - NSString calendarFormat() { - final _ret = _objc_msgSend_21(this.pointer, _sel_calendarFormat); - return NSString._(_ret, retain: true, release: true); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSString descriptionWithCalendarFormat_locale_( - NSString format, NSObject? locale) { - final _ret = _objc_msgSend_208( - this.pointer, - _sel_descriptionWithCalendarFormat_locale_, - format.pointer, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - NSString descriptionWithCalendarFormat_(NSString format) { - final _ret = _objc_msgSend_69( - this.pointer, _sel_descriptionWithCalendarFormat_, format.pointer); - return NSString._(_ret, retain: true, release: true); + bool get independentConversationQueueing { + return _objc_msgSend_7(this.pointer, _sel_independentConversationQueueing); } - @override - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _objc_msgSend_70(this.pointer, _sel_descriptionWithLocale_, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); + set independentConversationQueueing(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setIndependentConversationQueueing_, value); } - NSTimeZone timeZone() { - final _ret = _objc_msgSend_179(this.pointer, _sel_timeZone); - return NSTimeZone._(_ret, retain: true, release: true); + bool get valid { + return _objc_msgSend_7(this.pointer, _sel_isValid); } - NSObject? initWithString_calendarFormat_locale_( - NSString description, NSString format, NSObject? locale) { - final _ret = _objc_msgSend_174( - this.pointer, - _sel_initWithString_calendarFormat_locale_, - description.pointer, - format.pointer, - locale?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + NSDistantObject get rootProxy { + final _ret = _objc_msgSend_237(this.pointer, _sel_rootProxy); + return NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - NSObject? initWithString_calendarFormat_( - NSString description, NSString format) { - final _ret = _objc_msgSend_175( - this.pointer, - _sel_initWithString_calendarFormat_, - description.pointer, - format.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + void invalidate() { + _objc_msgSend_82(this.pointer, _sel_invalidate); } - @override - NSObject? initWithString_(NSString description) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithString_, description.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + void addRequestMode_(objc.NSString rmode) { + _objc_msgSend_98(this.pointer, _sel_addRequestMode_, rmode.pointer); } - NSObject initWithYear_month_day_hour_minute_second_timeZone_( - int year, - int month, - int day, - int hour, - int minute, - int second, - NSTimeZone? aTimeZone) { - final _ret = _objc_msgSend_206( - this.pointer, - _sel_initWithYear_month_day_hour_minute_second_timeZone_, - year, - month, - day, - hour, - minute, - second, - aTimeZone?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); - } - - void setCalendarFormat_(NSString? format) { - _objc_msgSend_209( - this.pointer, _sel_setCalendarFormat_, format?.pointer ?? ffi.nullptr); - } - - void setTimeZone_(NSTimeZone? aTimeZone) { - _objc_msgSend_210( - this.pointer, _sel_setTimeZone_, aTimeZone?.pointer ?? ffi.nullptr); - } - - void years_months_days_hours_minutes_seconds_sinceDate_( - ffi.Pointer yp, - ffi.Pointer mop, - ffi.Pointer dp, - ffi.Pointer hp, - ffi.Pointer mip, - ffi.Pointer sp, - NSCalendarDate date) { - _objc_msgSend_211( - this.pointer, - _sel_years_months_days_hours_minutes_seconds_sinceDate_, - yp, - mop, - dp, - hp, - mip, - sp, - date.pointer); + void removeRequestMode_(objc.NSString rmode) { + _objc_msgSend_98(this.pointer, _sel_removeRequestMode_, rmode.pointer); } - static NSDate getDistantFuture() { - final _ret = _objc_msgSend_172(_class_NSCalendarDate, _sel_distantFuture); - return NSDate._(_ret, retain: true, release: true); + objc.NSArray get requestModes { + final _ret = _objc_msgSend_6(this.pointer, _sel_requestModes); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSDate getDistantPast() { - final _ret = _objc_msgSend_172(_class_NSCalendarDate, _sel_distantPast); - return NSDate._(_ret, retain: true, release: true); + bool registerName_(objc.NSString? name) { + return _objc_msgSend_238( + this.pointer, _sel_registerName_, name?.pointer ?? ffi.nullptr); } - @override - NSCalendarDate init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSCalendarDate._(_ret, retain: true, release: true); + bool registerName_withNameServer_( + objc.NSString? name, NSPortNameServer server) { + return _objc_msgSend_239(this.pointer, _sel_registerName_withNameServer_, + name?.pointer ?? ffi.nullptr, server.pointer); } - @override - NSCalendarDate initWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _objc_msgSend_166( - this.pointer, _sel_initWithTimeIntervalSinceReferenceDate_, ti); - return NSCalendarDate._(_ret, retain: true, release: true); + static NSConnection? connectionWithReceivePort_sendPort_( + NSPort? receivePort, NSPort? sendPort) { + final _ret = _objc_msgSend_240( + _class_NSConnection, + _sel_connectionWithReceivePort_sendPort_, + receivePort?.pointer ?? ffi.nullptr, + sendPort?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - @override - NSCalendarDate? initWithCoder_(NSCoder coder) { + static objc.NSObject? currentConversation() { final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); + _objc_msgSend_66(_class_NSConnection, _sel_currentConversation); return _ret.address == 0 ? null - : NSCalendarDate._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - @override - NSCalendarDate dateByAddingTimeInterval_(double ti) { - final _ret = - _objc_msgSend_166(this.pointer, _sel_dateByAddingTimeInterval_, ti); - return NSCalendarDate._(_ret, retain: true, release: true); + NSConnection? initWithReceivePort_sendPort_( + NSPort? receivePort, NSPort? sendPort) { + final _ret = _objc_msgSend_240( + this.pointer, + _sel_initWithReceivePort_sendPort_, + receivePort?.pointer ?? ffi.nullptr, + sendPort?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSConnection.castFromPointer(_ret, retain: true, release: true); } - static NSCalendarDate date() { - final _ret = _objc_msgSend_2(_class_NSCalendarDate, _sel_date); - return NSCalendarDate._(_ret, retain: true, release: true); + NSPort get sendPort { + final _ret = _objc_msgSend_214(this.pointer, _sel_sendPort); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - static NSCalendarDate dateWithTimeIntervalSinceNow_(double secs) { - final _ret = _objc_msgSend_166( - _class_NSCalendarDate, _sel_dateWithTimeIntervalSinceNow_, secs); - return NSCalendarDate._(_ret, retain: true, release: true); + NSPort get receivePort { + final _ret = _objc_msgSend_214(this.pointer, _sel_receivePort); + return NSPort.castFromPointer(_ret, retain: true, release: true); } - static NSCalendarDate dateWithTimeIntervalSinceReferenceDate_(double ti) { - final _ret = _objc_msgSend_166(_class_NSCalendarDate, - _sel_dateWithTimeIntervalSinceReferenceDate_, ti); - return NSCalendarDate._(_ret, retain: true, release: true); + void enableMultipleThreads() { + _objc_msgSend_82(this.pointer, _sel_enableMultipleThreads); } - static NSCalendarDate dateWithTimeIntervalSince1970_(double secs) { - final _ret = _objc_msgSend_166( - _class_NSCalendarDate, _sel_dateWithTimeIntervalSince1970_, secs); - return NSCalendarDate._(_ret, retain: true, release: true); + bool get multipleThreadsEnabled { + return _objc_msgSend_7(this.pointer, _sel_multipleThreadsEnabled); } - static NSCalendarDate dateWithTimeInterval_sinceDate_( - double secsToBeAdded, NSDate date) { - final _ret = _objc_msgSend_171(_class_NSCalendarDate, - _sel_dateWithTimeInterval_sinceDate_, secsToBeAdded, date.pointer); - return NSCalendarDate._(_ret, retain: true, release: true); + void addRunLoop_(NSRunLoop runloop) { + _objc_msgSend_241(this.pointer, _sel_addRunLoop_, runloop.pointer); } - static NSDate getNow() { - final _ret = _objc_msgSend_172(_class_NSCalendarDate, _sel_now); - return NSDate._(_ret, retain: true, release: true); + void removeRunLoop_(NSRunLoop runloop) { + _objc_msgSend_241(this.pointer, _sel_removeRunLoop_, runloop.pointer); } - @override - NSCalendarDate initWithTimeIntervalSinceNow_(double secs) { - final _ret = _objc_msgSend_166( - this.pointer, _sel_initWithTimeIntervalSinceNow_, secs); - return NSCalendarDate._(_ret, retain: true, release: true); + void runInNewThread() { + _objc_msgSend_82(this.pointer, _sel_runInNewThread); } - @override - NSCalendarDate initWithTimeIntervalSince1970_(double secs) { - final _ret = _objc_msgSend_166( - this.pointer, _sel_initWithTimeIntervalSince1970_, secs); - return NSCalendarDate._(_ret, retain: true, release: true); + objc.NSArray get remoteObjects { + final _ret = _objc_msgSend_6(this.pointer, _sel_remoteObjects); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - @override - NSCalendarDate initWithTimeInterval_sinceDate_( - double secsToBeAdded, NSDate date) { - final _ret = _objc_msgSend_171(this.pointer, - _sel_initWithTimeInterval_sinceDate_, secsToBeAdded, date.pointer); - return NSCalendarDate._(_ret, retain: true, release: true); - } - - static NSObject? dateWithNaturalLanguageString_locale_( - NSString string, NSObject? locale) { - final _ret = _objc_msgSend_173( - _class_NSCalendarDate, - _sel_dateWithNaturalLanguageString_locale_, - string.pointer, - locale?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + objc.NSArray get localObjects { + final _ret = _objc_msgSend_6(this.pointer, _sel_localObjects); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject? dateWithNaturalLanguageString_(NSString string) { - final _ret = _objc_msgSend_38(_class_NSCalendarDate, - _sel_dateWithNaturalLanguageString_, string.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + void dispatchWithComponents_(objc.NSArray components) { + _objc_msgSend_242( + this.pointer, _sel_dispatchWithComponents_, components.pointer); } - static NSObject dateWithString_(NSString aString) { - final _ret = _objc_msgSend_31( - _class_NSCalendarDate, _sel_dateWithString_, aString.pointer); - return NSObject._(_ret, retain: true, release: true); + @override + NSConnection init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSConnection.castFromPointer(_ret, retain: true, release: true); } - static NSCalendarDate new1() { - final _ret = _objc_msgSend_2(_class_NSCalendarDate, _sel_new); - return NSCalendarDate._(_ret, retain: false, release: true); + static NSConnection new1() { + final _ret = _objc_msgSend_40(_class_NSConnection, _sel_new); + return NSConnection.castFromPointer(_ret, retain: false, release: true); } - static NSCalendarDate allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSCalendarDate, _sel_allocWithZone_, zone); - return NSCalendarDate._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSConnection, _sel_allocWithZone_, zone); + return NSConnection.castFromPointer(_ret, retain: false, release: true); } - static NSCalendarDate alloc() { - final _ret = _objc_msgSend_2(_class_NSCalendarDate, _sel_alloc); - return NSCalendarDate._(_ret, retain: false, release: true); + static NSConnection alloc() { + final _ret = _objc_msgSend_40(_class_NSConnection, _sel_alloc); + return NSConnection.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSCalendarDate, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSConnection, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSCalendarDate, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSConnection, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSCalendarDate, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSConnection, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSCalendarDate, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSConnection, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSCalendarDate, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSConnection, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSCalendarDate, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSConnection, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSCalendarDate, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSConnection, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSCalendarDate, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSConnection, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSCalendarDate, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSConnection, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSCalendarDate = objc.getClass("NSCalendarDate"); -late final _sel_calendarDate = objc.registerName("calendarDate"); -late final _sel_dateWithString_calendarFormat_locale_ = - objc.registerName("dateWithString:calendarFormat:locale:"); -final _objc_msgSend_174 = objc.msgSendPointer +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_219 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_dateWithString_calendarFormat_ = - objc.registerName("dateWithString:calendarFormat:"); -final _objc_msgSend_175 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_connectionWithRegisteredName_host_ = + objc.registerName("connectionWithRegisteredName:host:"); +final _objc_msgSend_220 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -class NSTimeZone extends NSObject { - NSTimeZone._(ffi.Pointer pointer, +class NSPortNameServer extends objc.NSObject { + NSPortNameServer._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSTimeZone] that points to the same underlying object as [other]. - static NSTimeZone castFrom(T other) { - return NSTimeZone._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSPortNameServer] that points to the same underlying object as [other]. + NSPortNameServer.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSTimeZone] that wraps the given raw object pointer. - static NSTimeZone castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSTimeZone._(other, retain: retain, release: release); - } + /// 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 [NSTimeZone]. + /// Returns whether [obj] is an instance of [NSPortNameServer]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTimeZone); - } - - NSString get name { - final _ret = _objc_msgSend_21(this.pointer, _sel_name); - return NSString._(_ret, retain: true, release: true); + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSPortNameServer); } - NSData get data { - final _ret = _objc_msgSend_43(this.pointer, _sel_data); - return NSData._(_ret, retain: true, release: true); + static NSPortNameServer systemDefaultPortNameServer() { + final _ret = _objc_msgSend_221( + _class_NSPortNameServer, _sel_systemDefaultPortNameServer); + return NSPortNameServer.castFromPointer(_ret, retain: true, release: true); } - int secondsFromGMTForDate_(NSDate aDate) { - return _objc_msgSend_176( - this.pointer, _sel_secondsFromGMTForDate_, aDate.pointer); + NSPort? portForName_(objc.NSString name) { + final _ret = + _objc_msgSend_222(this.pointer, _sel_portForName_, name.pointer); + return _ret.address == 0 + ? null + : NSPort.castFromPointer(_ret, retain: true, release: true); } - NSString? abbreviationForDate_(NSDate aDate) { - final _ret = _objc_msgSend_177( - this.pointer, _sel_abbreviationForDate_, aDate.pointer); + NSPort? portForName_host_(objc.NSString name, objc.NSString? host) { + final _ret = _objc_msgSend_223(this.pointer, _sel_portForName_host_, + name.pointer, host?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSPort.castFromPointer(_ret, retain: true, release: true); } - bool isDaylightSavingTimeForDate_(NSDate aDate) { - return _objc_msgSend_170( - this.pointer, _sel_isDaylightSavingTimeForDate_, aDate.pointer); + bool registerPort_name_(NSPort port, objc.NSString name) { + return _objc_msgSend_224( + this.pointer, _sel_registerPort_name_, port.pointer, name.pointer); } - double daylightSavingTimeOffsetForDate_(NSDate aDate) { - return objc.useMsgSendVariants - ? _objc_msgSend_167Fpret( - this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer) - : _objc_msgSend_167( - this.pointer, _sel_daylightSavingTimeOffsetForDate_, aDate.pointer); + bool removePortForName_(objc.NSString name) { + return _objc_msgSend_51( + this.pointer, _sel_removePortForName_, name.pointer); } - NSDate? nextDaylightSavingTimeTransitionAfterDate_(NSDate aDate) { - final _ret = _objc_msgSend_178(this.pointer, - _sel_nextDaylightSavingTimeTransitionAfterDate_, aDate.pointer); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); + @override + NSPortNameServer init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPortNameServer.castFromPointer(_ret, retain: true, release: true); } - static NSTimeZone getSystemTimeZone() { - final _ret = _objc_msgSend_179(_class_NSTimeZone, _sel_systemTimeZone); - return NSTimeZone._(_ret, retain: true, release: true); + static NSPortNameServer new1() { + final _ret = _objc_msgSend_40(_class_NSPortNameServer, _sel_new); + return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); } - static void resetSystemTimeZone() { - _objc_msgSend_1(_class_NSTimeZone, _sel_resetSystemTimeZone); + static NSPortNameServer allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSPortNameServer, _sel_allocWithZone_, zone); + return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); } - static NSTimeZone getDefaultTimeZone() { - final _ret = _objc_msgSend_179(_class_NSTimeZone, _sel_defaultTimeZone); - return NSTimeZone._(_ret, retain: true, release: true); + static NSPortNameServer alloc() { + final _ret = _objc_msgSend_40(_class_NSPortNameServer, _sel_alloc); + return NSPortNameServer.castFromPointer(_ret, retain: false, release: true); } - static void setDefaultTimeZone(NSTimeZone value) { - return _objc_msgSend_180( - _class_NSTimeZone, _sel_setDefaultTimeZone_, value.pointer); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPortNameServer, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static NSTimeZone getLocalTimeZone() { - final _ret = _objc_msgSend_179(_class_NSTimeZone, _sel_localTimeZone); - return NSTimeZone._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPortNameServer, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static NSArray getKnownTimeZoneNames() { - final _ret = _objc_msgSend_85(_class_NSTimeZone, _sel_knownTimeZoneNames); - return NSArray._(_ret, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSPortNameServer, _sel_accessInstanceVariablesDirectly); } - static NSDictionary getAbbreviationDictionary() { - final _ret = - _objc_msgSend_181(_class_NSTimeZone, _sel_abbreviationDictionary); - return NSDictionary._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSPortNameServer, _sel_useStoredAccessor); } - static void setAbbreviationDictionary(NSDictionary value) { - return _objc_msgSend_182( - _class_NSTimeZone, _sel_setAbbreviationDictionary_, value.pointer); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPortNameServer, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSString getTimeZoneDataVersion() { - final _ret = _objc_msgSend_21(_class_NSTimeZone, _sel_timeZoneDataVersion); - return NSString._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPortNameServer, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - int get secondsFromGMT { - return _objc_msgSend_83(this.pointer, _sel_secondsFromGMT); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPortNameServer, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSString? get abbreviation { - final _ret = _objc_msgSend_44(this.pointer, _sel_abbreviation); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPortNameServer, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool get daylightSavingTime { - return _objc_msgSend_12(this.pointer, _sel_isDaylightSavingTime); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSPortNameServer, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - double get daylightSavingTimeOffset { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_daylightSavingTimeOffset) - : _objc_msgSend_165(this.pointer, _sel_daylightSavingTimeOffset); - } +late final _class_NSPortNameServer = objc.getClass("NSPortNameServer"); +late final _sel_systemDefaultPortNameServer = + objc.registerName("systemDefaultPortNameServer"); +final _objc_msgSend_221 = 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_222 = 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_223 = 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_224 = 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_225 = 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)>(); - NSDate? get nextDaylightSavingTimeTransition { - final _ret = - _objc_msgSend_183(this.pointer, _sel_nextDaylightSavingTimeTransition); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } +class NSDistantObject extends NSProxy { + NSDistantObject._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } + /// Constructs a [NSDistantObject] that points to the same underlying object as [other]. + NSDistantObject.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - bool isEqualToTimeZone_(NSTimeZone aTimeZone) { - return _objc_msgSend_184( - this.pointer, _sel_isEqualToTimeZone_, aTimeZone.pointer); + /// 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 [NSDistantObject]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSDistantObject); } - NSString? localizedName_locale_(int style, NSLocale? locale) { - final _ret = _objc_msgSend_203(this.pointer, _sel_localizedName_locale_, - style, locale?.pointer ?? ffi.nullptr); + static objc.NSObject? proxyWithTarget_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_229(_class_NSDistantObject, + _sel_proxyWithTarget_connection_, target.pointer, connection.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSTimeZone? timeZoneWithName_(NSString tzName) { - final _ret = _objc_msgSend_38( - _class_NSTimeZone, _sel_timeZoneWithName_, tzName.pointer); + NSDistantObject? initWithTarget_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_229(this.pointer, + _sel_initWithTarget_connection_, target.pointer, connection.pointer); return _ret.address == 0 ? null - : NSTimeZone._(_ret, retain: true, release: true); + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - static NSTimeZone? timeZoneWithName_data_(NSString tzName, NSData? aData) { - final _ret = _objc_msgSend_204( - _class_NSTimeZone, - _sel_timeZoneWithName_data_, - tzName.pointer, - aData?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, retain: true, release: true); + static objc.NSObject proxyWithLocal_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_230(_class_NSDistantObject, + _sel_proxyWithLocal_connection_, target.pointer, connection.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSDistantObject initWithLocal_connection_( + objc.NSObject target, NSConnection connection) { + final _ret = _objc_msgSend_230(this.pointer, _sel_initWithLocal_connection_, + target.pointer, connection.pointer); + return NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - NSTimeZone? initWithName_(NSString tzName) { + NSDistantObject? initWithCoder_(objc.NSCoder inCoder) { final _ret = - _objc_msgSend_38(this.pointer, _sel_initWithName_, tzName.pointer); + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); return _ret.address == 0 ? null - : NSTimeZone._(_ret, retain: true, release: true); + : NSDistantObject.castFromPointer(_ret, retain: true, release: true); } - NSTimeZone? initWithName_data_(NSString tzName, NSData? aData) { - final _ret = _objc_msgSend_204(this.pointer, _sel_initWithName_data_, - tzName.pointer, aData?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, retain: true, release: true); + void setProtocolForProxy_(objc.Protocol? proto) { + _objc_msgSend_232( + this.pointer, _sel_setProtocolForProxy_, proto?.pointer ?? ffi.nullptr); } - static NSTimeZone timeZoneForSecondsFromGMT_(int seconds) { - final _ret = _objc_msgSend_205( - _class_NSTimeZone, _sel_timeZoneForSecondsFromGMT_, seconds); - return NSTimeZone._(_ret, retain: true, release: true); + NSConnection get connectionForProxy { + final _ret = _objc_msgSend_219(this.pointer, _sel_connectionForProxy); + return NSConnection.castFromPointer(_ret, retain: true, release: true); } - static NSTimeZone? timeZoneWithAbbreviation_(NSString abbreviation) { - final _ret = _objc_msgSend_38(_class_NSTimeZone, - _sel_timeZoneWithAbbreviation_, abbreviation.pointer); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, retain: true, release: true); + static objc.NSObject alloc() { + final _ret = _objc_msgSend_40(_class_NSDistantObject, _sel_alloc); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); } - @override - NSTimeZone init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSTimeZone._(_ret, retain: true, release: true); + static bool respondsToSelector_(ffi.Pointer aSelector) { + return _objc_msgSend_228( + _class_NSDistantObject, _sel_respondsToSelector_, aSelector); } +} - static NSTimeZone new1() { - final _ret = _objc_msgSend_2(_class_NSTimeZone, _sel_new); - return NSTimeZone._(_ret, retain: false, release: true); +late final _class_NSDistantObject = objc.getClass("NSDistantObject"); + +class NSProxy extends objc.ObjCObjectBase { + NSProxy._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSProxy] that points to the same underlying object as [other]. + NSProxy.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSProxy] that wraps the given raw object pointer. + NSProxy.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSProxy]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSProxy); } - static NSTimeZone allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSTimeZone, _sel_allocWithZone_, zone); - return NSTimeZone._(_ret, retain: false, release: true); + static objc.NSObject alloc() { + final _ret = _objc_msgSend_40(_class_NSProxy, _sel_alloc); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); } - static NSTimeZone alloc() { - final _ret = _objc_msgSend_2(_class_NSTimeZone, _sel_alloc); - return NSTimeZone._(_ret, retain: false, release: true); + static objc.NSObject allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSProxy, _sel_allocWithZone_, zone); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSTimeZone, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + static objc.NSObject class1() { + final _ret = _objc_msgSend_40(_class_NSProxy, _sel_class); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSTimeZone, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + void forwardInvocation_(objc.NSInvocation invocation) { + _objc_msgSend_226( + this.pointer, _sel_forwardInvocation_, invocation.pointer); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSTimeZone, _sel_accessInstanceVariablesDirectly); + objc.NSMethodSignature? methodSignatureForSelector_( + ffi.Pointer sel) { + final _ret = + _objc_msgSend_227(this.pointer, _sel_methodSignatureForSelector_, sel); + return _ret.address == 0 + ? null + : objc.NSMethodSignature.castFromPointer(_ret, + retain: true, release: true); } - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSTimeZone, _sel_useStoredAccessor); + void dealloc() { + _objc_msgSend_82(this.pointer, _sel_dealloc); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSTimeZone, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + void finalize() { + _objc_msgSend_82(this.pointer, _sel_finalize); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSTimeZone, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSTimeZone, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + objc.NSString get debugDescription { + final _ret = _objc_msgSend_12(this.pointer, _sel_debugDescription); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSTimeZone, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static bool respondsToSelector_(ffi.Pointer aSelector) { + return _objc_msgSend_228( + _class_NSProxy, _sel_respondsToSelector_, aSelector); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSTimeZone, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + bool allowsWeakReference() { + return _objc_msgSend_7(this.pointer, _sel_allowsWeakReference); + } + + bool retainWeakReference() { + return _objc_msgSend_7(this.pointer, _sel_retainWeakReference); } } -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_176 = objc.msgSendPointer +late final _class_NSProxy = objc.getClass("NSProxy"); +late final _sel_class = objc.registerName("class"); +late final _sel_forwardInvocation_ = objc.registerName("forwardInvocation:"); +final _objc_msgSend_226 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Long Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function(ffi.Pointer, + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_abbreviationForDate_ = - objc.registerName("abbreviationForDate:"); -final _objc_msgSend_177 = objc.msgSendPointer +late final _sel_methodSignatureForSelector_ = + objc.registerName("methodSignatureForSelector:"); +final _objc_msgSend_227 = 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)>(); -late final _sel_isDaylightSavingTimeForDate_ = - objc.registerName("isDaylightSavingTimeForDate:"); -late final _sel_daylightSavingTimeOffsetForDate_ = - objc.registerName("daylightSavingTimeOffsetForDate:"); -late final _sel_nextDaylightSavingTimeTransitionAfterDate_ = - objc.registerName("nextDaylightSavingTimeTransitionAfterDate:"); -final _objc_msgSend_178 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_dealloc = objc.registerName("dealloc"); +late final _sel_finalize = objc.registerName("finalize"); +late final _sel_debugDescription = objc.registerName("debugDescription"); +late final _sel_respondsToSelector_ = objc.registerName("respondsToSelector:"); +final _objc_msgSend_228 = 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_allowsWeakReference = objc.registerName("allowsWeakReference"); +late final _sel_retainWeakReference = objc.registerName("retainWeakReference"); +late final _sel_proxyWithTarget_connection_ = + objc.registerName("proxyWithTarget:connection:"); +final _objc_msgSend_229 = 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)>(); -late final _sel_systemTimeZone = objc.registerName("systemTimeZone"); -final _objc_msgSend_179 = objc.msgSendPointer + ffi.Pointer Function( + 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_230 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_resetSystemTimeZone = objc.registerName("resetSystemTimeZone"); -late final _sel_defaultTimeZone = objc.registerName("defaultTimeZone"); -late final _sel_setDefaultTimeZone_ = objc.registerName("setDefaultTimeZone:"); -final _objc_msgSend_180 = objc.msgSendPointer + 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_231 = 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_setProtocolForProxy_ = + objc.registerName("setProtocolForProxy:"); +final _objc_msgSend_232 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -12484,40 +10550,88 @@ final _objc_msgSend_180 = objc.msgSendPointer .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_181 = objc.msgSendPointer +late final _sel_connectionForProxy = objc.registerName("connectionForProxy"); +late final _sel_rootProxyForConnectionWithRegisteredName_host_ = + objc.registerName("rootProxyForConnectionWithRegisteredName:host:"); +final _objc_msgSend_233 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setAbbreviationDictionary_ = - objc.registerName("setAbbreviationDictionary:"); -final _objc_msgSend_182 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_ = + objc.registerName( + "rootProxyForConnectionWithRegisteredName:host:usingNameServer:"); +final _objc_msgSend_234 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, 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"); -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_183 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_serviceConnectionWithName_rootObject_usingNameServer_ = + objc.registerName("serviceConnectionWithName:rootObject:usingNameServer:"); +final _objc_msgSend_235 = 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_serviceConnectionWithName_rootObject_ = + objc.registerName("serviceConnectionWithName:rootObject:"); +final _objc_msgSend_236 = 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_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_237 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -12525,8 +10639,11 @@ final _objc_msgSend_183 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_isEqualToTimeZone_ = objc.registerName("isEqualToTimeZone:"); -final _objc_msgSend_184 = objc.msgSendPointer +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_238 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Bool Function( @@ -12536,940 +10653,782 @@ final _objc_msgSend_184 = objc.msgSendPointer .asFunction< bool Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - -abstract class NSTimeZoneNameStyle { - static const int NSTimeZoneNameStyleStandard = 0; - static const int NSTimeZoneNameStyleShortStandard = 1; - static const int NSTimeZoneNameStyleDaylightSaving = 2; - static const int NSTimeZoneNameStyleShortDaylightSaving = 3; - static const int NSTimeZoneNameStyleGeneric = 4; - static const int NSTimeZoneNameStyleShortGeneric = 5; +late final _sel_registerName_withNameServer_ = + objc.registerName("registerName:withNameServer:"); +final _objc_msgSend_239 = 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_240 = 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_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_241 = 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_242 = 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_243 = 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_244 = 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_245 = 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_246 = 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_247 = 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"); +void _ObjCBlock_ffiVoid_fnPtrTrampoline( + ffi.Pointer block, +) => + block.ref.target + .cast>() + .asFunction()(); +final _ObjCBlock_ffiVoid_closureRegistry = {}; +int _ObjCBlock_ffiVoid_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_registerClosure(void Function() fn) { + final id = ++_ObjCBlock_ffiVoid_closureRegistryIndex; + _ObjCBlock_ffiVoid_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -class NSLocale extends NSObject { - NSLocale._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); +void _ObjCBlock_ffiVoid_closureTrampoline( + ffi.Pointer block, +) => + _ObjCBlock_ffiVoid_closureRegistry[block.ref.target.address]!(); - /// Returns a [NSLocale] that points to the same underlying object as [other]. - static NSLocale castFrom(T other) { - return NSLocale._(other.pointer, retain: true, 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); - /// Returns a [NSLocale] that wraps the given raw object pointer. - static NSLocale castFromPointer(ffi.Pointer other, + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid castFromPointer(ffi.Pointer pointer, {bool retain = false, bool release = false}) { - return NSLocale._(other, retain: retain, release: release); + return ObjCBlock_ffiVoid._(pointer, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSLocale]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSLocale); - } + /// 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.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer)>( + _ObjCBlock_ffiVoid_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - NSObject? objectForKey_(NSString key) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_objectForKey_, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_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. + ObjCBlock_ffiVoid.fromFunction(void Function() fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer)>( + _ObjCBlock_ffiVoid_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_registerClosure(() => fn()))); + static ffi.Pointer? _dartFuncTrampoline; - NSString? displayNameForKey_value_(NSString key, NSObject value) { - final _ret = _objc_msgSend_185(this.pointer, _sel_displayNameForKey_value_, - key.pointer, value.pointer); - return _ret.address == 0 - ? null - : NSString._(_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.listener(void Function() fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_registerClosure(() => fn()))); + static ffi.NativeCallable)>? + _dartFuncListenerTrampoline; - NSLocale initWithLocaleIdentifier_(NSString string) { - final _ret = _objc_msgSend_31( - this.pointer, _sel_initWithLocaleIdentifier_, string.pointer); - return NSLocale._(_ret, retain: true, release: true); - } + void call() => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block)>>() + .asFunction)>()( + pointer, + ); +} - NSLocale? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSLocale._(_ret, retain: true, release: true); - } +late final _sel_performInModes_block_ = + objc.registerName("performInModes:block:"); +final _objc_msgSend_248 = 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_249 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_performSelector_target_argument_order_modes_ = + objc.registerName("performSelector:target:argument:order:modes:"); +final _objc_msgSend_250 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_cancelPerformSelector_target_argument_ = + objc.registerName("cancelPerformSelector:target:argument:"); +final _objc_msgSend_251 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_cancelPerformSelectorsWithTarget_ = + objc.registerName("cancelPerformSelectorsWithTarget:"); - NSString get localeIdentifier { - final _ret = _objc_msgSend_21(this.pointer, _sel_localeIdentifier); - return NSString._(_ret, retain: true, release: true); - } +class NSFileHandle extends objc.NSObject { + NSFileHandle._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSString localizedStringForLocaleIdentifier_(NSString localeIdentifier) { - final _ret = _objc_msgSend_69(this.pointer, - _sel_localizedStringForLocaleIdentifier_, localeIdentifier.pointer); - return NSString._(_ret, retain: true, release: true); - } + /// Constructs a [NSFileHandle] that points to the same underlying object as [other]. + NSFileHandle.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSString get languageCode { - final _ret = _objc_msgSend_21(this.pointer, _sel_languageCode); - return NSString._(_ret, retain: true, release: true); + /// Constructs a [NSFileHandle] that wraps the given raw object pointer. + NSFileHandle.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSFileHandle]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSFileHandle); } - NSString? localizedStringForLanguageCode_(NSString languageCode) { - final _ret = _objc_msgSend_186(this.pointer, - _sel_localizedStringForLanguageCode_, languageCode.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + objc.NSData get availableData { + final _ret = _objc_msgSend_104(this.pointer, _sel_availableData); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSString get languageIdentifier { - final _ret = _objc_msgSend_21(this.pointer, _sel_languageIdentifier); - return NSString._(_ret, retain: true, release: true); + NSFileHandle initWithFileDescriptor_closeOnDealloc_(int fd, bool closeopt) { + final _ret = _objc_msgSend_252(this.pointer, + _sel_initWithFileDescriptor_closeOnDealloc_, fd, closeopt); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSString? get countryCode { - final _ret = _objc_msgSend_44(this.pointer, _sel_countryCode); + NSFileHandle? initWithCoder_(objc.NSCoder coder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSString? localizedStringForCountryCode_(NSString countryCode) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_localizedStringForCountryCode_, countryCode.pointer); + objc.NSData? readDataToEndOfFileAndReturnError_( + ffi.Pointer> error) { + final _ret = _objc_msgSend_253( + this.pointer, _sel_readDataToEndOfFileAndReturnError_, error); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSString? get regionCode { - final _ret = _objc_msgSend_44(this.pointer, _sel_regionCode); + objc.NSData? readDataUpToLength_error_( + int length, ffi.Pointer> error) { + final _ret = _objc_msgSend_254( + this.pointer, _sel_readDataUpToLength_error_, length, error); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSString? get scriptCode { - final _ret = _objc_msgSend_44(this.pointer, _sel_scriptCode); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? localizedStringForScriptCode_(NSString scriptCode) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_localizedStringForScriptCode_, scriptCode.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get variantCode { - final _ret = _objc_msgSend_44(this.pointer, _sel_variantCode); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + bool writeData_error_( + objc.NSData data, ffi.Pointer> error) { + return _objc_msgSend_255( + this.pointer, _sel_writeData_error_, data.pointer, error); } - NSString? localizedStringForVariantCode_(NSString variantCode) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_localizedStringForVariantCode_, variantCode.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + bool getOffset_error_(ffi.Pointer offsetInFile, + ffi.Pointer> error) { + return _objc_msgSend_256( + this.pointer, _sel_getOffset_error_, offsetInFile, error); } - NSCharacterSet get exemplarCharacterSet { - final _ret = _objc_msgSend_187(this.pointer, _sel_exemplarCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + bool seekToEndReturningOffset_error_( + ffi.Pointer offsetInFile, + ffi.Pointer> error) { + return _objc_msgSend_256(this.pointer, _sel_seekToEndReturningOffset_error_, + offsetInFile, error); } - NSString get calendarIdentifier { - final _ret = _objc_msgSend_21(this.pointer, _sel_calendarIdentifier); - return NSString._(_ret, retain: true, release: true); + bool seekToOffset_error_( + int offset, ffi.Pointer> error) { + return _objc_msgSend_257( + this.pointer, _sel_seekToOffset_error_, offset, error); } - NSString? localizedStringForCalendarIdentifier_(NSString calendarIdentifier) { - final _ret = _objc_msgSend_186(this.pointer, - _sel_localizedStringForCalendarIdentifier_, calendarIdentifier.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + bool truncateAtOffset_error_( + int offset, ffi.Pointer> error) { + return _objc_msgSend_257( + this.pointer, _sel_truncateAtOffset_error_, offset, error); } - NSString? get collationIdentifier { - final _ret = _objc_msgSend_44(this.pointer, _sel_collationIdentifier); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + bool synchronizeAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_8( + this.pointer, _sel_synchronizeAndReturnError_, error); } - NSString? localizedStringForCollationIdentifier_( - NSString collationIdentifier) { - final _ret = _objc_msgSend_186( - this.pointer, - _sel_localizedStringForCollationIdentifier_, - collationIdentifier.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + bool closeAndReturnError_(ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_closeAndReturnError_, error); } - bool get usesMetricSystem { - return _objc_msgSend_12(this.pointer, _sel_usesMetricSystem); + static NSFileHandle getFileHandleWithStandardInput() { + final _ret = _objc_msgSend_258( + _class_NSFileHandle, _sel_fileHandleWithStandardInput); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSString get decimalSeparator { - final _ret = _objc_msgSend_21(this.pointer, _sel_decimalSeparator); - return NSString._(_ret, retain: true, release: true); + static NSFileHandle getFileHandleWithStandardOutput() { + final _ret = _objc_msgSend_258( + _class_NSFileHandle, _sel_fileHandleWithStandardOutput); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSString get groupingSeparator { - final _ret = _objc_msgSend_21(this.pointer, _sel_groupingSeparator); - return NSString._(_ret, retain: true, release: true); + static NSFileHandle getFileHandleWithStandardError() { + final _ret = _objc_msgSend_258( + _class_NSFileHandle, _sel_fileHandleWithStandardError); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSString get currencySymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_currencySymbol); - return NSString._(_ret, retain: true, release: true); + static NSFileHandle getFileHandleWithNullDevice() { + final _ret = + _objc_msgSend_258(_class_NSFileHandle, _sel_fileHandleWithNullDevice); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSString? get currencyCode { - final _ret = _objc_msgSend_44(this.pointer, _sel_currencyCode); + static NSFileHandle? fileHandleForReadingAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSFileHandle, _sel_fileHandleForReadingAtPath_, path.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSString? localizedStringForCurrencyCode_(NSString currencyCode) { - final _ret = _objc_msgSend_186(this.pointer, - _sel_localizedStringForCurrencyCode_, currencyCode.pointer); + static NSFileHandle? fileHandleForWritingAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSFileHandle, _sel_fileHandleForWritingAtPath_, path.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString get collatorIdentifier { - final _ret = _objc_msgSend_21(this.pointer, _sel_collatorIdentifier); - return NSString._(_ret, retain: true, release: true); + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSString? localizedStringForCollatorIdentifier_(NSString collatorIdentifier) { - final _ret = _objc_msgSend_186(this.pointer, - _sel_localizedStringForCollatorIdentifier_, collatorIdentifier.pointer); + static NSFileHandle? fileHandleForUpdatingAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSFileHandle, _sel_fileHandleForUpdatingAtPath_, path.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString get quotationBeginDelimiter { - final _ret = _objc_msgSend_21(this.pointer, _sel_quotationBeginDelimiter); - return NSString._(_ret, retain: true, release: true); - } - - NSString get quotationEndDelimiter { - final _ret = _objc_msgSend_21(this.pointer, _sel_quotationEndDelimiter); - return NSString._(_ret, retain: true, release: true); - } - - NSString get alternateQuotationBeginDelimiter { - final _ret = - _objc_msgSend_21(this.pointer, _sel_alternateQuotationBeginDelimiter); - return NSString._(_ret, retain: true, release: true); - } - - NSString get alternateQuotationEndDelimiter { - final _ret = - _objc_msgSend_21(this.pointer, _sel_alternateQuotationEndDelimiter); - return NSString._(_ret, retain: true, release: true); - } - - static NSLocale getAutoupdatingCurrentLocale() { - final _ret = - _objc_msgSend_197(_class_NSLocale, _sel_autoupdatingCurrentLocale); - return NSLocale._(_ret, retain: true, release: true); - } - - static NSLocale getCurrentLocale() { - final _ret = _objc_msgSend_197(_class_NSLocale, _sel_currentLocale); - return NSLocale._(_ret, retain: true, release: true); - } - - static NSLocale getSystemLocale() { - final _ret = _objc_msgSend_197(_class_NSLocale, _sel_systemLocale); - return NSLocale._(_ret, retain: true, release: true); - } - - static NSLocale localeWithLocaleIdentifier_(NSString ident) { - final _ret = _objc_msgSend_31( - _class_NSLocale, _sel_localeWithLocaleIdentifier_, ident.pointer); - return NSLocale._(_ret, retain: true, release: true); - } - - @override - NSLocale init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSLocale._(_ret, retain: true, release: true); - } - - static NSArray getAvailableLocaleIdentifiers() { - final _ret = - _objc_msgSend_85(_class_NSLocale, _sel_availableLocaleIdentifiers); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray getISOLanguageCodes() { - final _ret = _objc_msgSend_85(_class_NSLocale, _sel_ISOLanguageCodes); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray getISOCountryCodes() { - final _ret = _objc_msgSend_85(_class_NSLocale, _sel_ISOCountryCodes); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray getISOCurrencyCodes() { - final _ret = _objc_msgSend_85(_class_NSLocale, _sel_ISOCurrencyCodes); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray getCommonISOCurrencyCodes() { - final _ret = _objc_msgSend_85(_class_NSLocale, _sel_commonISOCurrencyCodes); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray getPreferredLanguages() { - final _ret = _objc_msgSend_85(_class_NSLocale, _sel_preferredLanguages); - return NSArray._(_ret, retain: true, release: true); - } - - static NSDictionary componentsFromLocaleIdentifier_(NSString string) { - final _ret = _objc_msgSend_198( - _class_NSLocale, _sel_componentsFromLocaleIdentifier_, string.pointer); - return NSDictionary._(_ret, retain: true, release: true); + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static NSString localeIdentifierFromComponents_(NSDictionary dict) { - final _ret = _objc_msgSend_199( - _class_NSLocale, _sel_localeIdentifierFromComponents_, dict.pointer); - return NSString._(_ret, retain: true, release: true); - } - - static NSString canonicalLocaleIdentifierFromString_(NSString string) { - final _ret = _objc_msgSend_69(_class_NSLocale, - _sel_canonicalLocaleIdentifierFromString_, string.pointer); - return NSString._(_ret, retain: true, release: true); - } - - static NSString canonicalLanguageIdentifierFromString_(NSString string) { - final _ret = _objc_msgSend_69(_class_NSLocale, - _sel_canonicalLanguageIdentifierFromString_, string.pointer); - return NSString._(_ret, retain: true, release: true); - } - - static NSString? localeIdentifierFromWindowsLocaleCode_(int lcid) { - final _ret = _objc_msgSend_200( - _class_NSLocale, _sel_localeIdentifierFromWindowsLocaleCode_, lcid); + static NSFileHandle? fileHandleForReadingFromURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_259(_class_NSFileHandle, + _sel_fileHandleForReadingFromURL_error_, url.pointer, error); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); - } - - static int windowsLocaleCodeFromLocaleIdentifier_(NSString localeIdentifier) { - return _objc_msgSend_201(_class_NSLocale, - _sel_windowsLocaleCodeFromLocaleIdentifier_, localeIdentifier.pointer); - } - - static int characterDirectionForLanguage_(NSString isoLangCode) { - return _objc_msgSend_202(_class_NSLocale, - _sel_characterDirectionForLanguage_, isoLangCode.pointer); - } - - static int lineDirectionForLanguage_(NSString isoLangCode) { - return _objc_msgSend_202( - _class_NSLocale, _sel_lineDirectionForLanguage_, isoLangCode.pointer); - } - - static NSLocale new1() { - final _ret = _objc_msgSend_2(_class_NSLocale, _sel_new); - return NSLocale._(_ret, retain: false, release: true); - } - - static NSLocale allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSLocale, _sel_allocWithZone_, zone); - return NSLocale._(_ret, retain: false, release: true); - } - - static NSLocale alloc() { - final _ret = _objc_msgSend_2(_class_NSLocale, _sel_alloc); - return NSLocale._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSLocale, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSLocale, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSLocale, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSLocale, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSLocale, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSLocale, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSLocale, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSLocale, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSLocale, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSLocale = objc.getClass("NSLocale"); -late final _sel_displayNameForKey_value_ = - objc.registerName("displayNameForKey:value:"); -final _objc_msgSend_185 = 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_initWithLocaleIdentifier_ = - objc.registerName("initWithLocaleIdentifier:"); -late final _sel_localeIdentifier = objc.registerName("localeIdentifier"); -late final _sel_localizedStringForLocaleIdentifier_ = - objc.registerName("localizedStringForLocaleIdentifier:"); -late final _sel_languageCode = objc.registerName("languageCode"); -late final _sel_localizedStringForLanguageCode_ = - objc.registerName("localizedStringForLanguageCode:"); -final _objc_msgSend_186 = 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_languageIdentifier = objc.registerName("languageIdentifier"); -late final _sel_countryCode = objc.registerName("countryCode"); -late final _sel_localizedStringForCountryCode_ = - objc.registerName("localizedStringForCountryCode:"); -late final _sel_regionCode = objc.registerName("regionCode"); -late final _sel_scriptCode = objc.registerName("scriptCode"); -late final _sel_localizedStringForScriptCode_ = - objc.registerName("localizedStringForScriptCode:"); -late final _sel_variantCode = objc.registerName("variantCode"); -late final _sel_localizedStringForVariantCode_ = - objc.registerName("localizedStringForVariantCode:"); - -class NSCharacterSet extends NSObject { - NSCharacterSet._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSCharacterSet] that points to the same underlying object as [other]. - static NSCharacterSet castFrom(T other) { - return NSCharacterSet._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSCharacterSet] that wraps the given raw object pointer. - static NSCharacterSet castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCharacterSet._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCharacterSet]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSCharacterSet); - } - - static NSCharacterSet getControlCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_controlCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static NSCharacterSet getWhitespaceCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_whitespaceCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getWhitespaceAndNewlineCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_whitespaceAndNewlineCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getDecimalDigitCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_decimalDigitCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getLetterCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_letterCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getLowercaseLetterCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_lowercaseLetterCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); - } - - static NSCharacterSet getUppercaseLetterCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_uppercaseLetterCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + static NSFileHandle? fileHandleForWritingToURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_259(_class_NSFileHandle, + _sel_fileHandleForWritingToURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static NSCharacterSet getNonBaseCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_nonBaseCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + static NSFileHandle? fileHandleForUpdatingURL_error_( + objc.NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_259(_class_NSFileHandle, + _sel_fileHandleForUpdatingURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static NSCharacterSet getAlphanumericCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_alphanumericCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + void readInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260(this.pointer, _sel_readInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); } - static NSCharacterSet getDecomposableCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_decomposableCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + void readInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_readInBackgroundAndNotify); } - static NSCharacterSet getIllegalCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_illegalCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + void readToEndOfFileInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260( + this.pointer, + _sel_readToEndOfFileInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); } - static NSCharacterSet getPunctuationCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_punctuationCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + void readToEndOfFileInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_readToEndOfFileInBackgroundAndNotify); } - static NSCharacterSet getCapitalizedLetterCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_capitalizedLetterCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + void acceptConnectionInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260( + this.pointer, + _sel_acceptConnectionInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); } - static NSCharacterSet getSymbolCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_symbolCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + void acceptConnectionInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_acceptConnectionInBackgroundAndNotify); } - static NSCharacterSet getNewlineCharacterSet() { - final _ret = - _objc_msgSend_187(_class_NSCharacterSet, _sel_newlineCharacterSet); - return NSCharacterSet._(_ret, retain: false, release: true); + void waitForDataInBackgroundAndNotifyForModes_(objc.NSArray? modes) { + _objc_msgSend_260( + this.pointer, + _sel_waitForDataInBackgroundAndNotifyForModes_, + modes?.pointer ?? ffi.nullptr); } - static NSCharacterSet characterSetWithRange_(_NSRange aRange) { - final _ret = _objc_msgSend_188( - _class_NSCharacterSet, _sel_characterSetWithRange_, aRange); - return NSCharacterSet._(_ret, retain: true, release: true); + void waitForDataInBackgroundAndNotify() { + _objc_msgSend_82(this.pointer, _sel_waitForDataInBackgroundAndNotify); } - static NSCharacterSet characterSetWithCharactersInString_(NSString aString) { - final _ret = _objc_msgSend_189(_class_NSCharacterSet, - _sel_characterSetWithCharactersInString_, aString.pointer); - return NSCharacterSet._(_ret, retain: true, release: true); + ObjCBlock_ffiVoid_NSFileHandle? get readabilityHandler { + final _ret = _objc_msgSend_261(this.pointer, _sel_readabilityHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, + retain: true, release: true); } - static NSCharacterSet characterSetWithBitmapRepresentation_(NSData data) { - final _ret = _objc_msgSend_190(_class_NSCharacterSet, - _sel_characterSetWithBitmapRepresentation_, data.pointer); - return NSCharacterSet._(_ret, retain: true, release: true); + set readabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { + return _objc_msgSend_262(this.pointer, _sel_setReadabilityHandler_, + value?.pointer ?? ffi.nullptr); } - static NSCharacterSet? characterSetWithContentsOfFile_(NSString fName) { - final _ret = _objc_msgSend_191(_class_NSCharacterSet, - _sel_characterSetWithContentsOfFile_, fName.pointer); + ObjCBlock_ffiVoid_NSFileHandle? get writeabilityHandler { + final _ret = _objc_msgSend_261(this.pointer, _sel_writeabilityHandler); return _ret.address == 0 ? null - : NSCharacterSet._(_ret, retain: true, release: true); - } - - NSCharacterSet initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_192(this.pointer, _sel_initWithCoder_, coder.pointer); - return NSCharacterSet._(_ret, retain: true, release: true); + : ObjCBlock_ffiVoid_NSFileHandle.castFromPointer(_ret, + retain: true, release: true); } - bool characterIsMember_(int aCharacter) { - return _objc_msgSend_193(this.pointer, _sel_characterIsMember_, aCharacter); + set writeabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { + return _objc_msgSend_262(this.pointer, _sel_setWriteabilityHandler_, + value?.pointer ?? ffi.nullptr); } - NSData get bitmapRepresentation { - final _ret = _objc_msgSend_43(this.pointer, _sel_bitmapRepresentation); - return NSData._(_ret, retain: true, release: true); + NSFileHandle initWithFileDescriptor_(int fd) { + final _ret = + _objc_msgSend_263(this.pointer, _sel_initWithFileDescriptor_, fd); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - NSCharacterSet get invertedSet { - final _ret = _objc_msgSend_187(this.pointer, _sel_invertedSet); - return NSCharacterSet._(_ret, retain: true, release: true); + int get fileDescriptor { + return _objc_msgSend_264(this.pointer, _sel_fileDescriptor); } - bool longCharacterIsMember_(int theLongChar) { - return _objc_msgSend_194( - this.pointer, _sel_longCharacterIsMember_, theLongChar); + objc.NSData readDataToEndOfFile() { + final _ret = _objc_msgSend_104(this.pointer, _sel_readDataToEndOfFile); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - bool isSupersetOfSet_(NSCharacterSet theOtherSet) { - return _objc_msgSend_195( - this.pointer, _sel_isSupersetOfSet_, theOtherSet.pointer); + objc.NSData readDataOfLength_(int length) { + final _ret = + _objc_msgSend_265(this.pointer, _sel_readDataOfLength_, length); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - bool hasMemberInPlane_(int thePlane) { - return _objc_msgSend_196(this.pointer, _sel_hasMemberInPlane_, thePlane); + void writeData_(objc.NSData data) { + _objc_msgSend_266(this.pointer, _sel_writeData_, data.pointer); } - static NSCharacterSet getURLUserAllowedCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_URLUserAllowedCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + int get offsetInFile { + return _objc_msgSend_267(this.pointer, _sel_offsetInFile); } - static NSCharacterSet getURLPasswordAllowedCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_URLPasswordAllowedCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + int seekToEndOfFile() { + return _objc_msgSend_267(this.pointer, _sel_seekToEndOfFile); } - static NSCharacterSet getURLHostAllowedCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_URLHostAllowedCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + void seekToFileOffset_(int offset) { + _objc_msgSend_268(this.pointer, _sel_seekToFileOffset_, offset); } - static NSCharacterSet getURLPathAllowedCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_URLPathAllowedCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + void truncateFileAtOffset_(int offset) { + _objc_msgSend_268(this.pointer, _sel_truncateFileAtOffset_, offset); } - static NSCharacterSet getURLQueryAllowedCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_URLQueryAllowedCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + void synchronizeFile() { + _objc_msgSend_82(this.pointer, _sel_synchronizeFile); } - static NSCharacterSet getURLFragmentAllowedCharacterSet() { - final _ret = _objc_msgSend_187( - _class_NSCharacterSet, _sel_URLFragmentAllowedCharacterSet); - return NSCharacterSet._(_ret, retain: true, release: true); + void closeFile() { + _objc_msgSend_82(this.pointer, _sel_closeFile); } @override - NSCharacterSet init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSCharacterSet._(_ret, retain: true, release: true); + NSFileHandle init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFileHandle.castFromPointer(_ret, retain: true, release: true); } - static NSCharacterSet new1() { - final _ret = _objc_msgSend_2(_class_NSCharacterSet, _sel_new); - return NSCharacterSet._(_ret, retain: false, release: true); + static NSFileHandle new1() { + final _ret = _objc_msgSend_40(_class_NSFileHandle, _sel_new); + return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } - static NSCharacterSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSFileHandle allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSCharacterSet, _sel_allocWithZone_, zone); - return NSCharacterSet._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSFileHandle, _sel_allocWithZone_, zone); + return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } - static NSCharacterSet alloc() { - final _ret = _objc_msgSend_2(_class_NSCharacterSet, _sel_alloc); - return NSCharacterSet._(_ret, retain: false, release: true); + static NSFileHandle alloc() { + final _ret = _objc_msgSend_40(_class_NSFileHandle, _sel_alloc); + return NSFileHandle.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSCharacterSet, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFileHandle, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSCharacterSet, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFileHandle, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSCharacterSet, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSFileHandle, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSCharacterSet, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSFileHandle, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSCharacterSet, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFileHandle, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSCharacterSet, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFileHandle, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSCharacterSet, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFileHandle, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSCharacterSet, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFileHandle, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSCharacterSet, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSFileHandle, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSCharacterSet = objc.getClass("NSCharacterSet"); -late final _sel_controlCharacterSet = objc.registerName("controlCharacterSet"); -final _objc_msgSend_187 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_whitespaceCharacterSet = - objc.registerName("whitespaceCharacterSet"); -late final _sel_whitespaceAndNewlineCharacterSet = - objc.registerName("whitespaceAndNewlineCharacterSet"); -late final _sel_decimalDigitCharacterSet = - objc.registerName("decimalDigitCharacterSet"); -late final _sel_letterCharacterSet = objc.registerName("letterCharacterSet"); -late final _sel_lowercaseLetterCharacterSet = - objc.registerName("lowercaseLetterCharacterSet"); -late final _sel_uppercaseLetterCharacterSet = - objc.registerName("uppercaseLetterCharacterSet"); -late final _sel_nonBaseCharacterSet = objc.registerName("nonBaseCharacterSet"); -late final _sel_alphanumericCharacterSet = - objc.registerName("alphanumericCharacterSet"); -late final _sel_decomposableCharacterSet = - objc.registerName("decomposableCharacterSet"); -late final _sel_illegalCharacterSet = objc.registerName("illegalCharacterSet"); -late final _sel_punctuationCharacterSet = - objc.registerName("punctuationCharacterSet"); -late final _sel_capitalizedLetterCharacterSet = - objc.registerName("capitalizedLetterCharacterSet"); -late final _sel_symbolCharacterSet = objc.registerName("symbolCharacterSet"); -late final _sel_newlineCharacterSet = objc.registerName("newlineCharacterSet"); -late final _sel_characterSetWithRange_ = - objc.registerName("characterSetWithRange:"); -final _objc_msgSend_188 = 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_252 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int, ffi.Bool)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); -late final _sel_characterSetWithCharactersInString_ = - objc.registerName("characterSetWithCharactersInString:"); -final _objc_msgSend_189 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, int, bool)>(); +late final _sel_readDataToEndOfFileAndReturnError_ = + objc.registerName("readDataToEndOfFileAndReturnError:"); +final _objc_msgSend_253 = 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)>(); -late final _sel_characterSetWithBitmapRepresentation_ = - objc.registerName("characterSetWithBitmapRepresentation:"); -final _objc_msgSend_190 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_readDataUpToLength_error_ = + objc.registerName("readDataUpToLength:error:"); +final _objc_msgSend_254 = 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)>(); -late final _sel_characterSetWithContentsOfFile_ = - objc.registerName("characterSetWithContentsOfFile:"); -final _objc_msgSend_191 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_writeData_error_ = objc.registerName("writeData:error:"); +final _objc_msgSend_255 = 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)>(); -final _objc_msgSend_192 = objc.msgSendPointer + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_getOffset_error_ = objc.registerName("getOffset:error:"); +final _objc_msgSend_256 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_characterIsMember_ = objc.registerName("characterIsMember:"); -final _objc_msgSend_193 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedShort)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_bitmapRepresentation = - objc.registerName("bitmapRepresentation"); -late final _sel_invertedSet = objc.registerName("invertedSet"); -late final _sel_longCharacterIsMember_ = - objc.registerName("longCharacterIsMember:"); -final _objc_msgSend_194 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedInt)>>() + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_isSupersetOfSet_ = objc.registerName("isSupersetOfSet:"); -final _objc_msgSend_195 = objc.msgSendPointer + 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_257 = 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_hasMemberInPlane_ = objc.registerName("hasMemberInPlane:"); -final _objc_msgSend_196 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Uint8)>>() + ffi.UnsignedLongLong, + ffi.Pointer>)>>() .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_URLUserAllowedCharacterSet = - objc.registerName("URLUserAllowedCharacterSet"); -late final _sel_URLPasswordAllowedCharacterSet = - objc.registerName("URLPasswordAllowedCharacterSet"); -late final _sel_URLHostAllowedCharacterSet = - objc.registerName("URLHostAllowedCharacterSet"); -late final _sel_URLPathAllowedCharacterSet = - objc.registerName("URLPathAllowedCharacterSet"); -late final _sel_URLQueryAllowedCharacterSet = - objc.registerName("URLQueryAllowedCharacterSet"); -late final _sel_URLFragmentAllowedCharacterSet = - objc.registerName("URLFragmentAllowedCharacterSet"); -late final _sel_exemplarCharacterSet = - objc.registerName("exemplarCharacterSet"); -late final _sel_calendarIdentifier = objc.registerName("calendarIdentifier"); -late final _sel_localizedStringForCalendarIdentifier_ = - objc.registerName("localizedStringForCalendarIdentifier:"); -late final _sel_collationIdentifier = objc.registerName("collationIdentifier"); -late final _sel_localizedStringForCollationIdentifier_ = - objc.registerName("localizedStringForCollationIdentifier:"); -late final _sel_usesMetricSystem = objc.registerName("usesMetricSystem"); -late final _sel_decimalSeparator = objc.registerName("decimalSeparator"); -late final _sel_groupingSeparator = objc.registerName("groupingSeparator"); -late final _sel_currencySymbol = objc.registerName("currencySymbol"); -late final _sel_currencyCode = objc.registerName("currencyCode"); -late final _sel_localizedStringForCurrencyCode_ = - objc.registerName("localizedStringForCurrencyCode:"); -late final _sel_collatorIdentifier = objc.registerName("collatorIdentifier"); -late final _sel_localizedStringForCollatorIdentifier_ = - objc.registerName("localizedStringForCollatorIdentifier:"); -late final _sel_quotationBeginDelimiter = - objc.registerName("quotationBeginDelimiter"); -late final _sel_quotationEndDelimiter = - objc.registerName("quotationEndDelimiter"); -late final _sel_alternateQuotationBeginDelimiter = - objc.registerName("alternateQuotationBeginDelimiter"); -late final _sel_alternateQuotationEndDelimiter = - objc.registerName("alternateQuotationEndDelimiter"); -late final _sel_autoupdatingCurrentLocale = - objc.registerName("autoupdatingCurrentLocale"); -final _objc_msgSend_197 = objc.msgSendPointer + 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_258 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -13477,550 +11436,208 @@ final _objc_msgSend_197 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_currentLocale = objc.registerName("currentLocale"); -late final _sel_systemLocale = objc.registerName("systemLocale"); -late final _sel_localeWithLocaleIdentifier_ = - objc.registerName("localeWithLocaleIdentifier:"); -late final _sel_availableLocaleIdentifiers = - objc.registerName("availableLocaleIdentifiers"); -late final _sel_ISOLanguageCodes = objc.registerName("ISOLanguageCodes"); -late final _sel_ISOCountryCodes = objc.registerName("ISOCountryCodes"); -late final _sel_ISOCurrencyCodes = objc.registerName("ISOCurrencyCodes"); -late final _sel_commonISOCurrencyCodes = - objc.registerName("commonISOCurrencyCodes"); -late final _sel_preferredLanguages = objc.registerName("preferredLanguages"); -late final _sel_componentsFromLocaleIdentifier_ = - objc.registerName("componentsFromLocaleIdentifier:"); -final _objc_msgSend_198 = objc.msgSendPointer +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_259 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_localeIdentifierFromComponents_ = - objc.registerName("localeIdentifierFromComponents:"); -final _objc_msgSend_199 = 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_canonicalLocaleIdentifierFromString_ = - objc.registerName("canonicalLocaleIdentifierFromString:"); -late final _sel_canonicalLanguageIdentifierFromString_ = - objc.registerName("canonicalLanguageIdentifierFromString:"); -late final _sel_localeIdentifierFromWindowsLocaleCode_ = - objc.registerName("localeIdentifierFromWindowsLocaleCode:"); -final _objc_msgSend_200 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Uint32)>>() + ffi.Pointer>)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_windowsLocaleCodeFromLocaleIdentifier_ = - objc.registerName("windowsLocaleCodeFromLocaleIdentifier:"); -final _objc_msgSend_201 = objc.msgSendPointer + 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_260 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Uint32 Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function(ffi.Pointer, + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - -abstract class NSLocaleLanguageDirection { - static const int NSLocaleLanguageDirectionUnknown = 0; - static const int NSLocaleLanguageDirectionLeftToRight = 1; - static const int NSLocaleLanguageDirectionRightToLeft = 2; - static const int NSLocaleLanguageDirectionTopToBottom = 3; - static const int NSLocaleLanguageDirectionBottomToTop = 4; +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); +final _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -late final _sel_characterDirectionForLanguage_ = - objc.registerName("characterDirectionForLanguage:"); -final _objc_msgSend_202 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_lineDirectionForLanguage_ = - objc.registerName("lineDirectionForLanguage:"); -late final _sel_localizedName_locale_ = - objc.registerName("localizedName:locale:"); -final _objc_msgSend_203 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_timeZoneWithName_ = objc.registerName("timeZoneWithName:"); -late final _sel_timeZoneWithName_data_ = - objc.registerName("timeZoneWithName:data:"); -final _objc_msgSend_204 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_initWithName_ = objc.registerName("initWithName:"); -late final _sel_initWithName_data_ = objc.registerName("initWithName:data:"); -late final _sel_timeZoneForSecondsFromGMT_ = - objc.registerName("timeZoneForSecondsFromGMT:"); -final _objc_msgSend_205 = 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_dateWithYear_month_day_hour_minute_second_timeZone_ = - objc.registerName("dateWithYear:month:day:hour:minute:second:timeZone:"); -final _objc_msgSend_206 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - int, - int, - int, - int, - ffi.Pointer)>(); -late final _sel_dateByAddingYears_months_days_hours_minutes_seconds_ = - objc.registerName("dateByAddingYears:months:days:hours:minutes:seconds:"); -final _objc_msgSend_207 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - 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)>(); -late final _sel_dayOfCommonEra = objc.registerName("dayOfCommonEra"); -late final _sel_dayOfMonth = objc.registerName("dayOfMonth"); -late final _sel_dayOfWeek = objc.registerName("dayOfWeek"); -late final _sel_dayOfYear = objc.registerName("dayOfYear"); -late final _sel_hourOfDay = objc.registerName("hourOfDay"); -late final _sel_minuteOfHour = objc.registerName("minuteOfHour"); -late final _sel_monthOfYear = objc.registerName("monthOfYear"); -late final _sel_secondOfMinute = objc.registerName("secondOfMinute"); -late final _sel_yearOfCommonEra = objc.registerName("yearOfCommonEra"); -late final _sel_calendarFormat = objc.registerName("calendarFormat"); -late final _sel_descriptionWithCalendarFormat_locale_ = - objc.registerName("descriptionWithCalendarFormat:locale:"); -final _objc_msgSend_208 = 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_descriptionWithCalendarFormat_ = - objc.registerName("descriptionWithCalendarFormat:"); -late final _sel_timeZone = objc.registerName("timeZone"); -late final _sel_initWithString_calendarFormat_locale_ = - objc.registerName("initWithString:calendarFormat:locale:"); -late final _sel_initWithString_calendarFormat_ = - objc.registerName("initWithString:calendarFormat:"); -late final _sel_initWithYear_month_day_hour_minute_second_timeZone_ = - objc.registerName("initWithYear:month:day:hour:minute:second:timeZone:"); -late final _sel_setCalendarFormat_ = objc.registerName("setCalendarFormat:"); -final _objc_msgSend_209 = 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_setTimeZone_ = objc.registerName("setTimeZone:"); -final _objc_msgSend_210 = 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_years_months_days_hours_minutes_seconds_sinceDate_ = - objc.registerName("years:months:days:hours:minutes:seconds:sinceDate:"); -final _objc_msgSend_211 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - 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, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_dateWithCalendarFormat_timeZone_ = - objc.registerName("dateWithCalendarFormat:timeZone:"); -final _objc_msgSend_212 = 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_descriptionWithCalendarFormat_timeZone_locale_ = - objc.registerName("descriptionWithCalendarFormat:timeZone:locale:"); -final _objc_msgSend_213 = 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_fileModificationDate = - objc.registerName("fileModificationDate"); -late final _sel_fileType = objc.registerName("fileType"); -late final _sel_filePosixPermissions = - objc.registerName("filePosixPermissions"); -late final _sel_fileOwnerAccountName = - objc.registerName("fileOwnerAccountName"); -late final _sel_fileGroupOwnerAccountName = - objc.registerName("fileGroupOwnerAccountName"); -late final _sel_fileSystemNumber = objc.registerName("fileSystemNumber"); -late final _sel_fileSystemFileNumber = - objc.registerName("fileSystemFileNumber"); -late final _sel_fileExtensionHidden = objc.registerName("fileExtensionHidden"); -late final _sel_fileHFSCreatorCode = objc.registerName("fileHFSCreatorCode"); -final _objc_msgSend_214 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedInt Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_fileHFSTypeCode = objc.registerName("fileHFSTypeCode"); -late final _sel_fileIsImmutable = objc.registerName("fileIsImmutable"); -late final _sel_fileIsAppendOnly = objc.registerName("fileIsAppendOnly"); -late final _sel_fileCreationDate = objc.registerName("fileCreationDate"); -late final _sel_fileOwnerAccountID = objc.registerName("fileOwnerAccountID"); -final _objc_msgSend_215 = objc.msgSendPointer +void _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[block.ref.target.address]!( + 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.newBlock( + _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.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( + (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._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( + (ffi.Pointer arg0) => fn( + NSFileHandle.castFromPointer(arg0, + retain: true, 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_261 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_fileGroupOwnerAccountID = - objc.registerName("fileGroupOwnerAccountID"); -late final _sel_predicateWithBlock_ = objc.registerName("predicateWithBlock:"); -final _objc_msgSend_216 = objc.msgSendPointer +late final _sel_setReadabilityHandler_ = + objc.registerName("setReadabilityHandler:"); +final _objc_msgSend_262 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_predicateFormat = objc.registerName("predicateFormat"); -late final _sel_predicateWithSubstitutionVariables_ = - objc.registerName("predicateWithSubstitutionVariables:"); -late final _sel_evaluateWithObject_ = objc.registerName("evaluateWithObject:"); -final _objc_msgSend_217 = 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_evaluateWithObject_substitutionVariables_ = - objc.registerName("evaluateWithObject:substitutionVariables:"); -final _objc_msgSend_218 = 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_allowEvaluation = objc.registerName("allowEvaluation"); -late final _sel_filteredArrayUsingPredicate_ = - objc.registerName("filteredArrayUsingPredicate:"); -final _objc_msgSend_219 = 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_initWithChar_ = objc.registerName("initWithChar:"); -final _objc_msgSend_220 = 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_initWithUnsignedChar_ = - objc.registerName("initWithUnsignedChar:"); -final _objc_msgSend_221 = 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_initWithShort_ = objc.registerName("initWithShort:"); -final _objc_msgSend_222 = 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_initWithUnsignedShort_ = - objc.registerName("initWithUnsignedShort:"); -final _objc_msgSend_223 = 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_initWithInt_ = objc.registerName("initWithInt:"); -final _objc_msgSend_224 = objc.msgSendPointer +late final _sel_writeabilityHandler = objc.registerName("writeabilityHandler"); +late final _sel_setWriteabilityHandler_ = + objc.registerName("setWriteabilityHandler:"); +late final _sel_initWithFileDescriptor_ = + objc.registerName("initWithFileDescriptor:"); +final _objc_msgSend_263 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Int)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_initWithUnsignedInt_ = - objc.registerName("initWithUnsignedInt:"); -final _objc_msgSend_225 = 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_initWithLong_ = objc.registerName("initWithLong:"); -final _objc_msgSend_226 = 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_initWithUnsignedLong_ = - objc.registerName("initWithUnsignedLong:"); -final _objc_msgSend_227 = 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_initWithLongLong_ = objc.registerName("initWithLongLong:"); -final _objc_msgSend_228 = 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_initWithUnsignedLongLong_ = - objc.registerName("initWithUnsignedLongLong:"); -final _objc_msgSend_229 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLongLong)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, + instancetype Function(ffi.Pointer, ffi.Pointer, int)>(); -late final _sel_initWithFloat_ = objc.registerName("initWithFloat:"); -final _objc_msgSend_230 = 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_initWithDouble_ = objc.registerName("initWithDouble:"); -final _objc_msgSend_231 = 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_initWithBool_ = objc.registerName("initWithBool:"); -final _objc_msgSend_232 = 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_initWithInteger_ = objc.registerName("initWithInteger:"); -late final _sel_initWithUnsignedInteger_ = - objc.registerName("initWithUnsignedInteger:"); -late final _sel_charValue = objc.registerName("charValue"); -final _objc_msgSend_233 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Char Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_unsignedCharValue = objc.registerName("unsignedCharValue"); -final _objc_msgSend_234 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedChar Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_shortValue = objc.registerName("shortValue"); -final _objc_msgSend_235 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Short Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_unsignedShortValue = objc.registerName("unsignedShortValue"); -final _objc_msgSend_236 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedShort Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_intValue = objc.registerName("intValue"); -final _objc_msgSend_237 = objc.msgSendPointer +late final _sel_fileDescriptor = objc.registerName("fileDescriptor"); +final _objc_msgSend_264 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int Function(ffi.Pointer, @@ -14028,198 +11645,50 @@ final _objc_msgSend_237 = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_unsignedIntValue = objc.registerName("unsignedIntValue"); -late final _sel_longValue = objc.registerName("longValue"); -late final _sel_unsignedLongValue = objc.registerName("unsignedLongValue"); -late final _sel_longLongValue = objc.registerName("longLongValue"); -final _objc_msgSend_238 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.LongLong Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_unsignedLongLongValue = - objc.registerName("unsignedLongLongValue"); -late final _sel_floatValue = objc.registerName("floatValue"); -final _objc_msgSend_239 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - double Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_239Fpret = objc.msgSendFpretPointer +late final _sel_readDataToEndOfFile = objc.registerName("readDataToEndOfFile"); +late final _sel_readDataOfLength_ = objc.registerName("readDataOfLength:"); +final _objc_msgSend_265 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Float Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - double Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_doubleValue = objc.registerName("doubleValue"); -late final _sel_boolValue = objc.registerName("boolValue"); -late final _sel_integerValue = objc.registerName("integerValue"); -late final _sel_unsignedIntegerValue = - objc.registerName("unsignedIntegerValue"); -late final _sel_stringValue = objc.registerName("stringValue"); -final _objc_msgSend_240 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_writeData_ = objc.registerName("writeData:"); +final _objc_msgSend_266 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function(ffi.Pointer, + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_isEqualToNumber_ = objc.registerName("isEqualToNumber:"); -final _objc_msgSend_241 = objc.msgSendPointer +late final _sel_offsetInFile = objc.registerName("offsetInFile"); +final _objc_msgSend_267 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_numberWithChar_ = objc.registerName("numberWithChar:"); -late final _sel_numberWithUnsignedChar_ = - objc.registerName("numberWithUnsignedChar:"); -late final _sel_numberWithShort_ = objc.registerName("numberWithShort:"); -late final _sel_numberWithUnsignedShort_ = - objc.registerName("numberWithUnsignedShort:"); -late final _sel_numberWithInt_ = objc.registerName("numberWithInt:"); -late final _sel_numberWithUnsignedInt_ = - objc.registerName("numberWithUnsignedInt:"); -late final _sel_numberWithLong_ = objc.registerName("numberWithLong:"); -late final _sel_numberWithUnsignedLong_ = - objc.registerName("numberWithUnsignedLong:"); -late final _sel_numberWithLongLong_ = objc.registerName("numberWithLongLong:"); -late final _sel_numberWithUnsignedLongLong_ = - objc.registerName("numberWithUnsignedLongLong:"); -late final _sel_numberWithFloat_ = objc.registerName("numberWithFloat:"); -late final _sel_numberWithDouble_ = objc.registerName("numberWithDouble:"); -late final _sel_numberWithBool_ = objc.registerName("numberWithBool:"); -late final _sel_numberWithInteger_ = objc.registerName("numberWithInteger:"); -late final _sel_numberWithUnsignedInteger_ = - objc.registerName("numberWithUnsignedInteger:"); -late final _sel_port = objc.registerName("port"); -late final _sel_user = objc.registerName("user"); -late final _sel_password = objc.registerName("password"); -late final _sel_path = objc.registerName("path"); -late final _sel_fragment = objc.registerName("fragment"); -late final _sel_parameterString = objc.registerName("parameterString"); -late final _sel_query = objc.registerName("query"); -late final _sel_relativePath = objc.registerName("relativePath"); -late final _sel_hasDirectoryPath = objc.registerName("hasDirectoryPath"); -late final _sel_getFileSystemRepresentation_maxLength_ = - objc.registerName("getFileSystemRepresentation:maxLength:"); -final _objc_msgSend_242 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_seekToEndOfFile = objc.registerName("seekToEndOfFile"); +late final _sel_seekToFileOffset_ = objc.registerName("seekToFileOffset:"); +final _objc_msgSend_268 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); -late final _sel_fileSystemRepresentation = - objc.registerName("fileSystemRepresentation"); -late final _sel_isFileURL = objc.registerName("isFileURL"); -late final _sel_standardizedURL = objc.registerName("standardizedURL"); -late final _sel_isFileReferenceURL = objc.registerName("isFileReferenceURL"); -late final _sel_fileReferenceURL = objc.registerName("fileReferenceURL"); -late final _sel_filePathURL = objc.registerName("filePathURL"); -late final _sel_getResourceValue_forKey_error_ = - objc.registerName("getResourceValue:forKey:error:"); -final _objc_msgSend_243 = 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_resourceValuesForKeys_error_ = - objc.registerName("resourceValuesForKeys:error:"); -final _objc_msgSend_244 = 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_setResourceValue_forKey_error_ = - objc.registerName("setResourceValue:forKey:error:"); -final _objc_msgSend_245 = 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_setResourceValues_error_ = - objc.registerName("setResourceValues:error:"); -final _objc_msgSend_246 = 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_removeCachedResourceValueForKey_ = - objc.registerName("removeCachedResourceValueForKey:"); -final _objc_msgSend_247 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLongLong)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_removeAllCachedResourceValues = - objc.registerName("removeAllCachedResourceValues"); -late final _sel_setTemporaryResourceValue_forKey_ = - objc.registerName("setTemporaryResourceValue:forKey:"); + ffi.Pointer, int)>(); +late final _sel_truncateFileAtOffset_ = + objc.registerName("truncateFileAtOffset:"); +late final _sel_synchronizeFile = objc.registerName("synchronizeFile"); +late final _sel_closeFile = objc.registerName("closeFile"); abstract class NSURLBookmarkCreationOptions { static const int NSURLBookmarkCreationPreferFileIDResolution = 256; @@ -14231,28 +11700,6 @@ abstract class NSURLBookmarkCreationOptions { 536870912; } -late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_ = - objc.registerName( - "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); -final _objc_msgSend_248 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); - abstract class NSURLBookmarkResolutionOptions { static const int NSURLBookmarkResolutionWithoutUI = 256; static const int NSURLBookmarkResolutionWithoutMounting = 512; @@ -14260,708 +11707,777 @@ abstract class NSURLBookmarkResolutionOptions { static const int NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; } -late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ = - objc.registerName( - "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); -final _objc_msgSend_249 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ = - objc.registerName( - "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); -late final _sel_resourceValuesForKeys_fromBookmarkData_ = - objc.registerName("resourceValuesForKeys:fromBookmarkData:"); -final _objc_msgSend_250 = 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_writeBookmarkData_toURL_options_error_ = - objc.registerName("writeBookmarkData:toURL:options:error:"); -final _objc_msgSend_251 = 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_bookmarkDataWithContentsOfURL_error_ = - objc.registerName("bookmarkDataWithContentsOfURL:error:"); -final _objc_msgSend_252 = 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_URLByResolvingAliasFileAtURL_options_error_ = - objc.registerName("URLByResolvingAliasFileAtURL:options:error:"); -final _objc_msgSend_253 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_startAccessingSecurityScopedResource = - objc.registerName("startAccessingSecurityScopedResource"); -late final _sel_stopAccessingSecurityScopedResource = - objc.registerName("stopAccessingSecurityScopedResource"); -late final _sel_getPromisedItemResourceValue_forKey_error_ = - objc.registerName("getPromisedItemResourceValue:forKey:error:"); -late final _sel_promisedItemResourceValuesForKeys_error_ = - objc.registerName("promisedItemResourceValuesForKeys:error:"); -final _objc_msgSend_254 = 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_checkPromisedItemIsReachableAndReturnError_ = - objc.registerName("checkPromisedItemIsReachableAndReturnError:"); -final _objc_msgSend_255 = 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_fileURLWithPathComponents_ = - objc.registerName("fileURLWithPathComponents:"); -final _objc_msgSend_256 = 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_pathComponents = objc.registerName("pathComponents"); -late final _sel_lastPathComponent = objc.registerName("lastPathComponent"); -late final _sel_pathExtension = objc.registerName("pathExtension"); -late final _sel_URLByAppendingPathComponent_ = - objc.registerName("URLByAppendingPathComponent:"); -final _objc_msgSend_257 = 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_URLByAppendingPathComponent_isDirectory_ = - objc.registerName("URLByAppendingPathComponent:isDirectory:"); -final _objc_msgSend_258 = 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_URLByDeletingLastPathComponent = - objc.registerName("URLByDeletingLastPathComponent"); -late final _sel_URLByAppendingPathExtension_ = - objc.registerName("URLByAppendingPathExtension:"); -late final _sel_URLByDeletingPathExtension = - objc.registerName("URLByDeletingPathExtension"); -late final _sel_checkResourceIsReachableAndReturnError_ = - objc.registerName("checkResourceIsReachableAndReturnError:"); -late final _sel_URLByStandardizingPath = - objc.registerName("URLByStandardizingPath"); -late final _sel_URLByResolvingSymlinksInPath = - objc.registerName("URLByResolvingSymlinksInPath"); -late final _sel_resourceDataUsingCache_ = - objc.registerName("resourceDataUsingCache:"); -final _objc_msgSend_259 = 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_loadResourceDataNotifyingClient_usingCache_ = - objc.registerName("loadResourceDataNotifyingClient:usingCache:"); -final _objc_msgSend_260 = 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_propertyForKey_ = objc.registerName("propertyForKey:"); -late final _sel_setResourceData_ = objc.registerName("setResourceData:"); -late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); -final _objc_msgSend_261 = 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)>(); +class NSFileManager extends objc.NSObject { + NSFileManager._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -class NSURLHandle extends NSObject { - NSURLHandle._(ffi.Pointer pointer, + /// Constructs a [NSFileManager] that points to the same underlying object as [other]. + NSFileManager.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSFileManager] that wraps the given raw object pointer. + NSFileManager.castFromPointer(ffi.Pointer other, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : this._(other, retain: retain, release: release); - /// Returns a [NSURLHandle] that points to the same underlying object as [other]. - static NSURLHandle castFrom(T other) { - return NSURLHandle._(other.pointer, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSFileManager]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSFileManager); } - /// Returns a [NSURLHandle] that wraps the given raw object pointer. - static NSURLHandle castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLHandle._(other, retain: retain, release: release); + static NSFileManager getDefaultManager() { + final _ret = _objc_msgSend_269(_class_NSFileManager, _sel_defaultManager); + return NSFileManager.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLHandle]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLHandle); + objc.NSArray? mountedVolumeURLsIncludingResourceValuesForKeys_options_( + objc.NSArray? propertyKeys, int options) { + final _ret = _objc_msgSend_270( + this.pointer, + _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_, + propertyKeys?.pointer ?? ffi.nullptr, + options); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void registerURLHandleClass_(NSObject anURLHandleSubclass) { - _objc_msgSend_15(_class_NSURLHandle, _sel_registerURLHandleClass_, - anURLHandleSubclass.pointer); + void unmountVolumeAtURL_options_completionHandler_( + objc.NSURL url, int mask, ObjCBlock_ffiVoid_NSError completionHandler) { + _objc_msgSend_271( + this.pointer, + _sel_unmountVolumeAtURL_options_completionHandler_, + url.pointer, + mask, + completionHandler.pointer); } - static NSObject URLHandleClassForURL_(NSURL anURL) { - final _ret = _objc_msgSend_262( - _class_NSURLHandle, _sel_URLHandleClassForURL_, anURL.pointer); - return NSObject._(_ret, retain: true, release: true); + objc.NSArray? + contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_( + objc.NSURL url, + objc.NSArray? keys, + int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_272( + this.pointer, + _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_, + url.pointer, + keys?.pointer ?? ffi.nullptr, + mask, + error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int status() { - return _objc_msgSend_263(this.pointer, _sel_status); + objc.NSArray URLsForDirectory_inDomains_(int directory, int domainMask) { + final _ret = _objc_msgSend_273( + this.pointer, _sel_URLsForDirectory_inDomains_, directory, domainMask); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString failureReason() { - final _ret = _objc_msgSend_21(this.pointer, _sel_failureReason); - return NSString._(_ret, retain: true, release: true); + objc.NSURL? URLForDirectory_inDomain_appropriateForURL_create_error_( + int directory, + int domain, + objc.NSURL? url, + bool shouldCreate, + ffi.Pointer> error) { + final _ret = _objc_msgSend_274( + this.pointer, + _sel_URLForDirectory_inDomain_appropriateForURL_create_error_, + directory, + domain, + url?.pointer ?? ffi.nullptr, + shouldCreate, + error); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void addClient_(NSObject client) { - _objc_msgSend_15(this.pointer, _sel_addClient_, client.pointer); + bool getRelationship_ofDirectoryAtURL_toItemAtURL_error_( + ffi.Pointer outRelationship, + objc.NSURL directoryURL, + objc.NSURL otherURL, + ffi.Pointer> error) { + return _objc_msgSend_275( + this.pointer, + _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_, + outRelationship, + directoryURL.pointer, + otherURL.pointer, + error); } - void removeClient_(NSObject client) { - _objc_msgSend_15(this.pointer, _sel_removeClient_, client.pointer); + bool getRelationship_ofDirectory_inDomain_toItemAtURL_error_( + ffi.Pointer outRelationship, + int directory, + int domainMask, + objc.NSURL url, + ffi.Pointer> error) { + return _objc_msgSend_276( + this.pointer, + _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_, + outRelationship, + directory, + domainMask, + url.pointer, + error); } - void loadInBackground() { - _objc_msgSend_1(this.pointer, _sel_loadInBackground); + bool createDirectoryAtURL_withIntermediateDirectories_attributes_error_( + objc.NSURL url, + bool createIntermediates, + objc.NSDictionary? attributes, + ffi.Pointer> error) { + return _objc_msgSend_277( + this.pointer, + _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_, + url.pointer, + createIntermediates, + attributes?.pointer ?? ffi.nullptr, + error); } - void cancelLoadInBackground() { - _objc_msgSend_1(this.pointer, _sel_cancelLoadInBackground); + bool createSymbolicLinkAtURL_withDestinationURL_error_(objc.NSURL url, + objc.NSURL destURL, ffi.Pointer> error) { + return _objc_msgSend_278( + this.pointer, + _sel_createSymbolicLinkAtURL_withDestinationURL_error_, + url.pointer, + destURL.pointer, + error); } - NSData resourceData() { - final _ret = _objc_msgSend_43(this.pointer, _sel_resourceData); - return NSData._(_ret, retain: true, release: true); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSData availableResourceData() { - final _ret = _objc_msgSend_43(this.pointer, _sel_availableResourceData); - return NSData._(_ret, retain: true, release: true); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - int expectedResourceDataSize() { - return _objc_msgSend_238(this.pointer, _sel_expectedResourceDataSize); + bool setAttributes_ofItemAtPath_error_(objc.NSDictionary attributes, + objc.NSString path, ffi.Pointer> error) { + return _objc_msgSend_279( + this.pointer, + _sel_setAttributes_ofItemAtPath_error_, + attributes.pointer, + path.pointer, + error); } - void flushCachedData() { - _objc_msgSend_1(this.pointer, _sel_flushCachedData); + bool createDirectoryAtPath_withIntermediateDirectories_attributes_error_( + objc.NSString path, + bool createIntermediates, + objc.NSDictionary? attributes, + ffi.Pointer> error) { + return _objc_msgSend_280( + this.pointer, + _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_, + path.pointer, + createIntermediates, + attributes?.pointer ?? ffi.nullptr, + error); } - void backgroundLoadDidFailWithReason_(NSString reason) { - _objc_msgSend_247( - this.pointer, _sel_backgroundLoadDidFailWithReason_, reason.pointer); + objc.NSArray? contentsOfDirectoryAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_281(this.pointer, + _sel_contentsOfDirectoryAtPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void didLoadBytes_loadComplete_(NSData newBytes, bool yorn) { - _objc_msgSend_264( - this.pointer, _sel_didLoadBytes_loadComplete_, newBytes.pointer, yorn); + objc.NSArray? subpathsOfDirectoryAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_281(this.pointer, + _sel_subpathsOfDirectoryAtPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static bool canInitWithURL_(NSURL anURL) { - return _objc_msgSend_265( - _class_NSURLHandle, _sel_canInitWithURL_, anURL.pointer); + objc.NSDictionary? attributesOfItemAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_282( + this.pointer, _sel_attributesOfItemAtPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSURLHandle cachedHandleForURL_(NSURL anURL) { - final _ret = _objc_msgSend_266( - _class_NSURLHandle, _sel_cachedHandleForURL_, anURL.pointer); - return NSURLHandle._(_ret, retain: true, release: true); + objc.NSDictionary? attributesOfFileSystemForPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_282(this.pointer, + _sel_attributesOfFileSystemForPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSObject initWithURL_cached_(NSURL anURL, bool willCache) { - final _ret = _objc_msgSend_267( - this.pointer, _sel_initWithURL_cached_, anURL.pointer, willCache); - return NSObject._(_ret, retain: true, release: true); + bool createSymbolicLinkAtPath_withDestinationPath_error_(objc.NSString path, + objc.NSString destPath, ffi.Pointer> error) { + return _objc_msgSend_283( + this.pointer, + _sel_createSymbolicLinkAtPath_withDestinationPath_error_, + path.pointer, + destPath.pointer, + error); } - NSObject propertyForKey_(NSString propertyKey) { - final _ret = _objc_msgSend_31( - this.pointer, _sel_propertyForKey_, propertyKey.pointer); - return NSObject._(_ret, retain: true, release: true); + objc.NSString? destinationOfSymbolicLinkAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + final _ret = _objc_msgSend_284(this.pointer, + _sel_destinationOfSymbolicLinkAtPath_error_, path.pointer, error); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject propertyForKeyIfAvailable_(NSString propertyKey) { - final _ret = _objc_msgSend_31( - this.pointer, _sel_propertyForKeyIfAvailable_, propertyKey.pointer); - return NSObject._(_ret, retain: true, release: true); + bool copyItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_283(this.pointer, _sel_copyItemAtPath_toPath_error_, + srcPath.pointer, dstPath.pointer, error); } - bool writeProperty_forKey_(NSObject propertyValue, NSString propertyKey) { - return _objc_msgSend_261(this.pointer, _sel_writeProperty_forKey_, - propertyValue.pointer, propertyKey.pointer); + bool moveItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_283(this.pointer, _sel_moveItemAtPath_toPath_error_, + srcPath.pointer, dstPath.pointer, error); } - bool writeData_(NSData data) { - return _objc_msgSend_24(this.pointer, _sel_writeData_, data.pointer); + bool linkItemAtPath_toPath_error_(objc.NSString srcPath, + objc.NSString dstPath, ffi.Pointer> error) { + return _objc_msgSend_283(this.pointer, _sel_linkItemAtPath_toPath_error_, + srcPath.pointer, dstPath.pointer, error); } - NSData loadInForeground() { - final _ret = _objc_msgSend_43(this.pointer, _sel_loadInForeground); - return NSData._(_ret, retain: true, release: true); + bool removeItemAtPath_error_( + objc.NSString path, ffi.Pointer> error) { + return _objc_msgSend_285( + this.pointer, _sel_removeItemAtPath_error_, path.pointer, error); } - void beginLoadInBackground() { - _objc_msgSend_1(this.pointer, _sel_beginLoadInBackground); + bool copyItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_278(this.pointer, _sel_copyItemAtURL_toURL_error_, + srcURL.pointer, dstURL.pointer, error); } - void endLoadInBackground() { - _objc_msgSend_1(this.pointer, _sel_endLoadInBackground); + bool moveItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_278(this.pointer, _sel_moveItemAtURL_toURL_error_, + srcURL.pointer, dstURL.pointer, error); } - @override - NSURLHandle init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLHandle._(_ret, retain: true, release: true); + bool linkItemAtURL_toURL_error_(objc.NSURL srcURL, objc.NSURL dstURL, + ffi.Pointer> error) { + return _objc_msgSend_278(this.pointer, _sel_linkItemAtURL_toURL_error_, + srcURL.pointer, dstURL.pointer, error); } - static NSURLHandle new1() { - final _ret = _objc_msgSend_2(_class_NSURLHandle, _sel_new); - return NSURLHandle._(_ret, retain: false, release: true); + bool removeItemAtURL_error_( + objc.NSURL URL, ffi.Pointer> error) { + return _objc_msgSend_286( + this.pointer, _sel_removeItemAtURL_error_, URL.pointer, error); } - static NSURLHandle allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSURLHandle, _sel_allocWithZone_, zone); - return NSURLHandle._(_ret, retain: false, release: true); + bool trashItemAtURL_resultingItemURL_error_( + objc.NSURL url, + ffi.Pointer> outResultingURL, + ffi.Pointer> error) { + return _objc_msgSend_287( + this.pointer, + _sel_trashItemAtURL_resultingItemURL_error_, + url.pointer, + outResultingURL, + error); } - static NSURLHandle alloc() { - final _ret = _objc_msgSend_2(_class_NSURLHandle, _sel_alloc); - return NSURLHandle._(_ret, retain: false, release: true); + objc.NSDictionary? fileAttributesAtPath_traverseLink_( + objc.NSString path, bool yorn) { + final _ret = _objc_msgSend_288(this.pointer, + _sel_fileAttributesAtPath_traverseLink_, path.pointer, yorn); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLHandle, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + bool changeFileAttributes_atPath_( + objc.NSDictionary attributes, objc.NSString path) { + return _objc_msgSend_289(this.pointer, _sel_changeFileAttributes_atPath_, + attributes.pointer, path.pointer); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLHandle, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + objc.NSArray? directoryContentsAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_290( + this.pointer, _sel_directoryContentsAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLHandle, _sel_accessInstanceVariablesDirectly); + objc.NSDictionary? fileSystemAttributesAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_291( + this.pointer, _sel_fileSystemAttributesAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLHandle, _sel_useStoredAccessor); + objc.NSString? pathContentOfSymbolicLinkAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_pathContentOfSymbolicLinkAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLHandle, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + bool createSymbolicLinkAtPath_pathContent_( + objc.NSString path, objc.NSString otherpath) { + return _objc_msgSend_292( + this.pointer, + _sel_createSymbolicLinkAtPath_pathContent_, + path.pointer, + otherpath.pointer); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLHandle, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + bool createDirectoryAtPath_attributes_( + objc.NSString path, objc.NSDictionary attributes) { + return _objc_msgSend_293( + this.pointer, + _sel_createDirectoryAtPath_attributes_, + path.pointer, + attributes.pointer); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLHandle, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + bool linkPath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.NSObject? handler) { + return _objc_msgSend_294(this.pointer, _sel_linkPath_toPath_handler_, + src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLHandle, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + bool copyPath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.NSObject? handler) { + return _objc_msgSend_294(this.pointer, _sel_copyPath_toPath_handler_, + src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSURLHandle, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + bool movePath_toPath_handler_( + objc.NSString src, objc.NSString dest, objc.NSObject? handler) { + return _objc_msgSend_294(this.pointer, _sel_movePath_toPath_handler_, + src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); } -} -late final _class_NSURLHandle = objc.getClass("NSURLHandle"); -late final _sel_registerURLHandleClass_ = - objc.registerName("registerURLHandleClass:"); -late final _sel_URLHandleClassForURL_ = - objc.registerName("URLHandleClassForURL:"); -final _objc_msgSend_262 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + bool removeFileAtPath_handler_(objc.NSString path, objc.NSObject? handler) { + return _objc_msgSend_295(this.pointer, _sel_removeFileAtPath_handler_, + path.pointer, handler?.pointer ?? ffi.nullptr); + } -abstract class NSURLHandleStatus { - static const int NSURLHandleNotLoaded = 0; - static const int NSURLHandleLoadSucceeded = 1; - static const int NSURLHandleLoadInProgress = 2; - static const int NSURLHandleLoadFailed = 3; -} + objc.NSString get currentDirectoryPath { + final _ret = _objc_msgSend_12(this.pointer, _sel_currentDirectoryPath); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -late final _sel_status = objc.registerName("status"); -final _objc_msgSend_263 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_failureReason = objc.registerName("failureReason"); -late final _sel_addClient_ = objc.registerName("addClient:"); -late final _sel_removeClient_ = objc.registerName("removeClient:"); -late final _sel_loadInBackground = objc.registerName("loadInBackground"); -late final _sel_cancelLoadInBackground = - objc.registerName("cancelLoadInBackground"); -late final _sel_resourceData = objc.registerName("resourceData"); -late final _sel_availableResourceData = - objc.registerName("availableResourceData"); -late final _sel_expectedResourceDataSize = - objc.registerName("expectedResourceDataSize"); -late final _sel_flushCachedData = objc.registerName("flushCachedData"); -late final _sel_backgroundLoadDidFailWithReason_ = - objc.registerName("backgroundLoadDidFailWithReason:"); -late final _sel_didLoadBytes_loadComplete_ = - objc.registerName("didLoadBytes:loadComplete:"); -final _objc_msgSend_264 = 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_canInitWithURL_ = objc.registerName("canInitWithURL:"); -final _objc_msgSend_265 = 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_cachedHandleForURL_ = objc.registerName("cachedHandleForURL:"); -final _objc_msgSend_266 = 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_initWithURL_cached_ = objc.registerName("initWithURL:cached:"); -final _objc_msgSend_267 = 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_propertyForKeyIfAvailable_ = - objc.registerName("propertyForKeyIfAvailable:"); -late final _sel_writeProperty_forKey_ = - objc.registerName("writeProperty:forKey:"); -late final _sel_writeData_ = objc.registerName("writeData:"); -late final _sel_loadInForeground = objc.registerName("loadInForeground"); -late final _sel_beginLoadInBackground = - objc.registerName("beginLoadInBackground"); -late final _sel_endLoadInBackground = objc.registerName("endLoadInBackground"); -late final _sel_URLHandleUsingCache_ = - objc.registerName("URLHandleUsingCache:"); -final _objc_msgSend_268 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, bool)>(); + bool changeCurrentDirectoryPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_changeCurrentDirectoryPath_, path.pointer); + } -abstract class NSDataWritingOptions { - static const int NSDataWritingAtomic = 1; - static const int NSDataWritingWithoutOverwriting = 2; - static const int NSDataWritingFileProtectionNone = 268435456; - static const int NSDataWritingFileProtectionComplete = 536870912; - static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; - static const int - NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = - 1073741824; - static const int NSDataWritingFileProtectionCompleteWhenUserInactive = - 1342177280; - static const int NSDataWritingFileProtectionMask = 4026531840; - static const int NSAtomicWrite = 1; + bool fileExistsAtPath_(objc.NSString path) { + return _objc_msgSend_51(this.pointer, _sel_fileExistsAtPath_, path.pointer); + } + + bool fileExistsAtPath_isDirectory_( + objc.NSString path, ffi.Pointer isDirectory) { + return _objc_msgSend_296(this.pointer, _sel_fileExistsAtPath_isDirectory_, + path.pointer, isDirectory); + } + + bool isReadableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isReadableFileAtPath_, path.pointer); + } + + bool isWritableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isWritableFileAtPath_, path.pointer); + } + + bool isExecutableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isExecutableFileAtPath_, path.pointer); + } + + bool isDeletableFileAtPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_isDeletableFileAtPath_, path.pointer); + } + + bool contentsEqualAtPath_andPath_(objc.NSString path1, objc.NSString path2) { + return _objc_msgSend_292(this.pointer, _sel_contentsEqualAtPath_andPath_, + path1.pointer, path2.pointer); + } + + objc.NSString displayNameAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_297(this.pointer, _sel_displayNameAtPath_, path.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray? componentsToDisplayForPath_(objc.NSString path) { + final _ret = _objc_msgSend_290( + this.pointer, _sel_componentsToDisplayForPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? enumeratorAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_enumeratorAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? + enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_( + objc.NSURL url, + objc.NSArray? keys, + int mask, + ObjCBlock_bool_NSURL_NSError? handler) { + final _ret = _objc_msgSend_298( + this.pointer, + _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_, + url.pointer, + keys?.pointer ?? ffi.nullptr, + mask, + handler?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray? subpathsAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_290(this.pointer, _sel_subpathsAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSData? contentsAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_299(this.pointer, _sel_contentsAtPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + bool createFileAtPath_contents_attributes_( + objc.NSString path, objc.NSData? data, objc.NSDictionary? attr) { + return _objc_msgSend_300( + this.pointer, + _sel_createFileAtPath_contents_attributes_, + path.pointer, + data?.pointer ?? ffi.nullptr, + attr?.pointer ?? ffi.nullptr); + } + + ffi.Pointer fileSystemRepresentationWithPath_(objc.NSString path) { + return _objc_msgSend_301( + this.pointer, _sel_fileSystemRepresentationWithPath_, path.pointer); + } + + objc.NSString stringWithFileSystemRepresentation_length_( + ffi.Pointer str, int len) { + final _ret = _objc_msgSend_302(this.pointer, + _sel_stringWithFileSystemRepresentation_length_, str, len); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool + replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_( + objc.NSURL originalItemURL, + objc.NSURL newItemURL, + objc.NSString? backupItemName, + int options, + ffi.Pointer> resultingURL, + ffi.Pointer> error) { + return _objc_msgSend_303( + this.pointer, + _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_, + originalItemURL.pointer, + newItemURL.pointer, + backupItemName?.pointer ?? ffi.nullptr, + options, + resultingURL, + error); + } + + bool setUbiquitous_itemAtURL_destinationURL_error_( + bool flag, + objc.NSURL url, + objc.NSURL destinationURL, + ffi.Pointer> error) { + return _objc_msgSend_304( + this.pointer, + _sel_setUbiquitous_itemAtURL_destinationURL_error_, + flag, + url.pointer, + destinationURL.pointer, + error); + } + + bool isUbiquitousItemAtURL_(objc.NSURL url) { + return _objc_msgSend_305( + this.pointer, _sel_isUbiquitousItemAtURL_, url.pointer); + } + + bool startDownloadingUbiquitousItemAtURL_error_( + objc.NSURL url, ffi.Pointer> error) { + return _objc_msgSend_286(this.pointer, + _sel_startDownloadingUbiquitousItemAtURL_error_, url.pointer, error); + } + + bool evictUbiquitousItemAtURL_error_( + objc.NSURL url, ffi.Pointer> error) { + return _objc_msgSend_286( + this.pointer, _sel_evictUbiquitousItemAtURL_error_, url.pointer, error); + } + + objc.NSURL? URLForUbiquityContainerIdentifier_( + objc.NSString? containerIdentifier) { + final _ret = _objc_msgSend_306( + this.pointer, + _sel_URLForUbiquityContainerIdentifier_, + containerIdentifier?.pointer ?? ffi.nullptr); + 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_307( + this.pointer, + _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_, + url.pointer, + outDate, + error); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? get ubiquityIdentityToken { + final _ret = _objc_msgSend_66(this.pointer, _sel_ubiquityIdentityToken); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void getFileProviderServicesForItemAtURL_completionHandler_(objc.NSURL url, + ObjCBlock_ffiVoid_NSDictionary_NSError completionHandler) { + _objc_msgSend_308( + this.pointer, + _sel_getFileProviderServicesForItemAtURL_completionHandler_, + url.pointer, + completionHandler.pointer); + } + + objc.NSURL? containerURLForSecurityApplicationGroupIdentifier_( + objc.NSString groupIdentifier) { + final _ret = _objc_msgSend_11( + this.pointer, + _sel_containerURLForSecurityApplicationGroupIdentifier_, + groupIdentifier.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSURL get homeDirectoryForCurrentUser { + final _ret = + _objc_msgSend_9(this.pointer, _sel_homeDirectoryForCurrentUser); + return objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSURL get temporaryDirectory { + final _ret = _objc_msgSend_9(this.pointer, _sel_temporaryDirectory); + return objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSURL? homeDirectoryForUser_(objc.NSString userName) { + final _ret = _objc_msgSend_11( + this.pointer, _sel_homeDirectoryForUser_, userName.pointer); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSFileManager init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFileManager.castFromPointer(_ret, retain: true, release: true); + } + + static NSFileManager new1() { + final _ret = _objc_msgSend_40(_class_NSFileManager, _sel_new); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); + } + + static NSFileManager allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSFileManager, _sel_allocWithZone_, zone); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); + } + + static NSFileManager alloc() { + final _ret = _objc_msgSend_40(_class_NSFileManager, _sel_alloc); + return NSFileManager.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFileManager, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFileManager, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSFileManager, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSFileManager, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFileManager, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFileManager, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFileManager, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFileManager, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSFileManager, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } } -late final _sel_writeToFile_options_error_ = - objc.registerName("writeToFile:options:error:"); +late final _class_NSFileManager = objc.getClass("NSFileManager"); +late final _sel_defaultManager = objc.registerName("defaultManager"); final _objc_msgSend_269 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_writeToURL_options_error_ = - objc.registerName("writeToURL:options:error:"); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSVolumeEnumerationOptions { + static const int NSVolumeEnumerationSkipHiddenVolumes = 2; + static const int NSVolumeEnumerationProduceFileReferenceURLs = 4; +} + +late final _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_ = objc + .registerName("mountedVolumeURLsIncludingResourceValuesForKeys:options:"); final _objc_msgSend_270 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() + ffi.Int32)>>() .asFunction< - bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer>)>(); + int)>(); -abstract class NSDataSearchOptions { - static const int NSDataSearchBackwards = 1; - static const int NSDataSearchAnchored = 2; +abstract class NSFileManagerUnmountOptions { + static const int NSFileManagerUnmountAllPartitionsAndEjectDisk = 1; + static const int NSFileManagerUnmountWithoutUI = 2; } -late final _sel_rangeOfData_options_range_ = - objc.registerName("rangeOfData:options:range:"); -final _objc_msgSend_271 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -final _objc_msgSend_271Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => +void _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => 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); -final _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( - void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[id] = fn; + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSError_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSError_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_NSError_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSError_closureRegistry[block.ref.target.address]!(arg0); -class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool._(ffi.Pointer pointer, +class ObjCBlock_ffiVoid_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSError._(ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ffiVoid_NSRange_bool castFromPointer( + static ObjCBlock_ffiVoid_NSError castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ffiVoid_NSRange_bool._(pointer, + return ObjCBlock_ffiVoid_NSError._(pointer, retain: retain, release: release); } @@ -14970,20 +12486,16 @@ class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool extends objc.ObjCBlockBase { /// This block must be invoked by native 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_ffiVoid_NSRange_bool.fromFunctionPointer( + ObjCBlock_ffiVoid_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2)>> + ffi.Void Function(ffi.Pointer arg0)>> ptr) : this._(objc.newBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; @@ -14993,21 +12505,18 @@ class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool extends objc.ObjCBlockBase { /// This block must be invoked by native 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_ffiVoid_NSRange_bool.fromFunction( - void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) + ObjCBlock_ffiVoid_NSError.fromFunction(void Function(objc.NSError?) fn) : this._(objc.newBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSError_closureTrampoline) .cast(), - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0, arg1, arg2)))); + _ObjCBlock_ffiVoid_NSError_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSError.castFromPointer(arg0, + retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -15019,22602 +12528,709 @@ class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool extends objc.ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.listener( - void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) + ObjCBlock_ffiVoid_NSError.listener(void Function(objc.NSError?) fn) : this._(objc.newBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSError_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), - _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0, arg1, arg2)))); + _ObjCBlock_ffiVoid_NSError_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSError.castFromPointer(arg0, retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer)>? _dartFuncListenerTrampoline; + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - void call(ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - pointer.ref.invoke + void call(objc.NSError? arg0) => pointer.ref.invoke .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2)>>() + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() .asFunction< void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>()(pointer, arg0, arg1, arg2); + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); } -late final _sel_enumerateByteRangesUsingBlock_ = - objc.registerName("enumerateByteRangesUsingBlock:"); -final _objc_msgSend_272 = 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_dataWithBytes_length_ = - objc.registerName("dataWithBytes:length:"); -final _objc_msgSend_273 = objc.msgSendPointer +late final _sel_unmountVolumeAtURL_options_completionHandler_ = + objc.registerName("unmountVolumeAtURL:options:completionHandler:"); +final _objc_msgSend_271 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); -late final _sel_dataWithBytesNoCopy_length_ = - objc.registerName("dataWithBytesNoCopy:length:"); -late final _sel_dataWithBytesNoCopy_length_freeWhenDone_ = - objc.registerName("dataWithBytesNoCopy:length:freeWhenDone:"); -final _objc_msgSend_274 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>() + ffi.Int32, + ffi.Pointer)>>() .asFunction< - instancetype Function( + void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + ffi.Pointer, int, - bool)>(); + ffi.Pointer)>(); -abstract class NSDataReadingOptions { - static const int NSDataReadingMappedIfSafe = 1; - static const int NSDataReadingUncached = 2; - static const int NSDataReadingMappedAlways = 8; - static const int NSDataReadingMapped = 1; - static const int NSMappedRead = 1; - static const int NSUncachedRead = 2; +abstract class NSDirectoryEnumerationOptions { + static const int NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1; + static const int NSDirectoryEnumerationSkipsPackageDescendants = 2; + static const int NSDirectoryEnumerationSkipsHiddenFiles = 4; + static const int NSDirectoryEnumerationIncludesDirectoriesPostOrder = 8; + static const int NSDirectoryEnumerationProducesRelativePathURLs = 16; } -late final _sel_dataWithContentsOfFile_options_error_ = - objc.registerName("dataWithContentsOfFile:options:error:"); -final _objc_msgSend_275 = objc.msgSendPointer +late final _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_ = + objc.registerName( + "contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:"); +final _objc_msgSend_272 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Pointer>)>>() .asFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, ffi.Pointer>)>(); -late final _sel_dataWithContentsOfURL_options_error_ = - objc.registerName("dataWithContentsOfURL:options:error:"); -final _objc_msgSend_276 = objc.msgSendPointer + +abstract class NSSearchPathDirectory { + static const int NSApplicationDirectory = 1; + static const int NSDemoApplicationDirectory = 2; + static const int NSDeveloperApplicationDirectory = 3; + static const int NSAdminApplicationDirectory = 4; + static const int NSLibraryDirectory = 5; + static const int NSDeveloperDirectory = 6; + static const int NSUserDirectory = 7; + static const int NSDocumentationDirectory = 8; + static const int NSDocumentDirectory = 9; + static const int NSCoreServiceDirectory = 10; + static const int NSAutosavedInformationDirectory = 11; + static const int NSDesktopDirectory = 12; + static const int NSCachesDirectory = 13; + static const int NSApplicationSupportDirectory = 14; + static const int NSDownloadsDirectory = 15; + static const int NSInputMethodsDirectory = 16; + static const int NSMoviesDirectory = 17; + static const int NSMusicDirectory = 18; + static const int NSPicturesDirectory = 19; + static const int NSPrinterDescriptionDirectory = 20; + static const int NSSharedPublicDirectory = 21; + static const int NSPreferencePanesDirectory = 22; + static const int NSApplicationScriptsDirectory = 23; + static const int NSItemReplacementDirectory = 99; + static const int NSAllApplicationsDirectory = 100; + static const int NSAllLibrariesDirectory = 101; + static const int NSTrashDirectory = 102; +} + +abstract class NSSearchPathDomainMask { + static const int NSUserDomainMask = 1; + static const int NSLocalDomainMask = 2; + static const int NSNetworkDomainMask = 4; + static const int NSSystemDomainMask = 8; + static const int NSAllDomainsMask = 65535; +} + +late final _sel_URLsForDirectory_inDomains_ = + objc.registerName("URLsForDirectory:inDomains:"); +final _objc_msgSend_273 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Int32)>>() + .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_274 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, ffi.Int32, + ffi.Int32, + ffi.Pointer, + ffi.Bool, ffi.Pointer>)>>() .asFunction< - instancetype Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, int, + int, + ffi.Pointer, + bool, ffi.Pointer>)>(); -late final _sel_dataWithContentsOfFile_ = - objc.registerName("dataWithContentsOfFile:"); -late final _sel_dataWithContentsOfURL_ = - objc.registerName("dataWithContentsOfURL:"); -final _objc_msgSend_277 = 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_initWithBytes_length_ = - objc.registerName("initWithBytes:length:"); -late final _sel_initWithBytesNoCopy_length_ = - objc.registerName("initWithBytesNoCopy:length:"); -late final _sel_initWithBytesNoCopy_length_freeWhenDone_ = - objc.registerName("initWithBytesNoCopy:length:freeWhenDone:"); -void _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, ffi.UnsignedLong arg1)>>() - .asFunction, int)>()(arg0, arg1); -final _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry = - , int)>{}; -int _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( - void Function(ffi.Pointer, int) fn) { - final id = ++_ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1) => - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong._( - 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_ffiVoid_ffiUnsignedLong castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong._(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_ffiVoid_ffiUnsignedLong.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, ffi.UnsignedLong arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_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_ffiVoid_ffiUnsignedLong.fromFunction( - void Function(ffi.Pointer, int) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => fn(arg0, arg1)))); - 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_ffiVoid_ffiUnsignedLong.listener( - void Function(ffi.Pointer, int) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>.listener( - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => fn(arg0, arg1)))); - static ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong)>? _dartFuncListenerTrampoline; - void call(ffi.Pointer arg0, int arg1) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0, ffi.UnsignedLong arg1)>>() - .asFunction< - void Function(ffi.Pointer, ffi.Pointer, - int)>()(pointer, arg0, arg1); +abstract class NSURLRelationship { + static const int NSURLRelationshipContains = 0; + static const int NSURLRelationshipSame = 1; + static const int NSURLRelationshipOther = 2; } -late final _sel_initWithBytesNoCopy_length_deallocator_ = - objc.registerName("initWithBytesNoCopy:length:deallocator:"); -final _objc_msgSend_278 = objc.msgSendPointer +late final _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_ = + objc.registerName("getRelationship:ofDirectoryAtURL:toItemAtURL:error:"); +final _objc_msgSend_275 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< - instancetype Function( + bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_initWithContentsOfFile_options_error_ = - objc.registerName("initWithContentsOfFile:options:error:"); -late final _sel_initWithContentsOfURL_options_error_ = - objc.registerName("initWithContentsOfURL:options:error:"); -late final _sel_initWithData_ = objc.registerName("initWithData:"); -final _objc_msgSend_279 = 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_dataWithData_ = objc.registerName("dataWithData:"); - -abstract class NSDataBase64DecodingOptions { - static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; -} - -late final _sel_initWithBase64EncodedString_options_ = - objc.registerName("initWithBase64EncodedString:options:"); -final _objc_msgSend_280 = objc.msgSendPointer + 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_276 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, ffi.Pointer, - ffi.Int32)>>() + ffi.Pointer>)>>() .asFunction< - instancetype Function( + bool Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, + int, + int, ffi.Pointer, - int)>(); - -abstract class NSDataBase64EncodingOptions { - static const int NSDataBase64Encoding64CharacterLineLength = 1; - static const int NSDataBase64Encoding76CharacterLineLength = 2; - static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; - static const int NSDataBase64EncodingEndLineWithLineFeed = 32; -} - -late final _sel_base64EncodedStringWithOptions_ = - objc.registerName("base64EncodedStringWithOptions:"); -final _objc_msgSend_281 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_initWithBase64EncodedData_options_ = - objc.registerName("initWithBase64EncodedData:options:"); -final _objc_msgSend_282 = objc.msgSendPointer + ffi.Pointer>)>(); +late final _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_ = + objc.registerName( + "createDirectoryAtURL:withIntermediateDirectories:attributes:error:"); +final _objc_msgSend_277 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32)>>() + ffi.Bool, + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< - instancetype Function( + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int)>(); -late final _sel_base64EncodedDataWithOptions_ = - objc.registerName("base64EncodedDataWithOptions:"); -final _objc_msgSend_283 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); - -abstract class NSDataCompressionAlgorithm { - static const int NSDataCompressionAlgorithmLZFSE = 0; - static const int NSDataCompressionAlgorithmLZ4 = 1; - static const int NSDataCompressionAlgorithmLZMA = 2; - static const int NSDataCompressionAlgorithmZlib = 3; -} - -late final _sel_decompressedDataUsingAlgorithm_error_ = - objc.registerName("decompressedDataUsingAlgorithm:error:"); -final _objc_msgSend_284 = objc.msgSendPointer + bool, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_createSymbolicLinkAtURL_withDestinationURL_error_ = + objc.registerName("createSymbolicLinkAtURL:withDestinationURL:error:"); +final _objc_msgSend_278 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, + ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>>() .asFunction< - instancetype Function( + bool Function( ffi.Pointer, ffi.Pointer, - int, + ffi.Pointer, + ffi.Pointer, ffi.Pointer>)>(); -late final _sel_compressedDataUsingAlgorithm_error_ = - objc.registerName("compressedDataUsingAlgorithm:error:"); -late final _sel_getBytes_ = objc.registerName("getBytes:"); -late final _sel_dataWithContentsOfMappedFile_ = - objc.registerName("dataWithContentsOfMappedFile:"); -late final _sel_initWithContentsOfMappedFile_ = - objc.registerName("initWithContentsOfMappedFile:"); -late final _sel_initWithBase64Encoding_ = - objc.registerName("initWithBase64Encoding:"); -late final _sel_base64Encoding = objc.registerName("base64Encoding"); -late final _sel_encodeDataObject_ = objc.registerName("encodeDataObject:"); -final _objc_msgSend_285 = objc.msgSendPointer +late final _sel_setAttributes_ofItemAtPath_error_ = + objc.registerName("setAttributes:ofItemAtPath:error:"); +final _objc_msgSend_279 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_decodeDataObject = objc.registerName("decodeDataObject"); -final _objc_msgSend_286 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_decodeValueOfObjCType_at_size_ = - objc.registerName("decodeValueOfObjCType:at:size:"); -final _objc_msgSend_287 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< - void Function( + bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_versionForClassName_ = - objc.registerName("versionForClassName:"); -final _objc_msgSend_288 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_ = + objc.registerName( + "createDirectoryAtPath:withIntermediateDirectories:attributes:error:"); +final _objc_msgSend_280 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Long Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_encodeObject_ = objc.registerName("encodeObject:"); -final _objc_msgSend_289 = 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_encodeRootObject_ = objc.registerName("encodeRootObject:"); -late final _sel_encodeBycopyObject_ = objc.registerName("encodeBycopyObject:"); -late final _sel_encodeByrefObject_ = objc.registerName("encodeByrefObject:"); -late final _sel_encodeConditionalObject_ = - objc.registerName("encodeConditionalObject:"); -late final _sel_encodeValuesOfObjCTypes_ = - objc.registerName("encodeValuesOfObjCTypes:"); -final _objc_msgSend_290 = 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_encodeArrayOfObjCType_count_at_ = - objc.registerName("encodeArrayOfObjCType:count:at:"); -final _objc_msgSend_291 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( + ffi.Bool, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>() + ffi.Pointer>)>>() .asFunction< - void Function( + bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_encodeBytes_length_ = objc.registerName("encodeBytes:length:"); -late final _sel_decodeObject = objc.registerName("decodeObject"); -late final _sel_decodeTopLevelObjectAndReturnError_ = - objc.registerName("decodeTopLevelObjectAndReturnError:"); -final _objc_msgSend_292 = objc.msgSendPointer + ffi.Pointer, + bool, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_contentsOfDirectoryAtPath_error_ = + objc.registerName("contentsOfDirectoryAtPath:error:"); +final _objc_msgSend_281 = 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_decodeValuesOfObjCTypes_ = - objc.registerName("decodeValuesOfObjCTypes:"); -late final _sel_decodeArrayOfObjCType_count_at_ = - objc.registerName("decodeArrayOfObjCType:count:at:"); -late final _sel_decodeBytesWithReturnedLength_ = - objc.registerName("decodeBytesWithReturnedLength:"); -final _objc_msgSend_293 = objc.msgSendPointer +late final _sel_subpathsOfDirectoryAtPath_error_ = + objc.registerName("subpathsOfDirectoryAtPath:error:"); +late final _sel_attributesOfItemAtPath_error_ = + objc.registerName("attributesOfItemAtPath:error:"); +final _objc_msgSend_282 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_encodePropertyList_ = objc.registerName("encodePropertyList:"); -late final _sel_decodePropertyList = objc.registerName("decodePropertyList"); -late final _sel_setObjectZone_ = objc.registerName("setObjectZone:"); -final _objc_msgSend_294 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<_NSZone>)>(); -late final _sel_objectZone = objc.registerName("objectZone"); -final _objc_msgSend_295 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer<_NSZone> Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer<_NSZone> Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_systemVersion = objc.registerName("systemVersion"); -late final _sel_allowsKeyedCoding = objc.registerName("allowsKeyedCoding"); -late final _sel_encodeObject_forKey_ = - objc.registerName("encodeObject:forKey:"); -late final _sel_encodeConditionalObject_forKey_ = - objc.registerName("encodeConditionalObject:forKey:"); -late final _sel_encodeBool_forKey_ = objc.registerName("encodeBool:forKey:"); -final _objc_msgSend_296 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>() + ffi.Pointer>)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - bool, - ffi.Pointer)>(); -late final _sel_encodeInt_forKey_ = objc.registerName("encodeInt:forKey:"); -final _objc_msgSend_297 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int, - ffi.Pointer)>>() - .asFunction< - void Function( ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_encodeInt32_forKey_ = objc.registerName("encodeInt32:forKey:"); -final _objc_msgSend_298 = objc.msgSendPointer + 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_283 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< - void Function( + bool Function( ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_encodeInt64_forKey_ = objc.registerName("encodeInt64:forKey:"); -final _objc_msgSend_299 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_destinationOfSymbolicLinkAtPath_error_ = + objc.registerName("destinationOfSymbolicLinkAtPath:error:"); +final _objc_msgSend_284 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int64, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_encodeFloat_forKey_ = objc.registerName("encodeFloat:forKey:"); -final _objc_msgSend_300 = objc.msgSendPointer + 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_285 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Float, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< - void Function( + bool Function( ffi.Pointer, ffi.Pointer, - double, - ffi.Pointer)>(); -late final _sel_encodeDouble_forKey_ = - objc.registerName("encodeDouble:forKey:"); -final _objc_msgSend_301 = objc.msgSendPointer + 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_286 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Double, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< - void Function( + bool Function( ffi.Pointer, ffi.Pointer, - double, - ffi.Pointer)>(); -late final _sel_encodeBytes_length_forKey_ = - objc.registerName("encodeBytes:length:forKey:"); -final _objc_msgSend_302 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_trashItemAtURL_resultingItemURL_error_ = + objc.registerName("trashItemAtURL:resultingItemURL:error:"); +final _objc_msgSend_287 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() .asFunction< - void Function( + bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_containsValueForKey_ = - objc.registerName("containsValueForKey:"); -late final _sel_decodeObjectForKey_ = objc.registerName("decodeObjectForKey:"); -late final _sel_decodeTopLevelObjectForKey_error_ = - objc.registerName("decodeTopLevelObjectForKey:error:"); -final _objc_msgSend_303 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +late final _sel_fileAttributesAtPath_traverseLink_ = + objc.registerName("fileAttributesAtPath:traverseLink:"); +final _objc_msgSend_288 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>() + ffi.Bool)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); -late final _sel_decodeBoolForKey_ = objc.registerName("decodeBoolForKey:"); -late final _sel_decodeIntForKey_ = objc.registerName("decodeIntForKey:"); -final _objc_msgSend_304 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_decodeInt32ForKey_ = objc.registerName("decodeInt32ForKey:"); -final _objc_msgSend_305 = objc.msgSendPointer + bool)>(); +late final _sel_changeFileAttributes_atPath_ = + objc.registerName("changeFileAttributes:atPath:"); +final _objc_msgSend_289 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_decodeInt64ForKey_ = objc.registerName("decodeInt64ForKey:"); -final _objc_msgSend_306 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int64 Function( ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_decodeFloatForKey_ = objc.registerName("decodeFloatForKey:"); -final _objc_msgSend_307 = objc.msgSendPointer + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_directoryContentsAtPath_ = + objc.registerName("directoryContentsAtPath:"); +final _objc_msgSend_290 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Float Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - double Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_307Fpret = objc.msgSendFpretPointer +late final _sel_fileSystemAttributesAtPath_ = + objc.registerName("fileSystemAttributesAtPath:"); +final _objc_msgSend_291 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Float Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - double Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_decodeDoubleForKey_ = objc.registerName("decodeDoubleForKey:"); -final _objc_msgSend_308 = objc.msgSendPointer +late final _sel_pathContentOfSymbolicLinkAtPath_ = + objc.registerName("pathContentOfSymbolicLinkAtPath:"); +late final _sel_createSymbolicLinkAtPath_pathContent_ = + objc.registerName("createSymbolicLinkAtPath:pathContent:"); +final _objc_msgSend_292 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Double Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - double Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_308Fpret = objc.msgSendFpretPointer - .cast< - ffi.NativeFunction< - ffi.Double Function( ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() .asFunction< - double Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_decodeBytesForKey_returnedLength_ = - objc.registerName("decodeBytesForKey:returnedLength:"); -final _objc_msgSend_309 = objc.msgSendPointer + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_createDirectoryAtPath_attributes_ = + objc.registerName("createDirectoryAtPath:attributes:"); +final _objc_msgSend_293 = 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( + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_encodeInteger_forKey_ = - objc.registerName("encodeInteger:forKey:"); -final _objc_msgSend_310 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_linkPath_toPath_handler_ = + objc.registerName("linkPath:toPath:handler:"); +final _objc_msgSend_294 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Long, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( + bool Function( ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_decodeIntegerForKey_ = - objc.registerName("decodeIntegerForKey:"); -late final _sel_requiresSecureCoding = - objc.registerName("requiresSecureCoding"); -late final _sel_decodeObjectOfClass_forKey_ = - objc.registerName("decodeObjectOfClass:forKey:"); -final _objc_msgSend_311 = 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_decodeTopLevelObjectOfClass_forKey_error_ = - objc.registerName("decodeTopLevelObjectOfClass:forKey:error:"); -final _objc_msgSend_312 = 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_decodeArrayOfObjectsOfClass_forKey_ = - objc.registerName("decodeArrayOfObjectsOfClass:forKey:"); -final _objc_msgSend_313 = 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_decodeDictionaryWithKeysOfClass_objectsOfClass_forKey_ = - objc.registerName("decodeDictionaryWithKeysOfClass:objectsOfClass:forKey:"); -final _objc_msgSend_314 = 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_decodeObjectOfClasses_forKey_ = - objc.registerName("decodeObjectOfClasses:forKey:"); -final _objc_msgSend_315 = 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_decodeTopLevelObjectOfClasses_forKey_error_ = - objc.registerName("decodeTopLevelObjectOfClasses:forKey: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_decodeArrayOfObjectsOfClasses_forKey_ = - objc.registerName("decodeArrayOfObjectsOfClasses:forKey:"); -final _objc_msgSend_317 = 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_decodeDictionaryWithKeysOfClasses_objectsOfClasses_forKey_ = - objc.registerName( - "decodeDictionaryWithKeysOfClasses:objectsOfClasses:forKey:"); -final _objc_msgSend_318 = 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_decodePropertyListForKey_ = - objc.registerName("decodePropertyListForKey:"); -late final _sel_allowedClasses = objc.registerName("allowedClasses"); -final _objc_msgSend_319 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_failWithError_ = objc.registerName("failWithError:"); -final _objc_msgSend_320 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSDecodingFailurePolicy { - static const int NSDecodingFailurePolicyRaiseException = 0; - static const int NSDecodingFailurePolicySetErrorAndReturn = 1; -} - -late final _sel_decodingFailurePolicy = - objc.registerName("decodingFailurePolicy"); -final _objc_msgSend_321 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_error = objc.registerName("error"); -final _objc_msgSend_322 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_encodeNXObject_ = objc.registerName("encodeNXObject:"); -late final _sel_decodeNXObject = objc.registerName("decodeNXObject"); -late final _sel_decodeValueOfObjCType_at_ = - objc.registerName("decodeValueOfObjCType:at:"); -late final _sel_encodePoint_ = objc.registerName("encodePoint:"); -final _objc_msgSend_323 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, CGPoint)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, CGPoint)>(); -late final _sel_decodePoint = objc.registerName("decodePoint"); -late final _sel_encodeSize_ = objc.registerName("encodeSize:"); -final _objc_msgSend_324 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, CGSize)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, CGSize)>(); -late final _sel_decodeSize = objc.registerName("decodeSize"); -late final _sel_encodeRect_ = objc.registerName("encodeRect:"); -final _objc_msgSend_325 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, CGRect)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, CGRect)>(); -late final _sel_decodeRect = objc.registerName("decodeRect"); -late final _sel_encodePoint_forKey_ = objc.registerName("encodePoint:forKey:"); -final _objc_msgSend_326 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - CGPoint, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - CGPoint, - ffi.Pointer)>(); -late final _sel_encodeSize_forKey_ = objc.registerName("encodeSize:forKey:"); -final _objc_msgSend_327 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - CGSize, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - CGSize, - ffi.Pointer)>(); -late final _sel_encodeRect_forKey_ = objc.registerName("encodeRect:forKey:"); -final _objc_msgSend_328 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - CGRect, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - CGRect, - ffi.Pointer)>(); -late final _sel_decodePointForKey_ = objc.registerName("decodePointForKey:"); -final _objc_msgSend_329 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - CGPoint Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - CGPoint Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_329Stret = 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_decodeSizeForKey_ = objc.registerName("decodeSizeForKey:"); -final _objc_msgSend_330 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - CGSize Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - CGSize Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_330Stret = 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_decodeRectForKey_ = objc.registerName("decodeRectForKey:"); -final _objc_msgSend_331 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - CGRect Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - CGRect Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_331Stret = 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_substringFromIndex_ = objc.registerName("substringFromIndex:"); -final _objc_msgSend_332 = 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_substringToIndex_ = objc.registerName("substringToIndex:"); -late final _sel_substringWithRange_ = objc.registerName("substringWithRange:"); -final _objc_msgSend_333 = 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_getCharacters_range_ = - objc.registerName("getCharacters:range:"); -final _objc_msgSend_334 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -final _objc_msgSend_335 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSStringCompareOptions { - static const int NSCaseInsensitiveSearch = 1; - static const int NSLiteralSearch = 2; - static const int NSBackwardsSearch = 4; - static const int NSAnchoredSearch = 8; - static const int NSNumericSearch = 64; - static const int NSDiacriticInsensitiveSearch = 128; - static const int NSWidthInsensitiveSearch = 256; - static const int NSForcedOrderingSearch = 512; - static const int NSRegularExpressionSearch = 1024; -} - -late final _sel_compare_options_ = objc.registerName("compare:options:"); -final _objc_msgSend_336 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_compare_options_range_ = - objc.registerName("compare:options:range:"); -final _objc_msgSend_337 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -late final _sel_compare_options_range_locale_ = - objc.registerName("compare:options:range:locale:"); -final _objc_msgSend_338 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>() - .asFunction< - int Function( ffi.Pointer, - ffi.Pointer, ffi.Pointer, - int, - _NSRange, ffi.Pointer)>(); -late final _sel_caseInsensitiveCompare_ = - objc.registerName("caseInsensitiveCompare:"); -late final _sel_localizedCompare_ = objc.registerName("localizedCompare:"); -late final _sel_localizedCaseInsensitiveCompare_ = - objc.registerName("localizedCaseInsensitiveCompare:"); -late final _sel_localizedStandardCompare_ = - objc.registerName("localizedStandardCompare:"); -late final _sel_isEqualToString_ = objc.registerName("isEqualToString:"); -late final _sel_hasPrefix_ = objc.registerName("hasPrefix:"); -late final _sel_hasSuffix_ = objc.registerName("hasSuffix:"); -late final _sel_commonPrefixWithString_options_ = - objc.registerName("commonPrefixWithString:options:"); -final _objc_msgSend_339 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_containsString_ = objc.registerName("containsString:"); -late final _sel_localizedCaseInsensitiveContainsString_ = - objc.registerName("localizedCaseInsensitiveContainsString:"); -late final _sel_localizedStandardContainsString_ = - objc.registerName("localizedStandardContainsString:"); -late final _sel_localizedStandardRangeOfString_ = - objc.registerName("localizedStandardRangeOfString:"); -final _objc_msgSend_340 = 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_340Stret = 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_rangeOfString_ = objc.registerName("rangeOfString:"); -late final _sel_rangeOfString_options_ = - objc.registerName("rangeOfString:options:"); -final _objc_msgSend_341 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -final _objc_msgSend_341Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_rangeOfString_options_range_ = - objc.registerName("rangeOfString:options:range:"); -final _objc_msgSend_342 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -final _objc_msgSend_342Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -late final _sel_rangeOfString_options_range_locale_ = - objc.registerName("rangeOfString:options:range:locale:"); -final _objc_msgSend_343 = objc.msgSendPointer +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_295 = objc.msgSendPointer .cast< ffi.NativeFunction< - _NSRange Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - _NSRange, ffi.Pointer)>>() .asFunction< - _NSRange Function( + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - _NSRange, ffi.Pointer)>(); -final _objc_msgSend_343Stret = objc.msgSendStretPointer +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_296 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - _NSRange, - ffi.Pointer)>>() + ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer<_NSRange>, + bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - _NSRange, - ffi.Pointer)>(); -late final _sel_rangeOfCharacterFromSet_ = - objc.registerName("rangeOfCharacterFromSet:"); -final _objc_msgSend_344 = 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_344Stret = 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_rangeOfCharacterFromSet_options_ = - objc.registerName("rangeOfCharacterFromSet:options:"); -final _objc_msgSend_345 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -final _objc_msgSend_345Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_rangeOfCharacterFromSet_options_range_ = - objc.registerName("rangeOfCharacterFromSet:options:range:"); -final _objc_msgSend_346 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -final _objc_msgSend_346Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -late final _sel_rangeOfComposedCharacterSequenceAtIndex_ = - objc.registerName("rangeOfComposedCharacterSequenceAtIndex:"); -final _objc_msgSend_347 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, int)>(); -final _objc_msgSend_347Stret = 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_rangeOfComposedCharacterSequencesForRange_ = - objc.registerName("rangeOfComposedCharacterSequencesForRange:"); -final _objc_msgSend_348 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() - .asFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); -final _objc_msgSend_348Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function(ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer, _NSRange)>(); -late final _sel_stringByAppendingString_ = - objc.registerName("stringByAppendingString:"); -late final _sel_stringByAppendingFormat_ = - objc.registerName("stringByAppendingFormat:"); -late final _sel_uppercaseString = objc.registerName("uppercaseString"); -late final _sel_lowercaseString = objc.registerName("lowercaseString"); -late final _sel_capitalizedString = objc.registerName("capitalizedString"); -late final _sel_localizedUppercaseString = - objc.registerName("localizedUppercaseString"); -late final _sel_localizedLowercaseString = - objc.registerName("localizedLowercaseString"); -late final _sel_localizedCapitalizedString = - objc.registerName("localizedCapitalizedString"); -late final _sel_uppercaseStringWithLocale_ = - objc.registerName("uppercaseStringWithLocale:"); -final _objc_msgSend_349 = 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_lowercaseStringWithLocale_ = - objc.registerName("lowercaseStringWithLocale:"); -late final _sel_capitalizedStringWithLocale_ = - objc.registerName("capitalizedStringWithLocale:"); -late final _sel_getLineStart_end_contentsEnd_forRange_ = - objc.registerName("getLineStart:end:contentsEnd:forRange:"); -final _objc_msgSend_350 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_lineRangeForRange_ = objc.registerName("lineRangeForRange:"); -late final _sel_getParagraphStart_end_contentsEnd_forRange_ = - objc.registerName("getParagraphStart:end:contentsEnd:forRange:"); -late final _sel_paragraphRangeForRange_ = - objc.registerName("paragraphRangeForRange:"); - -abstract class NSStringEnumerationOptions { - static const int NSStringEnumerationByLines = 0; - static const int NSStringEnumerationByParagraphs = 1; - static const int NSStringEnumerationByComposedCharacterSequences = 2; - static const int NSStringEnumerationByWords = 3; - static const int NSStringEnumerationBySentences = 4; - static const int NSStringEnumerationByCaretPositions = 5; - static const int NSStringEnumerationByDeletionClusters = 6; - static const int NSStringEnumerationReverse = 256; - static const int NSStringEnumerationSubstringNotRequired = 512; - static const int NSStringEnumerationLocalized = 1024; -} - -void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function(ffi.Pointer, _NSRange, _NSRange, - ffi.Pointer)>()(arg0, arg1, arg2, arg3); -final _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry = , _NSRange, _NSRange, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( - void Function(ffi.Pointer, _NSRange, _NSRange, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3) => - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2, arg3); - -class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool - extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunction( - void Function(NSString?, _NSRange, _NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - _NSRange arg2, ffi.Pointer arg3) => - fn(arg0.address == 0 ? null : NSString._(arg0, retain: true, release: true), arg1, arg2, arg3)))); - 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_NSString_NSRange_NSRange_bool.listener( - void Function(NSString?, _NSRange, _NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - _NSRange arg2, ffi.Pointer arg3) => - fn(arg0.address == 0 ? null : NSString._(arg0, retain: true, release: true), arg1, arg2, arg3)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSString? arg0, _NSRange arg1, _NSRange arg2, - ffi.Pointer arg3) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - _NSRange arg2, - ffi.Pointer arg3)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - _NSRange, - ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2, arg3); -} - -late final _sel_enumerateSubstringsInRange_options_usingBlock_ = - objc.registerName("enumerateSubstringsInRange:options:usingBlock:"); -final _objc_msgSend_351 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); -void _ObjCBlock_ffiVoid_NSString_bool_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); -final _ObjCBlock_ffiVoid_NSString_bool_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSString_bool_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_ffiVoid_NSString_bool extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSString_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_NSString_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSString_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSString_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - objc - .newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_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_NSString_bool.fromFunction( - void Function(NSString, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSString_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSString._(arg0, retain: true, release: true), arg1)))); - 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_NSString_bool.listener( - void Function(NSString, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSString_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSString._(arg0, retain: true, release: true), arg1)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSString arg0, ffi.Pointer 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, arg1); -} - -late final _sel_enumerateLinesUsingBlock_ = - objc.registerName("enumerateLinesUsingBlock:"); -final _objc_msgSend_352 = 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_UTF8String = objc.registerName("UTF8String"); -late final _sel_fastestEncoding = objc.registerName("fastestEncoding"); -late final _sel_smallestEncoding = objc.registerName("smallestEncoding"); -late final _sel_dataUsingEncoding_allowLossyConversion_ = - objc.registerName("dataUsingEncoding:allowLossyConversion:"); -final _objc_msgSend_353 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong, ffi.Bool)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int, bool)>(); -late final _sel_dataUsingEncoding_ = objc.registerName("dataUsingEncoding:"); -final _objc_msgSend_354 = 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_canBeConvertedToEncoding_ = - objc.registerName("canBeConvertedToEncoding:"); -late final _sel_cStringUsingEncoding_ = - objc.registerName("cStringUsingEncoding:"); -late final _sel_getCString_maxLength_encoding_ = - objc.registerName("getCString:maxLength:encoding:"); -final _objc_msgSend_355 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int)>(); - -abstract class NSStringEncodingConversionOptions { - static const int NSStringEncodingConversionAllowLossy = 1; - static const int NSStringEncodingConversionExternalRepresentation = 2; -} - -late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_ = - objc.registerName( - "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); -final _objc_msgSend_356 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Int32, - _NSRange, - ffi.Pointer<_NSRange>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int, - int, - _NSRange, - ffi.Pointer<_NSRange>)>(); -late final _sel_maximumLengthOfBytesUsingEncoding_ = - objc.registerName("maximumLengthOfBytesUsingEncoding:"); -late final _sel_lengthOfBytesUsingEncoding_ = - objc.registerName("lengthOfBytesUsingEncoding:"); -late final _sel_availableStringEncodings = - objc.registerName("availableStringEncodings"); -final _objc_msgSend_357 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_localizedNameOfStringEncoding_ = - objc.registerName("localizedNameOfStringEncoding:"); -late final _sel_defaultCStringEncoding = - objc.registerName("defaultCStringEncoding"); -late final _sel_decomposedStringWithCanonicalMapping = - objc.registerName("decomposedStringWithCanonicalMapping"); -late final _sel_precomposedStringWithCanonicalMapping = - objc.registerName("precomposedStringWithCanonicalMapping"); -late final _sel_decomposedStringWithCompatibilityMapping = - objc.registerName("decomposedStringWithCompatibilityMapping"); -late final _sel_precomposedStringWithCompatibilityMapping = - objc.registerName("precomposedStringWithCompatibilityMapping"); -late final _sel_componentsSeparatedByString_ = - objc.registerName("componentsSeparatedByString:"); -final _objc_msgSend_358 = 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_componentsSeparatedByCharactersInSet_ = - objc.registerName("componentsSeparatedByCharactersInSet:"); -final _objc_msgSend_359 = 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_stringByTrimmingCharactersInSet_ = - objc.registerName("stringByTrimmingCharactersInSet:"); -final _objc_msgSend_360 = 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_stringByPaddingToLength_withString_startingAtIndex_ = - objc.registerName("stringByPaddingToLength:withString:startingAtIndex:"); -final _objc_msgSend_361 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - int)>(); -late final _sel_stringByFoldingWithOptions_locale_ = - objc.registerName("stringByFoldingWithOptions:locale:"); -final _objc_msgSend_362 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_ = - objc.registerName( - "stringByReplacingOccurrencesOfString:withString:options:range:"); -final _objc_msgSend_363 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -late final _sel_stringByReplacingOccurrencesOfString_withString_ = - objc.registerName("stringByReplacingOccurrencesOfString:withString:"); -final _objc_msgSend_364 = 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_stringByReplacingCharactersInRange_withString_ = - objc.registerName("stringByReplacingCharactersInRange:withString:"); -final _objc_msgSend_365 = 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_stringByApplyingTransform_reverse_ = - objc.registerName("stringByApplyingTransform:reverse:"); -final _objc_msgSend_366 = 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_writeToURL_atomically_encoding_error_ = - objc.registerName("writeToURL:atomically:encoding:error:"); -final _objc_msgSend_367 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.UnsignedLong, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); -late final _sel_writeToFile_atomically_encoding_error_ = - objc.registerName("writeToFile:atomically:encoding:error:"); -final _objc_msgSend_368 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.UnsignedLong, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - int, - ffi.Pointer>)>(); -late final _sel_hash = objc.registerName("hash"); -late final _sel_initWithCharactersNoCopy_length_freeWhenDone_ = - objc.registerName("initWithCharactersNoCopy:length:freeWhenDone:"); -final _objc_msgSend_369 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - bool)>(); -void _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1)>>() - .asFunction, int)>()( - arg0, arg1); -final _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry = - , int)>{}; -int _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( - void Function(ffi.Pointer, int) fn) { - final id = - ++_ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1) => - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong - extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong._( - 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_ffiUnsignedShort_ffiUnsignedLong castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong._(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_ffiUnsignedShort_ffiUnsignedLong.fromFunctionPointer( - ffi - .Pointer< - ffi - .NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.UnsignedLong arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_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_ffiUnsignedShort_ffiUnsignedLong.fromFunction( - void Function(ffi.Pointer, int) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>( - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => - fn(arg0, arg1)))); - 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_ffiUnsignedShort_ffiUnsignedLong.listener( - void Function(ffi.Pointer, int) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>.listener( - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( - (ffi.Pointer arg0, int arg1) => - fn(arg0, arg1)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>? _dartFuncListenerTrampoline; - - void call(ffi.Pointer arg0, int arg1) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.UnsignedLong arg1)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>()(pointer, arg0, arg1); -} - -late final _sel_initWithCharactersNoCopy_length_deallocator_ = - objc.registerName("initWithCharactersNoCopy:length:deallocator:"); -final _objc_msgSend_370 = 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_initWithCharacters_length_ = - objc.registerName("initWithCharacters:length:"); -final _objc_msgSend_371 = 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_initWithUTF8String_ = objc.registerName("initWithUTF8String:"); -final _objc_msgSend_372 = 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_initWithFormat_ = objc.registerName("initWithFormat:"); -late final _sel_initWithFormat_arguments_ = - objc.registerName("initWithFormat:arguments:"); -final _objc_msgSend_373 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); -late final _sel_initWithFormat_locale_ = - objc.registerName("initWithFormat:locale:"); -final _objc_msgSend_374 = 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_initWithFormat_locale_arguments_ = - objc.registerName("initWithFormat:locale:arguments:"); -final _objc_msgSend_375 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); -late final _sel_initWithValidatedFormat_validFormatSpecifiers_error_ = - objc.registerName("initWithValidatedFormat:validFormatSpecifiers:error:"); -final _objc_msgSend_376 = 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_initWithValidatedFormat_validFormatSpecifiers_locale_error_ = - objc.registerName( - "initWithValidatedFormat:validFormatSpecifiers:locale:error:"); -final _objc_msgSend_377 = 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_initWithValidatedFormat_validFormatSpecifiers_arguments_error_ = - objc.registerName( - "initWithValidatedFormat:validFormatSpecifiers:arguments:error:"); -final _objc_msgSend_378 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>(); -late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_ = - objc.registerName( - "initWithValidatedFormat:validFormatSpecifiers:locale:arguments:error:"); -final _objc_msgSend_379 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>, - ffi.Pointer>)>(); -late final _sel_initWithData_encoding_ = - objc.registerName("initWithData:encoding:"); -final _objc_msgSend_380 = 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_initWithBytes_length_encoding_ = - objc.registerName("initWithBytes:length:encoding:"); -final _objc_msgSend_381 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int, int)>(); -late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_ = - objc.registerName("initWithBytesNoCopy:length:encoding:freeWhenDone:"); -final _objc_msgSend_382 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Bool)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - bool)>(); -late final _sel_initWithBytesNoCopy_length_encoding_deallocator_ = - objc.registerName("initWithBytesNoCopy:length:encoding:deallocator:"); -final _objc_msgSend_383 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer)>(); -late final _sel_string = objc.registerName("string"); -late final _sel_stringWithString_ = objc.registerName("stringWithString:"); -late final _sel_stringWithCharacters_length_ = - objc.registerName("stringWithCharacters:length:"); -late final _sel_stringWithUTF8String_ = - objc.registerName("stringWithUTF8String:"); -late final _sel_stringWithFormat_ = objc.registerName("stringWithFormat:"); -late final _sel_localizedStringWithFormat_ = - objc.registerName("localizedStringWithFormat:"); -late final _sel_stringWithValidatedFormat_validFormatSpecifiers_error_ = - objc.registerName("stringWithValidatedFormat:validFormatSpecifiers:error:"); -late final _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_ = - objc.registerName( - "localizedStringWithValidatedFormat:validFormatSpecifiers:error:"); -late final _sel_initWithCString_encoding_ = - objc.registerName("initWithCString:encoding:"); -final _objc_msgSend_384 = 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_stringWithCString_encoding_ = - objc.registerName("stringWithCString:encoding:"); -late final _sel_initWithContentsOfURL_encoding_error_ = - objc.registerName("initWithContentsOfURL:encoding:error:"); -final _objc_msgSend_385 = 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_initWithContentsOfFile_encoding_error_ = - objc.registerName("initWithContentsOfFile:encoding:error:"); -final _objc_msgSend_386 = 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_stringWithContentsOfURL_encoding_error_ = - objc.registerName("stringWithContentsOfURL:encoding:error:"); -late final _sel_stringWithContentsOfFile_encoding_error_ = - objc.registerName("stringWithContentsOfFile:encoding:error:"); -late final _sel_initWithContentsOfURL_usedEncoding_error_ = - objc.registerName("initWithContentsOfURL:usedEncoding:error:"); -final _objc_msgSend_387 = 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_initWithContentsOfFile_usedEncoding_error_ = - objc.registerName("initWithContentsOfFile:usedEncoding:error:"); -final _objc_msgSend_388 = 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_stringWithContentsOfURL_usedEncoding_error_ = - objc.registerName("stringWithContentsOfURL:usedEncoding:error:"); -late final _sel_stringWithContentsOfFile_usedEncoding_error_ = - objc.registerName("stringWithContentsOfFile:usedEncoding:error:"); -late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_ = - objc.registerName( - "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); -final _objc_msgSend_389 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>(); -late final _sel_propertyList = objc.registerName("propertyList"); -late final _sel_propertyListFromStringsFileFormat = - objc.registerName("propertyListFromStringsFileFormat"); -final _objc_msgSend_390 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_cString = objc.registerName("cString"); -late final _sel_lossyCString = objc.registerName("lossyCString"); -late final _sel_cStringLength = objc.registerName("cStringLength"); -late final _sel_getCString_ = objc.registerName("getCString:"); -late final _sel_getCString_maxLength_ = - objc.registerName("getCString:maxLength:"); -final _objc_msgSend_391 = 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_getCString_maxLength_range_remainingRange_ = - objc.registerName("getCString:maxLength:range:remainingRange:"); -final _objc_msgSend_392 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - _NSRange, - ffi.Pointer<_NSRange>)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange, - ffi.Pointer<_NSRange>)>(); -late final _sel_stringWithContentsOfFile_ = - objc.registerName("stringWithContentsOfFile:"); -late final _sel_stringWithContentsOfURL_ = - objc.registerName("stringWithContentsOfURL:"); -late final _sel_initWithCStringNoCopy_length_freeWhenDone_ = - objc.registerName("initWithCStringNoCopy:length:freeWhenDone:"); -final _objc_msgSend_393 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Bool)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - bool)>(); -late final _sel_initWithCString_length_ = - objc.registerName("initWithCString:length:"); -late final _sel_initWithCString_ = objc.registerName("initWithCString:"); -late final _sel_stringWithCString_length_ = - objc.registerName("stringWithCString:length:"); -late final _sel_stringWithCString_ = objc.registerName("stringWithCString:"); -late final _sel_getCharacters_ = objc.registerName("getCharacters:"); -final _objc_msgSend_394 = 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_variantFittingPresentationWidth_ = - objc.registerName("variantFittingPresentationWidth:"); -final _objc_msgSend_395 = 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_pathWithComponents_ = objc.registerName("pathWithComponents:"); -final _objc_msgSend_396 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_isAbsolutePath = objc.registerName("isAbsolutePath"); -late final _sel_stringByDeletingLastPathComponent = - objc.registerName("stringByDeletingLastPathComponent"); -late final _sel_stringByAppendingPathComponent_ = - objc.registerName("stringByAppendingPathComponent:"); -late final _sel_stringByDeletingPathExtension = - objc.registerName("stringByDeletingPathExtension"); -late final _sel_stringByAppendingPathExtension_ = - objc.registerName("stringByAppendingPathExtension:"); -late final _sel_stringByAbbreviatingWithTildeInPath = - objc.registerName("stringByAbbreviatingWithTildeInPath"); -late final _sel_stringByExpandingTildeInPath = - objc.registerName("stringByExpandingTildeInPath"); -late final _sel_stringByStandardizingPath = - objc.registerName("stringByStandardizingPath"); -late final _sel_stringByResolvingSymlinksInPath = - objc.registerName("stringByResolvingSymlinksInPath"); -late final _sel_stringsByAppendingPaths_ = - objc.registerName("stringsByAppendingPaths:"); -late final _sel_completePathIntoString_caseSensitive_matchesIntoArray_filterTypes_ = - objc.registerName( - "completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:"); -final _objc_msgSend_397 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Bool, - ffi.Pointer>, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - bool, - ffi.Pointer>, - ffi.Pointer)>(); -late final _sel_stringByAddingPercentEncodingWithAllowedCharacters_ = - objc.registerName("stringByAddingPercentEncodingWithAllowedCharacters:"); -final _objc_msgSend_398 = 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_stringByRemovingPercentEncoding = - objc.registerName("stringByRemovingPercentEncoding"); -late final _sel_stringByAddingPercentEscapesUsingEncoding_ = - objc.registerName("stringByAddingPercentEscapesUsingEncoding:"); -final _objc_msgSend_399 = 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_stringByReplacingPercentEscapesUsingEncoding_ = - objc.registerName("stringByReplacingPercentEscapesUsingEncoding:"); - -abstract class NSLinguisticTaggerOptions { - static const int NSLinguisticTaggerOmitWords = 1; - static const int NSLinguisticTaggerOmitPunctuation = 2; - static const int NSLinguisticTaggerOmitWhitespace = 4; - static const int NSLinguisticTaggerOmitOther = 8; - static const int NSLinguisticTaggerJoinNames = 16; -} - -class NSOrthography extends NSObject { - NSOrthography._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSOrthography] that points to the same underlying object as [other]. - static NSOrthography castFrom(T other) { - return NSOrthography._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSOrthography] that wraps the given raw object pointer. - static NSOrthography castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOrthography._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSOrthography]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSOrthography); - } - - NSString get dominantScript { - final _ret = _objc_msgSend_21(this.pointer, _sel_dominantScript); - return NSString._(_ret, retain: true, release: true); - } - - NSDictionary get languageMap { - final _ret = _objc_msgSend_181(this.pointer, _sel_languageMap); - return NSDictionary._(_ret, retain: true, release: true); - } - - NSOrthography initWithDominantScript_languageMap_( - NSString script, NSDictionary map) { - final _ret = _objc_msgSend_400(this.pointer, - _sel_initWithDominantScript_languageMap_, script.pointer, map.pointer); - return NSOrthography._(_ret, retain: true, release: true); - } - - NSOrthography? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSOrthography._(_ret, retain: true, release: true); - } - - NSArray? languagesForScript_(NSString script) { - final _ret = _objc_msgSend_132( - this.pointer, _sel_languagesForScript_, script.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSString? dominantLanguageForScript_(NSString script) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_dominantLanguageForScript_, script.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString get dominantLanguage { - final _ret = _objc_msgSend_21(this.pointer, _sel_dominantLanguage); - return NSString._(_ret, retain: true, release: true); - } - - NSArray get allScripts { - final _ret = _objc_msgSend_85(this.pointer, _sel_allScripts); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get allLanguages { - final _ret = _objc_msgSend_85(this.pointer, _sel_allLanguages); - return NSArray._(_ret, retain: true, release: true); - } - - static NSOrthography defaultOrthographyForLanguage_(NSString language) { - final _ret = _objc_msgSend_31(_class_NSOrthography, - _sel_defaultOrthographyForLanguage_, language.pointer); - return NSOrthography._(_ret, retain: true, release: true); - } - - static NSOrthography orthographyWithDominantScript_languageMap_( - NSString script, NSDictionary map) { - final _ret = _objc_msgSend_400( - _class_NSOrthography, - _sel_orthographyWithDominantScript_languageMap_, - script.pointer, - map.pointer); - return NSOrthography._(_ret, retain: true, release: true); - } - - @override - NSOrthography init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSOrthography._(_ret, retain: true, release: true); - } - - static NSOrthography new1() { - final _ret = _objc_msgSend_2(_class_NSOrthography, _sel_new); - return NSOrthography._(_ret, retain: false, release: true); - } - - static NSOrthography allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSOrthography, _sel_allocWithZone_, zone); - return NSOrthography._(_ret, retain: false, release: true); - } - - static NSOrthography alloc() { - final _ret = _objc_msgSend_2(_class_NSOrthography, _sel_alloc); - return NSOrthography._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSOrthography, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSOrthography, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSOrthography, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSOrthography, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSOrthography, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSOrthography, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSOrthography, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSOrthography, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSOrthography, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSOrthography = objc.getClass("NSOrthography"); -late final _sel_dominantScript = objc.registerName("dominantScript"); -late final _sel_languageMap = objc.registerName("languageMap"); -late final _sel_initWithDominantScript_languageMap_ = - objc.registerName("initWithDominantScript:languageMap:"); -final _objc_msgSend_400 = 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:"); -late final _sel_linguisticTagsInRange_scheme_options_orthography_tokenRanges_ = - objc.registerName( - "linguisticTagsInRange:scheme:options:orthography:tokenRanges:"); -final _objc_msgSend_401 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer>)>(); -late final _sel_enumerateLinguisticTagsInRange_scheme_options_orthography_usingBlock_ = - objc.registerName( - "enumerateLinguisticTagsInRange:scheme:options:orthography:usingBlock:"); -final _objc_msgSend_402 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_anyObject = objc.registerName("anyObject"); -late final _sel_intersectsSet_ = objc.registerName("intersectsSet:"); -final _objc_msgSend_403 = 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_isEqualToSet_ = objc.registerName("isEqualToSet:"); -late final _sel_isSubsetOfSet_ = objc.registerName("isSubsetOfSet:"); -late final _sel_setByAddingObject_ = objc.registerName("setByAddingObject:"); -final _objc_msgSend_404 = 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_setByAddingObjectsFromSet_ = - objc.registerName("setByAddingObjectsFromSet:"); -final _objc_msgSend_405 = 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_setByAddingObjectsFromArray_ = - objc.registerName("setByAddingObjectsFromArray:"); -final _objc_msgSend_406 = 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_objcObjCObject_bool_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); -final _ObjCBlock_ffiVoid_objcObjCObject_bool_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_objcObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_bool_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_objcObjCObject_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_objcObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_objcObjCObject_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_objcObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_objcObjCObject_bool extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_objcObjCObject_bool._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_objcObjCObject_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_objcObjCObject_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_objcObjCObject_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._( - objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_objcObjCObject_bool.fromFunction( - void Function(NSObject, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSObject._(arg0, retain: true, release: true), arg1)))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_objcObjCObject_bool.listener( - void Function(NSObject, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSObject._(arg0, retain: true, release: true), arg1)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject arg0, ffi.Pointer 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, arg1); -} - -final _objc_msgSend_407 = 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_408 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -bool _ObjCBlock_bool_objcObjCObject_bool_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); -final _ObjCBlock_bool_objcObjCObject_bool_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_bool_objcObjCObject_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_objcObjCObject_bool_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_bool_objcObjCObject_bool_closureRegistryIndex; - _ObjCBlock_bool_objcObjCObject_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_objcObjCObject_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_objcObjCObject_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_bool_objcObjCObject_bool extends objc.ObjCBlockBase { - ObjCBlock_bool_objcObjCObject_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_bool_objcObjCObject_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_bool_objcObjCObject_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_bool_objcObjCObject_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_bool_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_objcObjCObject_bool.fromFunction( - bool Function(NSObject, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_objcObjCObject_bool_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_objcObjCObject_bool_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSObject._(arg0, retain: true, release: true), arg1)))); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSObject arg0, ffi.Pointer 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); -} - -late final _sel_objectsPassingTest_ = objc.registerName("objectsPassingTest:"); -final _objc_msgSend_409 = 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_objectsWithOptions_passingTest_ = - objc.registerName("objectsWithOptions:passingTest:"); -final _objc_msgSend_410 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_set = objc.registerName("set"); -late final _sel_setWithObject_ = objc.registerName("setWithObject:"); -late final _sel_setWithObjects_count_ = - objc.registerName("setWithObjects:count:"); -late final _sel_setWithObjects_ = objc.registerName("setWithObjects:"); -late final _sel_setWithSet_ = objc.registerName("setWithSet:"); -final _objc_msgSend_411 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setWithArray_ = objc.registerName("setWithArray:"); -late final _sel_initWithSet_ = objc.registerName("initWithSet:"); -late final _sel_initWithSet_copyItems_ = - objc.registerName("initWithSet:copyItems:"); -final _objc_msgSend_412 = 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_filteredSetUsingPredicate_ = - objc.registerName("filteredSetUsingPredicate:"); -final _objc_msgSend_413 = 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_invocationWithMethodSignature_ = - objc.registerName("invocationWithMethodSignature:"); -final _objc_msgSend_414 = 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_methodSignature = objc.registerName("methodSignature"); -final _objc_msgSend_415 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_retainArguments = objc.registerName("retainArguments"); -late final _sel_argumentsRetained = objc.registerName("argumentsRetained"); -late final _sel_target = objc.registerName("target"); -late final _sel_setTarget_ = objc.registerName("setTarget:"); -final _objc_msgSend_416 = 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_selector = objc.registerName("selector"); -final _objc_msgSend_417 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setSelector_ = objc.registerName("setSelector:"); -final _objc_msgSend_418 = 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_getReturnValue_ = objc.registerName("getReturnValue:"); -late final _sel_setReturnValue_ = objc.registerName("setReturnValue:"); -late final _sel_getArgument_atIndex_ = - objc.registerName("getArgument:atIndex:"); -final _objc_msgSend_419 = 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_setArgument_atIndex_ = - objc.registerName("setArgument:atIndex:"); -late final _sel_invoke = objc.registerName("invoke"); -late final _sel_invokeWithTarget_ = objc.registerName("invokeWithTarget:"); -late final _sel_invokeUsingIMP_ = objc.registerName("invokeUsingIMP:"); -final _objc_msgSend_420 = 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_forwardInvocation_ = objc.registerName("forwardInvocation:"); -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_methodSignatureForSelector_ = - objc.registerName("methodSignatureForSelector:"); -final _objc_msgSend_422 = 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_instanceMethodSignatureForSelector_ = - objc.registerName("instanceMethodSignatureForSelector:"); -late final _sel_allowsWeakReference = objc.registerName("allowsWeakReference"); -late final _sel_retainWeakReference = objc.registerName("retainWeakReference"); -late final _sel_isSubclassOfClass_ = objc.registerName("isSubclassOfClass:"); -late final _sel_resolveClassMethod_ = objc.registerName("resolveClassMethod:"); -late final _sel_resolveInstanceMethod_ = - objc.registerName("resolveInstanceMethod:"); -late final _sel_superclass = objc.registerName("superclass"); -late final _sel_class = objc.registerName("class"); -late final _sel_debugDescription = objc.registerName("debugDescription"); -late final _sel_version = objc.registerName("version"); -late final _sel_setVersion_ = objc.registerName("setVersion:"); -final _objc_msgSend_423 = 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_classForCoder = objc.registerName("classForCoder"); -late final _sel_replacementObjectForCoder_ = - objc.registerName("replacementObjectForCoder:"); -late final _sel_awakeAfterUsingCoder_ = - objc.registerName("awakeAfterUsingCoder:"); -late final _sel_poseAsClass_ = objc.registerName("poseAsClass:"); -late final _sel_autoContentAccessingProxy = - objc.registerName("autoContentAccessingProxy"); -late final _sel_attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_ = - objc.registerName( - "attemptRecoveryFromError:optionIndex:delegate:didRecoverSelector:contextInfo:"); -final _objc_msgSend_424 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_attemptRecoveryFromError_optionIndex_ = - objc.registerName("attemptRecoveryFromError:optionIndex:"); -final _objc_msgSend_425 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_performSelector_withObject_afterDelay_inModes_ = - objc.registerName("performSelector:withObject:afterDelay:inModes:"); -final _objc_msgSend_426 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - double, - ffi.Pointer)>(); -late final _sel_performSelector_withObject_afterDelay_ = - objc.registerName("performSelector:withObject:afterDelay:"); -final _objc_msgSend_427 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Double)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - double)>(); -late final _sel_URL_resourceDataDidBecomeAvailable_ = - objc.registerName("URL:resourceDataDidBecomeAvailable:"); -final _objc_msgSend_428 = 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_URLResourceDidFinishLoading_ = - objc.registerName("URLResourceDidFinishLoading:"); -final _objc_msgSend_429 = 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_URLResourceDidCancelLoading_ = - objc.registerName("URLResourceDidCancelLoading:"); -late final _sel_URL_resourceDidFailLoadingWithReason_ = - objc.registerName("URL:resourceDidFailLoadingWithReason:"); -final _objc_msgSend_430 = 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)>(); - -class NSFileManager extends NSObject { - NSFileManager._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSFileManager] that points to the same underlying object as [other]. - static NSFileManager castFrom(T other) { - return NSFileManager._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSFileManager] that wraps the given raw object pointer. - static NSFileManager castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileManager._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSFileManager]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSFileManager); - } - - static NSFileManager getDefaultManager() { - final _ret = _objc_msgSend_431(_class_NSFileManager, _sel_defaultManager); - return NSFileManager._(_ret, retain: true, release: true); - } - - NSArray? mountedVolumeURLsIncludingResourceValuesForKeys_options_( - NSArray? propertyKeys, int options) { - final _ret = _objc_msgSend_432( - this.pointer, - _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_, - propertyKeys?.pointer ?? ffi.nullptr, - options); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - void unmountVolumeAtURL_options_completionHandler_( - NSURL url, int mask, ObjCBlock_ffiVoid_NSError completionHandler) { - _objc_msgSend_433( - this.pointer, - _sel_unmountVolumeAtURL_options_completionHandler_, - url.pointer, - mask, - completionHandler.pointer); - } - - NSArray? contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_( - NSURL url, - NSArray? keys, - int mask, - ffi.Pointer> error) { - final _ret = _objc_msgSend_434( - this.pointer, - _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_, - url.pointer, - keys?.pointer ?? ffi.nullptr, - mask, - error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSArray URLsForDirectory_inDomains_(int directory, int domainMask) { - final _ret = _objc_msgSend_435( - this.pointer, _sel_URLsForDirectory_inDomains_, directory, domainMask); - return NSArray._(_ret, retain: true, release: true); - } - - NSURL? URLForDirectory_inDomain_appropriateForURL_create_error_( - int directory, - int domain, - NSURL? url, - bool shouldCreate, - ffi.Pointer> error) { - final _ret = _objc_msgSend_436( - this.pointer, - _sel_URLForDirectory_inDomain_appropriateForURL_create_error_, - directory, - domain, - url?.pointer ?? ffi.nullptr, - shouldCreate, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - bool getRelationship_ofDirectoryAtURL_toItemAtURL_error_( - ffi.Pointer outRelationship, - NSURL directoryURL, - NSURL otherURL, - ffi.Pointer> error) { - return _objc_msgSend_437( - this.pointer, - _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_, - outRelationship, - directoryURL.pointer, - otherURL.pointer, - error); - } - - bool getRelationship_ofDirectory_inDomain_toItemAtURL_error_( - ffi.Pointer outRelationship, - int directory, - int domainMask, - NSURL url, - ffi.Pointer> error) { - return _objc_msgSend_438( - this.pointer, - _sel_getRelationship_ofDirectory_inDomain_toItemAtURL_error_, - outRelationship, - directory, - domainMask, - url.pointer, - error); - } - - bool createDirectoryAtURL_withIntermediateDirectories_attributes_error_( - NSURL url, - bool createIntermediates, - NSDictionary? attributes, - ffi.Pointer> error) { - return _objc_msgSend_439( - this.pointer, - _sel_createDirectoryAtURL_withIntermediateDirectories_attributes_error_, - url.pointer, - createIntermediates, - attributes?.pointer ?? ffi.nullptr, - error); - } - - bool createSymbolicLinkAtURL_withDestinationURL_error_(NSURL url, - NSURL destURL, ffi.Pointer> error) { - return _objc_msgSend_440( - this.pointer, - _sel_createSymbolicLinkAtURL_withDestinationURL_error_, - url.pointer, - destURL.pointer, - error); - } - - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); - } - - bool setAttributes_ofItemAtPath_error_(NSDictionary attributes, NSString path, - ffi.Pointer> error) { - return _objc_msgSend_441( - this.pointer, - _sel_setAttributes_ofItemAtPath_error_, - attributes.pointer, - path.pointer, - error); - } - - bool createDirectoryAtPath_withIntermediateDirectories_attributes_error_( - NSString path, - bool createIntermediates, - NSDictionary? attributes, - ffi.Pointer> error) { - return _objc_msgSend_442( - this.pointer, - _sel_createDirectoryAtPath_withIntermediateDirectories_attributes_error_, - path.pointer, - createIntermediates, - attributes?.pointer ?? ffi.nullptr, - error); - } - - NSArray? contentsOfDirectoryAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_443(this.pointer, - _sel_contentsOfDirectoryAtPath_error_, path.pointer, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSArray? subpathsOfDirectoryAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_443(this.pointer, - _sel_subpathsOfDirectoryAtPath_error_, path.pointer, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSDictionary? attributesOfItemAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_444( - this.pointer, _sel_attributesOfItemAtPath_error_, path.pointer, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSDictionary? attributesOfFileSystemForPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_444(this.pointer, - _sel_attributesOfFileSystemForPath_error_, path.pointer, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - bool createSymbolicLinkAtPath_withDestinationPath_error_(NSString path, - NSString destPath, ffi.Pointer> error) { - return _objc_msgSend_445( - this.pointer, - _sel_createSymbolicLinkAtPath_withDestinationPath_error_, - path.pointer, - destPath.pointer, - error); - } - - NSString? destinationOfSymbolicLinkAtPath_error_( - NSString path, ffi.Pointer> error) { - final _ret = _objc_msgSend_446(this.pointer, - _sel_destinationOfSymbolicLinkAtPath_error_, path.pointer, error); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - bool copyItemAtPath_toPath_error_(NSString srcPath, NSString dstPath, - ffi.Pointer> error) { - return _objc_msgSend_445(this.pointer, _sel_copyItemAtPath_toPath_error_, - srcPath.pointer, dstPath.pointer, error); - } - - bool moveItemAtPath_toPath_error_(NSString srcPath, NSString dstPath, - ffi.Pointer> error) { - return _objc_msgSend_445(this.pointer, _sel_moveItemAtPath_toPath_error_, - srcPath.pointer, dstPath.pointer, error); - } - - bool linkItemAtPath_toPath_error_(NSString srcPath, NSString dstPath, - ffi.Pointer> error) { - return _objc_msgSend_445(this.pointer, _sel_linkItemAtPath_toPath_error_, - srcPath.pointer, dstPath.pointer, error); - } - - bool removeItemAtPath_error_( - NSString path, ffi.Pointer> error) { - return _objc_msgSend_447( - this.pointer, _sel_removeItemAtPath_error_, path.pointer, error); - } - - bool copyItemAtURL_toURL_error_(NSURL srcURL, NSURL dstURL, - ffi.Pointer> error) { - return _objc_msgSend_440(this.pointer, _sel_copyItemAtURL_toURL_error_, - srcURL.pointer, dstURL.pointer, error); - } - - bool moveItemAtURL_toURL_error_(NSURL srcURL, NSURL dstURL, - ffi.Pointer> error) { - return _objc_msgSend_440(this.pointer, _sel_moveItemAtURL_toURL_error_, - srcURL.pointer, dstURL.pointer, error); - } - - bool linkItemAtURL_toURL_error_(NSURL srcURL, NSURL dstURL, - ffi.Pointer> error) { - return _objc_msgSend_440(this.pointer, _sel_linkItemAtURL_toURL_error_, - srcURL.pointer, dstURL.pointer, error); - } - - bool removeItemAtURL_error_( - NSURL URL, ffi.Pointer> error) { - return _objc_msgSend_89( - this.pointer, _sel_removeItemAtURL_error_, URL.pointer, error); - } - - bool trashItemAtURL_resultingItemURL_error_( - NSURL url, - ffi.Pointer> outResultingURL, - ffi.Pointer> error) { - return _objc_msgSend_448( - this.pointer, - _sel_trashItemAtURL_resultingItemURL_error_, - url.pointer, - outResultingURL, - error); - } - - NSDictionary? fileAttributesAtPath_traverseLink_(NSString path, bool yorn) { - final _ret = _objc_msgSend_449(this.pointer, - _sel_fileAttributesAtPath_traverseLink_, path.pointer, yorn); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - bool changeFileAttributes_atPath_(NSDictionary attributes, NSString path) { - return _objc_msgSend_450(this.pointer, _sel_changeFileAttributes_atPath_, - attributes.pointer, path.pointer); - } - - NSArray? directoryContentsAtPath_(NSString path) { - final _ret = _objc_msgSend_132( - this.pointer, _sel_directoryContentsAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSDictionary? fileSystemAttributesAtPath_(NSString path) { - final _ret = _objc_msgSend_156( - this.pointer, _sel_fileSystemAttributesAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSString? pathContentOfSymbolicLinkAtPath_(NSString path) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_pathContentOfSymbolicLinkAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - bool createSymbolicLinkAtPath_pathContent_( - NSString path, NSString otherpath) { - return _objc_msgSend_451( - this.pointer, - _sel_createSymbolicLinkAtPath_pathContent_, - path.pointer, - otherpath.pointer); - } - - bool createDirectoryAtPath_attributes_( - NSString path, NSDictionary attributes) { - return _objc_msgSend_452( - this.pointer, - _sel_createDirectoryAtPath_attributes_, - path.pointer, - attributes.pointer); - } - - bool linkPath_toPath_handler_( - NSString src, NSString dest, NSObject? handler) { - return _objc_msgSend_453(this.pointer, _sel_linkPath_toPath_handler_, - src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); - } - - bool copyPath_toPath_handler_( - NSString src, NSString dest, NSObject? handler) { - return _objc_msgSend_453(this.pointer, _sel_copyPath_toPath_handler_, - src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); - } - - bool movePath_toPath_handler_( - NSString src, NSString dest, NSObject? handler) { - return _objc_msgSend_453(this.pointer, _sel_movePath_toPath_handler_, - src.pointer, dest.pointer, handler?.pointer ?? ffi.nullptr); - } - - bool removeFileAtPath_handler_(NSString path, NSObject? handler) { - return _objc_msgSend_454(this.pointer, _sel_removeFileAtPath_handler_, - path.pointer, handler?.pointer ?? ffi.nullptr); - } - - NSString get currentDirectoryPath { - final _ret = _objc_msgSend_21(this.pointer, _sel_currentDirectoryPath); - return NSString._(_ret, retain: true, release: true); - } - - bool changeCurrentDirectoryPath_(NSString path) { - return _objc_msgSend_64( - this.pointer, _sel_changeCurrentDirectoryPath_, path.pointer); - } - - bool fileExistsAtPath_(NSString path) { - return _objc_msgSend_64(this.pointer, _sel_fileExistsAtPath_, path.pointer); - } - - bool fileExistsAtPath_isDirectory_( - NSString path, ffi.Pointer isDirectory) { - return _objc_msgSend_455(this.pointer, _sel_fileExistsAtPath_isDirectory_, - path.pointer, isDirectory); - } - - bool isReadableFileAtPath_(NSString path) { - return _objc_msgSend_64( - this.pointer, _sel_isReadableFileAtPath_, path.pointer); - } - - bool isWritableFileAtPath_(NSString path) { - return _objc_msgSend_64( - this.pointer, _sel_isWritableFileAtPath_, path.pointer); - } - - bool isExecutableFileAtPath_(NSString path) { - return _objc_msgSend_64( - this.pointer, _sel_isExecutableFileAtPath_, path.pointer); - } - - bool isDeletableFileAtPath_(NSString path) { - return _objc_msgSend_64( - this.pointer, _sel_isDeletableFileAtPath_, path.pointer); - } - - bool contentsEqualAtPath_andPath_(NSString path1, NSString path2) { - return _objc_msgSend_451(this.pointer, _sel_contentsEqualAtPath_andPath_, - path1.pointer, path2.pointer); - } - - NSString displayNameAtPath_(NSString path) { - final _ret = - _objc_msgSend_69(this.pointer, _sel_displayNameAtPath_, path.pointer); - return NSString._(_ret, retain: true, release: true); - } - - NSArray? componentsToDisplayForPath_(NSString path) { - final _ret = _objc_msgSend_132( - this.pointer, _sel_componentsToDisplayForPath_, path.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSObject? enumeratorAtPath_(NSString path) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_enumeratorAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_( - NSURL url, - NSArray? keys, - int mask, - ObjCBlock_bool_NSURL_NSError? handler) { - final _ret = _objc_msgSend_456( - this.pointer, - _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_, - url.pointer, - keys?.pointer ?? ffi.nullptr, - mask, - handler?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSArray? subpathsAtPath_(NSString path) { - final _ret = - _objc_msgSend_132(this.pointer, _sel_subpathsAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSData? contentsAtPath_(NSString path) { - final _ret = - _objc_msgSend_457(this.pointer, _sel_contentsAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - bool createFileAtPath_contents_attributes_( - NSString path, NSData? data, NSDictionary? attr) { - return _objc_msgSend_458( - this.pointer, - _sel_createFileAtPath_contents_attributes_, - path.pointer, - data?.pointer ?? ffi.nullptr, - attr?.pointer ?? ffi.nullptr); - } - - ffi.Pointer fileSystemRepresentationWithPath_(NSString path) { - return _objc_msgSend_459( - this.pointer, _sel_fileSystemRepresentationWithPath_, path.pointer); - } - - NSString stringWithFileSystemRepresentation_length_( - ffi.Pointer str, int len) { - final _ret = _objc_msgSend_460(this.pointer, - _sel_stringWithFileSystemRepresentation_length_, str, len); - return NSString._(_ret, retain: true, release: true); - } - - bool - replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_( - NSURL originalItemURL, - NSURL newItemURL, - NSString? backupItemName, - int options, - ffi.Pointer> resultingURL, - ffi.Pointer> error) { - return _objc_msgSend_461( - this.pointer, - _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_, - originalItemURL.pointer, - newItemURL.pointer, - backupItemName?.pointer ?? ffi.nullptr, - options, - resultingURL, - error); - } - - bool setUbiquitous_itemAtURL_destinationURL_error_(bool flag, NSURL url, - NSURL destinationURL, ffi.Pointer> error) { - return _objc_msgSend_462( - this.pointer, - _sel_setUbiquitous_itemAtURL_destinationURL_error_, - flag, - url.pointer, - destinationURL.pointer, - error); - } - - bool isUbiquitousItemAtURL_(NSURL url) { - return _objc_msgSend_265( - this.pointer, _sel_isUbiquitousItemAtURL_, url.pointer); - } - - bool startDownloadingUbiquitousItemAtURL_error_( - NSURL url, ffi.Pointer> error) { - return _objc_msgSend_89(this.pointer, - _sel_startDownloadingUbiquitousItemAtURL_error_, url.pointer, error); - } - - bool evictUbiquitousItemAtURL_error_( - NSURL url, ffi.Pointer> error) { - return _objc_msgSend_89( - this.pointer, _sel_evictUbiquitousItemAtURL_error_, url.pointer, error); - } - - NSURL? URLForUbiquityContainerIdentifier_(NSString? containerIdentifier) { - final _ret = _objc_msgSend_463( - this.pointer, - _sel_URLForUbiquityContainerIdentifier_, - containerIdentifier?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? URLForPublishingUbiquitousItemAtURL_expirationDate_error_( - NSURL url, - ffi.Pointer> outDate, - ffi.Pointer> error) { - final _ret = _objc_msgSend_464( - this.pointer, - _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_, - url.pointer, - outDate, - error); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSObject? get ubiquityIdentityToken { - final _ret = _objc_msgSend_17(this.pointer, _sel_ubiquityIdentityToken); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - void getFileProviderServicesForItemAtURL_completionHandler_( - NSURL url, ObjCBlock_ffiVoid_NSDictionary_NSError completionHandler) { - _objc_msgSend_465( - this.pointer, - _sel_getFileProviderServicesForItemAtURL_completionHandler_, - url.pointer, - completionHandler.pointer); - } - - NSURL? containerURLForSecurityApplicationGroupIdentifier_( - NSString groupIdentifier) { - final _ret = _objc_msgSend_257( - this.pointer, - _sel_containerURLForSecurityApplicationGroupIdentifier_, - groupIdentifier.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL get homeDirectoryForCurrentUser { - final _ret = - _objc_msgSend_466(this.pointer, _sel_homeDirectoryForCurrentUser); - return NSURL._(_ret, retain: true, release: true); - } - - NSURL get temporaryDirectory { - final _ret = _objc_msgSend_466(this.pointer, _sel_temporaryDirectory); - return NSURL._(_ret, retain: true, release: true); - } - - NSURL? homeDirectoryForUser_(NSString userName) { - final _ret = _objc_msgSend_257( - this.pointer, _sel_homeDirectoryForUser_, userName.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - @override - NSFileManager init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSFileManager._(_ret, retain: true, release: true); - } - - static NSFileManager new1() { - final _ret = _objc_msgSend_2(_class_NSFileManager, _sel_new); - return NSFileManager._(_ret, retain: false, release: true); - } - - static NSFileManager allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSFileManager, _sel_allocWithZone_, zone); - return NSFileManager._(_ret, retain: false, release: true); - } - - static NSFileManager alloc() { - final _ret = _objc_msgSend_2(_class_NSFileManager, _sel_alloc); - return NSFileManager._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSFileManager, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSFileManager, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSFileManager, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSFileManager, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSFileManager, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSFileManager, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSFileManager, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSFileManager, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSFileManager, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSFileManager = objc.getClass("NSFileManager"); -late final _sel_defaultManager = objc.registerName("defaultManager"); -final _objc_msgSend_431 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSVolumeEnumerationOptions { - static const int NSVolumeEnumerationSkipHiddenVolumes = 2; - static const int NSVolumeEnumerationProduceFileReferenceURLs = 4; -} - -late final _sel_mountedVolumeURLsIncludingResourceValuesForKeys_options_ = objc - .registerName("mountedVolumeURLsIncludingResourceValuesForKeys:options:"); -final _objc_msgSend_432 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); - -abstract class NSFileManagerUnmountOptions { - static const int NSFileManagerUnmountAllPartitionsAndEjectDisk = 1; - static const int NSFileManagerUnmountWithoutUI = 2; -} - -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); -final _ObjCBlock_ffiVoid_NSError_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSError_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSError_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSError_closureRegistry[block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSError._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSError._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSError.fromFunction(void Function(NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSError_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSError._(arg0, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSError.listener(void Function(NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSError_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSError._(arg0, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSError? arg0) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr); -} - -late final _sel_unmountVolumeAtURL_options_completionHandler_ = - objc.registerName("unmountVolumeAtURL:options:completionHandler:"); -final _objc_msgSend_433 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - -abstract class NSDirectoryEnumerationOptions { - static const int NSDirectoryEnumerationSkipsSubdirectoryDescendants = 1; - static const int NSDirectoryEnumerationSkipsPackageDescendants = 2; - static const int NSDirectoryEnumerationSkipsHiddenFiles = 4; - static const int NSDirectoryEnumerationIncludesDirectoriesPostOrder = 8; - static const int NSDirectoryEnumerationProducesRelativePathURLs = 16; -} - -late final _sel_contentsOfDirectoryAtURL_includingPropertiesForKeys_options_error_ = - objc.registerName( - "contentsOfDirectoryAtURL:includingPropertiesForKeys:options:error:"); -final _objc_msgSend_434 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); - -abstract class NSSearchPathDirectory { - static const int NSApplicationDirectory = 1; - static const int NSDemoApplicationDirectory = 2; - static const int NSDeveloperApplicationDirectory = 3; - static const int NSAdminApplicationDirectory = 4; - static const int NSLibraryDirectory = 5; - static const int NSDeveloperDirectory = 6; - static const int NSUserDirectory = 7; - static const int NSDocumentationDirectory = 8; - static const int NSDocumentDirectory = 9; - static const int NSCoreServiceDirectory = 10; - static const int NSAutosavedInformationDirectory = 11; - static const int NSDesktopDirectory = 12; - static const int NSCachesDirectory = 13; - static const int NSApplicationSupportDirectory = 14; - static const int NSDownloadsDirectory = 15; - static const int NSInputMethodsDirectory = 16; - static const int NSMoviesDirectory = 17; - static const int NSMusicDirectory = 18; - static const int NSPicturesDirectory = 19; - static const int NSPrinterDescriptionDirectory = 20; - static const int NSSharedPublicDirectory = 21; - static const int NSPreferencePanesDirectory = 22; - static const int NSApplicationScriptsDirectory = 23; - static const int NSItemReplacementDirectory = 99; - static const int NSAllApplicationsDirectory = 100; - static const int NSAllLibrariesDirectory = 101; - static const int NSTrashDirectory = 102; -} - -abstract class NSSearchPathDomainMask { - static const int NSUserDomainMask = 1; - static const int NSLocalDomainMask = 2; - static const int NSNetworkDomainMask = 4; - static const int NSSystemDomainMask = 8; - static const int NSAllDomainsMask = 65535; -} - -late final _sel_URLsForDirectory_inDomains_ = - objc.registerName("URLsForDirectory:inDomains:"); -final _objc_msgSend_435 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32, ffi.Int32)>>() - .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_436 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer, - ffi.Bool, - ffi.Pointer>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer, - bool, - ffi.Pointer>)>(); - -abstract class NSURLRelationship { - static const int NSURLRelationshipContains = 0; - static const int NSURLRelationshipSame = 1; - static const int NSURLRelationshipOther = 2; -} - -late final _sel_getRelationship_ofDirectoryAtURL_toItemAtURL_error_ = - objc.registerName("getRelationship:ofDirectoryAtURL:toItemAtURL:error:"); -final _objc_msgSend_437 = 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_438 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - 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_439 = 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_440 = 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:"); -final _objc_msgSend_441 = 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_442 = 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_443 = 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_444 = 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_445 = 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_446 = 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_447 = 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:"); -late final _sel_trashItemAtURL_resultingItemURL_error_ = - objc.registerName("trashItemAtURL:resultingItemURL:error:"); -final _objc_msgSend_448 = 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_449 = 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_450 = 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:"); -late final _sel_fileSystemAttributesAtPath_ = - objc.registerName("fileSystemAttributesAtPath:"); -late final _sel_pathContentOfSymbolicLinkAtPath_ = - objc.registerName("pathContentOfSymbolicLinkAtPath:"); -late final _sel_createSymbolicLinkAtPath_pathContent_ = - objc.registerName("createSymbolicLinkAtPath:pathContent:"); -final _objc_msgSend_451 = 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_452 = 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_453 = 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_454 = 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_455 = 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); -final _ObjCBlock_bool_NSURL_NSError_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_bool_NSURL_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_bool_NSURL_NSError_registerClosure( - bool Function(ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_bool_NSURL_NSError_closureRegistryIndex; - _ObjCBlock_bool_NSURL_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -bool _ObjCBlock_bool_NSURL_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_bool_NSURL_NSError_closureRegistry[block.ref.target.address]!( - 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.newBlock( - _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(NSURL, NSError) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_bool_NSURL_NSError_closureTrampoline, false) - .cast(), - _ObjCBlock_bool_NSURL_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(NSURL._(arg0, retain: true, release: true), NSError._(arg1, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - bool call(NSURL arg0, 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_456 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_457 = 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_458 = 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_459 = 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_460 = 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)>(); - -abstract class NSFileManagerItemReplacementOptions { - static const int NSFileManagerItemReplacementUsingNewMetadataOnly = 1; - static const int NSFileManagerItemReplacementWithoutDeletingBackupItem = 2; -} - -late final _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_ = - objc.registerName( - "replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:"); -final _objc_msgSend_461 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_462 = 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:"); -final _objc_msgSend_463 = 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_464 = 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); -final _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[ - block.ref.target.address]!(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.newBlock( - _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(NSDictionary?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSDictionary._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSError._(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(NSDictionary?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn( - arg0.address == 0 - ? null - : NSDictionary._(arg0, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSDictionary? arg0, 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_465 = 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"); -final _objc_msgSend_466 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_temporaryDirectory = objc.registerName("temporaryDirectory"); -late final _sel_homeDirectoryForUser_ = - objc.registerName("homeDirectoryForUser:"); -late final _sel_fileManager_shouldProceedAfterError_ = - objc.registerName("fileManager:shouldProceedAfterError:"); -final _objc_msgSend_467 = 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_fileManager_willProcessPath_ = - objc.registerName("fileManager:willProcessPath:"); -final _objc_msgSend_468 = 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_validateValue_forKey_error_ = - objc.registerName("validateValue:forKey:error:"); - -class NSMutableArray extends NSArray { - NSMutableArray._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMutableArray] that points to the same underlying object as [other]. - static NSMutableArray castFrom(T other) { - return NSMutableArray._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSMutableArray] that wraps the given raw object pointer. - static NSMutableArray castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableArray._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableArray]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableArray); - } - - void addObject_(NSObject anObject) { - _objc_msgSend_15(this.pointer, _sel_addObject_, anObject.pointer); - } - - void insertObject_atIndex_(NSObject anObject, int index) { - _objc_msgSend_469( - this.pointer, _sel_insertObject_atIndex_, anObject.pointer, index); - } - - void removeLastObject() { - _objc_msgSend_1(this.pointer, _sel_removeLastObject); - } - - void removeObjectAtIndex_(int index) { - _objc_msgSend_470(this.pointer, _sel_removeObjectAtIndex_, index); - } - - void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { - _objc_msgSend_471(this.pointer, _sel_replaceObjectAtIndex_withObject_, - index, anObject.pointer); - } - - @override - NSMutableArray init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableArray._(_ret, retain: true, release: true); - } - - NSMutableArray initWithCapacity_(int numItems) { - final _ret = - _objc_msgSend_65(this.pointer, _sel_initWithCapacity_, numItems); - return NSMutableArray._(_ret, retain: true, release: true); - } - - @override - NSMutableArray? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, retain: true, release: true); - } - - void addObjectsFromArray_(NSArray otherArray) { - _objc_msgSend_472( - this.pointer, _sel_addObjectsFromArray_, otherArray.pointer); - } - - void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { - _objc_msgSend_473(this.pointer, - _sel_exchangeObjectAtIndex_withObjectAtIndex_, idx1, idx2); - } - - void removeAllObjects() { - _objc_msgSend_1(this.pointer, _sel_removeAllObjects); - } - - void removeObject_inRange_(NSObject anObject, _NSRange range) { - _objc_msgSend_474( - this.pointer, _sel_removeObject_inRange_, anObject.pointer, range); - } - - void removeObject_(NSObject anObject) { - _objc_msgSend_15(this.pointer, _sel_removeObject_, anObject.pointer); - } - - void removeObjectIdenticalTo_inRange_(NSObject anObject, _NSRange range) { - _objc_msgSend_474(this.pointer, _sel_removeObjectIdenticalTo_inRange_, - anObject.pointer, range); - } - - void removeObjectIdenticalTo_(NSObject anObject) { - _objc_msgSend_15( - this.pointer, _sel_removeObjectIdenticalTo_, anObject.pointer); - } - - void removeObjectsFromIndices_numIndices_( - ffi.Pointer indices, int cnt) { - _objc_msgSend_475( - this.pointer, _sel_removeObjectsFromIndices_numIndices_, indices, cnt); - } - - void removeObjectsInArray_(NSArray otherArray) { - _objc_msgSend_472( - this.pointer, _sel_removeObjectsInArray_, otherArray.pointer); - } - - void removeObjectsInRange_(_NSRange range) { - _objc_msgSend_476(this.pointer, _sel_removeObjectsInRange_, range); - } - - void replaceObjectsInRange_withObjectsFromArray_range_( - _NSRange range, NSArray otherArray, _NSRange otherRange) { - _objc_msgSend_477( - this.pointer, - _sel_replaceObjectsInRange_withObjectsFromArray_range_, - range, - otherArray.pointer, - otherRange); - } - - void replaceObjectsInRange_withObjectsFromArray_( - _NSRange range, NSArray otherArray) { - _objc_msgSend_478( - this.pointer, - _sel_replaceObjectsInRange_withObjectsFromArray_, - range, - otherArray.pointer); - } - - void setArray_(NSArray otherArray) { - _objc_msgSend_472(this.pointer, _sel_setArray_, otherArray.pointer); - } - - void sortUsingFunction_context_( - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>> - compare, - ffi.Pointer context) { - _objc_msgSend_479( - this.pointer, _sel_sortUsingFunction_context_, compare, context); - } - - void sortUsingSelector_(ffi.Pointer comparator) { - _objc_msgSend_7(this.pointer, _sel_sortUsingSelector_, comparator); - } - - void insertObjects_atIndexes_(NSArray objects, NSIndexSet indexes) { - _objc_msgSend_480(this.pointer, _sel_insertObjects_atIndexes_, - objects.pointer, indexes.pointer); - } - - void removeObjectsAtIndexes_(NSIndexSet indexes) { - _objc_msgSend_481( - this.pointer, _sel_removeObjectsAtIndexes_, indexes.pointer); - } - - void replaceObjectsAtIndexes_withObjects_( - NSIndexSet indexes, NSArray objects) { - _objc_msgSend_482(this.pointer, _sel_replaceObjectsAtIndexes_withObjects_, - indexes.pointer, objects.pointer); - } - - void setObject_atIndexedSubscript_(NSObject obj, int idx) { - _objc_msgSend_469( - this.pointer, _sel_setObject_atIndexedSubscript_, obj.pointer, idx); - } - - void sortUsingComparator_( - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - _objc_msgSend_483(this.pointer, _sel_sortUsingComparator_, cmptr.pointer); - } - - void sortWithOptions_usingComparator_(int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - _objc_msgSend_484(this.pointer, _sel_sortWithOptions_usingComparator_, opts, - cmptr.pointer); - } - - static NSMutableArray arrayWithCapacity_(int numItems) { - final _ret = _objc_msgSend_65( - _class_NSMutableArray, _sel_arrayWithCapacity_, numItems); - return NSMutableArray._(_ret, retain: true, release: true); - } - - static NSMutableArray? arrayWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_485( - _class_NSMutableArray, _sel_arrayWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, retain: true, release: true); - } - - static NSMutableArray? arrayWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_486( - _class_NSMutableArray, _sel_arrayWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, retain: true, release: true); - } - - NSMutableArray? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_485( - this.pointer, _sel_initWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, retain: true, release: true); - } - - NSMutableArray? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_486( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSMutableArray._(_ret, retain: true, release: true); - } - - void applyDifference_(NSObject difference) { - _objc_msgSend_15(this.pointer, _sel_applyDifference_, difference.pointer); - } - - void sortUsingDescriptors_(NSArray sortDescriptors) { - _objc_msgSend_472( - this.pointer, _sel_sortUsingDescriptors_, sortDescriptors.pointer); - } - - void filterUsingPredicate_(NSPredicate predicate) { - _objc_msgSend_487( - this.pointer, _sel_filterUsingPredicate_, predicate.pointer); - } - - @override - NSMutableArray initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - this.pointer, _sel_initWithObjects_count_, objects, cnt); - return NSMutableArray._(_ret, retain: true, release: true); - } - - static NSMutableArray array() { - final _ret = _objc_msgSend_2(_class_NSMutableArray, _sel_array); - return NSMutableArray._(_ret, retain: true, release: true); - } - - static NSMutableArray arrayWithObject_(NSObject anObject) { - final _ret = _objc_msgSend_124( - _class_NSMutableArray, _sel_arrayWithObject_, anObject.pointer); - return NSMutableArray._(_ret, retain: true, release: true); - } - - static NSMutableArray arrayWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - _class_NSMutableArray, _sel_arrayWithObjects_count_, objects, cnt); - return NSMutableArray._(_ret, retain: true, release: true); - } - - static NSMutableArray arrayWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - _class_NSMutableArray, _sel_arrayWithObjects_, firstObj.pointer); - return NSMutableArray._(_ret, retain: true, release: true); - } - - static NSMutableArray arrayWithArray_(NSArray array) { - final _ret = _objc_msgSend_125( - _class_NSMutableArray, _sel_arrayWithArray_, array.pointer); - return NSMutableArray._(_ret, retain: true, release: true); - } - - @override - NSMutableArray initWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjects_, firstObj.pointer); - return NSMutableArray._(_ret, retain: true, release: true); - } - - @override - NSMutableArray initWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(this.pointer, _sel_initWithArray_, array.pointer); - return NSMutableArray._(_ret, retain: true, release: true); - } - - @override - NSMutableArray initWithArray_copyItems_(NSArray array, bool flag) { - final _ret = _objc_msgSend_126( - this.pointer, _sel_initWithArray_copyItems_, array.pointer, flag); - return NSMutableArray._(_ret, retain: false, release: true); - } - - static NSArray? arrayWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_127(_class_NSMutableArray, - _sel_arrayWithContentsOfURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - static NSMutableArray new1() { - final _ret = _objc_msgSend_2(_class_NSMutableArray, _sel_new); - return NSMutableArray._(_ret, retain: false, release: true); - } - - static NSMutableArray allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMutableArray, _sel_allocWithZone_, zone); - return NSMutableArray._(_ret, retain: false, release: true); - } - - static NSMutableArray alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableArray, _sel_alloc); - return NSMutableArray._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableArray, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableArray, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableArray, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMutableArray, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableArray, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableArray, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableArray, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableArray, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSMutableArray, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSMutableArray = objc.getClass("NSMutableArray"); -late final _sel_addObject_ = objc.registerName("addObject:"); -late final _sel_insertObject_atIndex_ = - objc.registerName("insertObject:atIndex:"); -final _objc_msgSend_469 = 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_removeLastObject = objc.registerName("removeLastObject"); -late final _sel_removeObjectAtIndex_ = - objc.registerName("removeObjectAtIndex:"); -final _objc_msgSend_470 = 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_replaceObjectAtIndex_withObject_ = - objc.registerName("replaceObjectAtIndex:withObject:"); -final _objc_msgSend_471 = 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_initWithCapacity_ = objc.registerName("initWithCapacity:"); -late final _sel_addObjectsFromArray_ = - objc.registerName("addObjectsFromArray:"); -final _objc_msgSend_472 = 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_exchangeObjectAtIndex_withObjectAtIndex_ = - objc.registerName("exchangeObjectAtIndex:withObjectAtIndex:"); -final _objc_msgSend_473 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int, int)>(); -late final _sel_removeAllObjects = objc.registerName("removeAllObjects"); -late final _sel_removeObject_inRange_ = - objc.registerName("removeObject:inRange:"); -final _objc_msgSend_474 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_removeObject_ = objc.registerName("removeObject:"); -late final _sel_removeObjectIdenticalTo_inRange_ = - objc.registerName("removeObjectIdenticalTo:inRange:"); -late final _sel_removeObjectIdenticalTo_ = - objc.registerName("removeObjectIdenticalTo:"); -late final _sel_removeObjectsFromIndices_numIndices_ = - objc.registerName("removeObjectsFromIndices:numIndices:"); -final _objc_msgSend_475 = 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_removeObjectsInArray_ = - objc.registerName("removeObjectsInArray:"); -late final _sel_removeObjectsInRange_ = - objc.registerName("removeObjectsInRange:"); -final _objc_msgSend_476 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); -late final _sel_replaceObjectsInRange_withObjectsFromArray_range_ = - objc.registerName("replaceObjectsInRange:withObjectsFromArray:range:"); -final _objc_msgSend_477 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - _NSRange)>(); -late final _sel_replaceObjectsInRange_withObjectsFromArray_ = - objc.registerName("replaceObjectsInRange:withObjectsFromArray:"); -final _objc_msgSend_478 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_setArray_ = objc.registerName("setArray:"); -late final _sel_sortUsingFunction_context_ = - objc.registerName("sortUsingFunction:context:"); -final _objc_msgSend_479 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>, - ffi.Pointer)>(); -late final _sel_sortUsingSelector_ = objc.registerName("sortUsingSelector:"); -late final _sel_insertObjects_atIndexes_ = - objc.registerName("insertObjects:atIndexes:"); -final _objc_msgSend_480 = 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_removeObjectsAtIndexes_ = - objc.registerName("removeObjectsAtIndexes:"); -final _objc_msgSend_481 = 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_replaceObjectsAtIndexes_withObjects_ = - objc.registerName("replaceObjectsAtIndexes:withObjects:"); -final _objc_msgSend_482 = 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_setObject_atIndexedSubscript_ = - objc.registerName("setObject:atIndexedSubscript:"); -late final _sel_sortUsingComparator_ = - objc.registerName("sortUsingComparator:"); -final _objc_msgSend_483 = 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_sortWithOptions_usingComparator_ = - objc.registerName("sortWithOptions:usingComparator:"); -final _objc_msgSend_484 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_arrayWithCapacity_ = objc.registerName("arrayWithCapacity:"); -final _objc_msgSend_485 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_486 = 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_applyDifference_ = objc.registerName("applyDifference:"); -late final _sel_sortUsingDescriptors_ = - objc.registerName("sortUsingDescriptors:"); -late final _sel_filterUsingPredicate_ = - objc.registerName("filterUsingPredicate:"); -final _objc_msgSend_487 = 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_mutableArrayValueForKey_ = - objc.registerName("mutableArrayValueForKey:"); -final _objc_msgSend_488 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -class NSMutableOrderedSet extends NSOrderedSet { - NSMutableOrderedSet._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMutableOrderedSet] that points to the same underlying object as [other]. - static NSMutableOrderedSet castFrom(T other) { - return NSMutableOrderedSet._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSMutableOrderedSet] that wraps the given raw object pointer. - static NSMutableOrderedSet castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableOrderedSet._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableOrderedSet]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableOrderedSet); - } - - void insertObject_atIndex_(NSObject object, int idx) { - _objc_msgSend_469( - this.pointer, _sel_insertObject_atIndex_, object.pointer, idx); - } - - void removeObjectAtIndex_(int idx) { - _objc_msgSend_470(this.pointer, _sel_removeObjectAtIndex_, idx); - } - - void replaceObjectAtIndex_withObject_(int idx, NSObject object) { - _objc_msgSend_471(this.pointer, _sel_replaceObjectAtIndex_withObject_, idx, - object.pointer); - } - - @override - NSMutableOrderedSet? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - @override - NSMutableOrderedSet init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - NSMutableOrderedSet initWithCapacity_(int numItems) { - final _ret = - _objc_msgSend_65(this.pointer, _sel_initWithCapacity_, numItems); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - void addObject_(NSObject object) { - _objc_msgSend_15(this.pointer, _sel_addObject_, object.pointer); - } - - void addObjects_count_( - ffi.Pointer> objects, int count) { - _objc_msgSend_500(this.pointer, _sel_addObjects_count_, objects, count); - } - - void addObjectsFromArray_(NSArray array) { - _objc_msgSend_472(this.pointer, _sel_addObjectsFromArray_, array.pointer); - } - - void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { - _objc_msgSend_473(this.pointer, - _sel_exchangeObjectAtIndex_withObjectAtIndex_, idx1, idx2); - } - - void moveObjectsAtIndexes_toIndex_(NSIndexSet indexes, int idx) { - _objc_msgSend_501( - this.pointer, _sel_moveObjectsAtIndexes_toIndex_, indexes.pointer, idx); - } - - void insertObjects_atIndexes_(NSArray objects, NSIndexSet indexes) { - _objc_msgSend_480(this.pointer, _sel_insertObjects_atIndexes_, - objects.pointer, indexes.pointer); - } - - void setObject_atIndex_(NSObject obj, int idx) { - _objc_msgSend_469(this.pointer, _sel_setObject_atIndex_, obj.pointer, idx); - } - - void setObject_atIndexedSubscript_(NSObject obj, int idx) { - _objc_msgSend_469( - this.pointer, _sel_setObject_atIndexedSubscript_, obj.pointer, idx); - } - - void replaceObjectsInRange_withObjects_count_(_NSRange range, - ffi.Pointer> objects, int count) { - _objc_msgSend_502(this.pointer, - _sel_replaceObjectsInRange_withObjects_count_, range, objects, count); - } - - void replaceObjectsAtIndexes_withObjects_( - NSIndexSet indexes, NSArray objects) { - _objc_msgSend_482(this.pointer, _sel_replaceObjectsAtIndexes_withObjects_, - indexes.pointer, objects.pointer); - } - - void removeObjectsInRange_(_NSRange range) { - _objc_msgSend_476(this.pointer, _sel_removeObjectsInRange_, range); - } - - void removeObjectsAtIndexes_(NSIndexSet indexes) { - _objc_msgSend_481( - this.pointer, _sel_removeObjectsAtIndexes_, indexes.pointer); - } - - void removeAllObjects() { - _objc_msgSend_1(this.pointer, _sel_removeAllObjects); - } - - void removeObject_(NSObject object) { - _objc_msgSend_15(this.pointer, _sel_removeObject_, object.pointer); - } - - void removeObjectsInArray_(NSArray array) { - _objc_msgSend_472(this.pointer, _sel_removeObjectsInArray_, array.pointer); - } - - void intersectOrderedSet_(NSOrderedSet other) { - _objc_msgSend_503(this.pointer, _sel_intersectOrderedSet_, other.pointer); - } - - void minusOrderedSet_(NSOrderedSet other) { - _objc_msgSend_503(this.pointer, _sel_minusOrderedSet_, other.pointer); - } - - void unionOrderedSet_(NSOrderedSet other) { - _objc_msgSend_503(this.pointer, _sel_unionOrderedSet_, other.pointer); - } - - void intersectSet_(NSSet other) { - _objc_msgSend_504(this.pointer, _sel_intersectSet_, other.pointer); - } - - void minusSet_(NSSet other) { - _objc_msgSend_504(this.pointer, _sel_minusSet_, other.pointer); - } - - void unionSet_(NSSet other) { - _objc_msgSend_504(this.pointer, _sel_unionSet_, other.pointer); - } - - void sortUsingComparator_( - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - _objc_msgSend_483(this.pointer, _sel_sortUsingComparator_, cmptr.pointer); - } - - void sortWithOptions_usingComparator_(int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - _objc_msgSend_484(this.pointer, _sel_sortWithOptions_usingComparator_, opts, - cmptr.pointer); - } - - void sortRange_options_usingComparator_(_NSRange range, int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - _objc_msgSend_505(this.pointer, _sel_sortRange_options_usingComparator_, - range, opts, cmptr.pointer); - } - - static NSMutableOrderedSet orderedSetWithCapacity_(int numItems) { - final _ret = _objc_msgSend_65( - _class_NSMutableOrderedSet, _sel_orderedSetWithCapacity_, numItems); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - void applyDifference_(NSObject difference) { - _objc_msgSend_15(this.pointer, _sel_applyDifference_, difference.pointer); - } - - void sortUsingDescriptors_(NSArray sortDescriptors) { - _objc_msgSend_472( - this.pointer, _sel_sortUsingDescriptors_, sortDescriptors.pointer); - } - - void filterUsingPredicate_(NSPredicate p) { - _objc_msgSend_487(this.pointer, _sel_filterUsingPredicate_, p.pointer); - } - - @override - NSMutableOrderedSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - this.pointer, _sel_initWithObjects_count_, objects, cnt); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSet() { - final _ret = _objc_msgSend_2(_class_NSMutableOrderedSet, _sel_orderedSet); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithObject_(NSObject object) { - final _ret = _objc_msgSend_124( - _class_NSMutableOrderedSet, _sel_orderedSetWithObject_, object.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66(_class_NSMutableOrderedSet, - _sel_orderedSetWithObjects_count_, objects, cnt); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124(_class_NSMutableOrderedSet, - _sel_orderedSetWithObjects_, firstObj.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithOrderedSet_(NSOrderedSet set) { - final _ret = _objc_msgSend_492(_class_NSMutableOrderedSet, - _sel_orderedSetWithOrderedSet_, set.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithOrderedSet_range_copyItems_( - NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _objc_msgSend_493( - _class_NSMutableOrderedSet, - _sel_orderedSetWithOrderedSet_range_copyItems_, - set.pointer, - range, - flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - static NSMutableOrderedSet orderedSetWithArray_(NSArray array) { - final _ret = _objc_msgSend_125( - _class_NSMutableOrderedSet, _sel_orderedSetWithArray_, array.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithArray_range_copyItems_( - NSArray array, _NSRange range, bool flag) { - final _ret = _objc_msgSend_494(_class_NSMutableOrderedSet, - _sel_orderedSetWithArray_range_copyItems_, array.pointer, range, flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - static NSMutableOrderedSet orderedSetWithSet_(NSSet set) { - final _ret = _objc_msgSend_411( - _class_NSMutableOrderedSet, _sel_orderedSetWithSet_, set.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - static NSMutableOrderedSet orderedSetWithSet_copyItems_( - NSSet set, bool flag) { - final _ret = _objc_msgSend_412(_class_NSMutableOrderedSet, - _sel_orderedSetWithSet_copyItems_, set.pointer, flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithObject_(NSObject object) { - final _ret = - _objc_msgSend_124(this.pointer, _sel_initWithObject_, object.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjects_, firstObj.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithOrderedSet_(NSOrderedSet set) { - final _ret = - _objc_msgSend_492(this.pointer, _sel_initWithOrderedSet_, set.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithOrderedSet_copyItems_( - NSOrderedSet set, bool flag) { - final _ret = _objc_msgSend_495( - this.pointer, _sel_initWithOrderedSet_copyItems_, set.pointer, flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithOrderedSet_range_copyItems_( - NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _objc_msgSend_493(this.pointer, - _sel_initWithOrderedSet_range_copyItems_, set.pointer, range, flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(this.pointer, _sel_initWithArray_, array.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithArray_copyItems_(NSArray set, bool flag) { - final _ret = _objc_msgSend_126( - this.pointer, _sel_initWithArray_copyItems_, set.pointer, flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithArray_range_copyItems_( - NSArray set, _NSRange range, bool flag) { - final _ret = _objc_msgSend_494(this.pointer, - _sel_initWithArray_range_copyItems_, set.pointer, range, flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - @override - NSMutableOrderedSet initWithSet_(NSSet set) { - final _ret = - _objc_msgSend_411(this.pointer, _sel_initWithSet_, set.pointer); - return NSMutableOrderedSet._(_ret, retain: true, release: true); - } - - @override - NSMutableOrderedSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _objc_msgSend_412( - this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - static NSMutableOrderedSet new1() { - final _ret = _objc_msgSend_2(_class_NSMutableOrderedSet, _sel_new); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - static NSMutableOrderedSet allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMutableOrderedSet, _sel_allocWithZone_, zone); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - static NSMutableOrderedSet alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableOrderedSet, _sel_alloc); - return NSMutableOrderedSet._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableOrderedSet, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableOrderedSet, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableOrderedSet, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMutableOrderedSet, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableOrderedSet, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableOrderedSet, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableOrderedSet, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableOrderedSet, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSMutableOrderedSet, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSMutableOrderedSet = objc.getClass("NSMutableOrderedSet"); - -class NSOrderedSet extends NSObject { - NSOrderedSet._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSOrderedSet] that points to the same underlying object as [other]. - static NSOrderedSet castFrom(T other) { - return NSOrderedSet._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSOrderedSet] that wraps the given raw object pointer. - static NSOrderedSet castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOrderedSet._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSOrderedSet]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSOrderedSet); - } - - int get count { - return _objc_msgSend_10(this.pointer, _sel_count); - } - - NSObject objectAtIndex_(int idx) { - final _ret = _objc_msgSend_65(this.pointer, _sel_objectAtIndex_, idx); - return NSObject._(_ret, retain: true, release: true); - } - - int indexOfObject_(NSObject object) { - return _objc_msgSend_74(this.pointer, _sel_indexOfObject_, object.pointer); - } - - @override - NSOrderedSet init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSOrderedSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - this.pointer, _sel_initWithObjects_count_, objects, cnt); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSOrderedSet? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSOrderedSet._(_ret, retain: true, release: true); - } - - void getObjects_range_( - ffi.Pointer> objects, _NSRange range) { - _objc_msgSend_73(this.pointer, _sel_getObjects_range_, objects, range); - } - - NSArray objectsAtIndexes_(NSIndexSet indexes) { - final _ret = _objc_msgSend_111( - this.pointer, _sel_objectsAtIndexes_, indexes.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSObject? get firstObject { - final _ret = _objc_msgSend_17(this.pointer, _sel_firstObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? get lastObject { - final _ret = _objc_msgSend_17(this.pointer, _sel_lastObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - bool isEqualToOrderedSet_(NSOrderedSet other) { - return _objc_msgSend_489( - this.pointer, _sel_isEqualToOrderedSet_, other.pointer); - } - - bool containsObject_(NSObject object) { - return _objc_msgSend_0(this.pointer, _sel_containsObject_, object.pointer); - } - - bool intersectsOrderedSet_(NSOrderedSet other) { - return _objc_msgSend_489( - this.pointer, _sel_intersectsOrderedSet_, other.pointer); - } - - bool intersectsSet_(NSSet set) { - return _objc_msgSend_403(this.pointer, _sel_intersectsSet_, set.pointer); - } - - bool isSubsetOfOrderedSet_(NSOrderedSet other) { - return _objc_msgSend_489( - this.pointer, _sel_isSubsetOfOrderedSet_, other.pointer); - } - - bool isSubsetOfSet_(NSSet set) { - return _objc_msgSend_403(this.pointer, _sel_isSubsetOfSet_, set.pointer); - } - - NSObject objectAtIndexedSubscript_(int idx) { - final _ret = - _objc_msgSend_65(this.pointer, _sel_objectAtIndexedSubscript_, idx); - return NSObject._(_ret, retain: true, release: true); - } - - NSEnumerator objectEnumerator() { - final _ret = _objc_msgSend_77(this.pointer, _sel_objectEnumerator); - return NSEnumerator._(_ret, retain: true, release: true); - } - - NSEnumerator reverseObjectEnumerator() { - final _ret = _objc_msgSend_77(this.pointer, _sel_reverseObjectEnumerator); - return NSEnumerator._(_ret, retain: true, release: true); - } - - NSOrderedSet get reversedOrderedSet { - final _ret = _objc_msgSend_490(this.pointer, _sel_reversedOrderedSet); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSArray get array { - final _ret = _objc_msgSend_85(this.pointer, _sel_array); - return NSArray._(_ret, retain: true, release: true); - } - - NSSet get set1 { - final _ret = _objc_msgSend_491(this.pointer, _sel_set); - return NSSet._(_ret, retain: true, release: true); - } - - void enumerateObjectsUsingBlock_( - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { - _objc_msgSend_112( - this.pointer, _sel_enumerateObjectsUsingBlock_, block.pointer); - } - - void enumerateObjectsWithOptions_usingBlock_( - int opts, ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { - _objc_msgSend_113(this.pointer, - _sel_enumerateObjectsWithOptions_usingBlock_, opts, block.pointer); - } - - void enumerateObjectsAtIndexes_options_usingBlock_(NSIndexSet s, int opts, - ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { - _objc_msgSend_114( - this.pointer, - _sel_enumerateObjectsAtIndexes_options_usingBlock_, - s.pointer, - opts, - block.pointer); - } - - int indexOfObjectPassingTest_( - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_115( - this.pointer, _sel_indexOfObjectPassingTest_, predicate.pointer); - } - - int indexOfObjectWithOptions_passingTest_( - int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_116(this.pointer, - _sel_indexOfObjectWithOptions_passingTest_, opts, predicate.pointer); - } - - int indexOfObjectAtIndexes_options_passingTest_(NSIndexSet s, int opts, - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - return _objc_msgSend_117( - this.pointer, - _sel_indexOfObjectAtIndexes_options_passingTest_, - s.pointer, - opts, - predicate.pointer); - } - - NSIndexSet indexesOfObjectsPassingTest_( - ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_118( - this.pointer, _sel_indexesOfObjectsPassingTest_, predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsWithOptions_passingTest_( - int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_119(this.pointer, - _sel_indexesOfObjectsWithOptions_passingTest_, opts, predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); - } - - NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_(NSIndexSet s, - int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { - final _ret = _objc_msgSend_120( - this.pointer, - _sel_indexesOfObjectsAtIndexes_options_passingTest_, - s.pointer, - opts, - predicate.pointer); - return NSIndexSet._(_ret, retain: true, release: true); - } - - int indexOfObject_inSortedRange_options_usingComparator_( - NSObject object, - _NSRange range, - int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmp) { - return _objc_msgSend_123( - this.pointer, - _sel_indexOfObject_inSortedRange_options_usingComparator_, - object.pointer, - range, - opts, - cmp.pointer); - } - - NSArray sortedArrayUsingComparator_( - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - final _ret = _objc_msgSend_121( - this.pointer, _sel_sortedArrayUsingComparator_, cmptr.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray sortedArrayWithOptions_usingComparator_(int opts, - ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { - final _ret = _objc_msgSend_122(this.pointer, - _sel_sortedArrayWithOptions_usingComparator_, opts, cmptr.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_(NSObject? locale) { - final _ret = _objc_msgSend_70(this.pointer, _sel_descriptionWithLocale_, - locale?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } - - NSString descriptionWithLocale_indent_(NSObject? locale, int level) { - final _ret = _objc_msgSend_71( - this.pointer, - _sel_descriptionWithLocale_indent_, - locale?.pointer ?? ffi.nullptr, - level); - return NSString._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSet() { - final _ret = _objc_msgSend_2(_class_NSOrderedSet, _sel_orderedSet); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithObject_(NSObject object) { - final _ret = _objc_msgSend_124( - _class_NSOrderedSet, _sel_orderedSetWithObject_, object.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - _class_NSOrderedSet, _sel_orderedSetWithObjects_count_, objects, cnt); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - _class_NSOrderedSet, _sel_orderedSetWithObjects_, firstObj.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithOrderedSet_(NSOrderedSet set) { - final _ret = _objc_msgSend_492( - _class_NSOrderedSet, _sel_orderedSetWithOrderedSet_, set.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithOrderedSet_range_copyItems_( - NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _objc_msgSend_493( - _class_NSOrderedSet, - _sel_orderedSetWithOrderedSet_range_copyItems_, - set.pointer, - range, - flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - static NSOrderedSet orderedSetWithArray_(NSArray array) { - final _ret = _objc_msgSend_125( - _class_NSOrderedSet, _sel_orderedSetWithArray_, array.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithArray_range_copyItems_( - NSArray array, _NSRange range, bool flag) { - final _ret = _objc_msgSend_494(_class_NSOrderedSet, - _sel_orderedSetWithArray_range_copyItems_, array.pointer, range, flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - static NSOrderedSet orderedSetWithSet_(NSSet set) { - final _ret = _objc_msgSend_411( - _class_NSOrderedSet, _sel_orderedSetWithSet_, set.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet orderedSetWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _objc_msgSend_412(_class_NSOrderedSet, - _sel_orderedSetWithSet_copyItems_, set.pointer, flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - NSOrderedSet initWithObject_(NSObject object) { - final _ret = - _objc_msgSend_124(this.pointer, _sel_initWithObject_, object.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSOrderedSet initWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjects_, firstObj.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSOrderedSet initWithOrderedSet_(NSOrderedSet set) { - final _ret = - _objc_msgSend_492(this.pointer, _sel_initWithOrderedSet_, set.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSOrderedSet initWithOrderedSet_copyItems_(NSOrderedSet set, bool flag) { - final _ret = _objc_msgSend_495( - this.pointer, _sel_initWithOrderedSet_copyItems_, set.pointer, flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - NSOrderedSet initWithOrderedSet_range_copyItems_( - NSOrderedSet set, _NSRange range, bool flag) { - final _ret = _objc_msgSend_493(this.pointer, - _sel_initWithOrderedSet_range_copyItems_, set.pointer, range, flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - NSOrderedSet initWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(this.pointer, _sel_initWithArray_, array.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSOrderedSet initWithArray_copyItems_(NSArray set, bool flag) { - final _ret = _objc_msgSend_126( - this.pointer, _sel_initWithArray_copyItems_, set.pointer, flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - NSOrderedSet initWithArray_range_copyItems_( - NSArray set, _NSRange range, bool flag) { - final _ret = _objc_msgSend_494(this.pointer, - _sel_initWithArray_range_copyItems_, set.pointer, range, flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - NSOrderedSet initWithSet_(NSSet set) { - final _ret = - _objc_msgSend_411(this.pointer, _sel_initWithSet_, set.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - NSOrderedSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _objc_msgSend_412( - this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - NSObject differenceFromOrderedSet_withOptions_usingEquivalenceTest_( - NSOrderedSet other, - int options, - ObjCBlock_bool_objcObjCObject_objcObjCObject block) { - final _ret = _objc_msgSend_496( - this.pointer, - _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_, - other.pointer, - options, - block.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - NSObject differenceFromOrderedSet_withOptions_( - NSOrderedSet other, int options) { - final _ret = _objc_msgSend_497(this.pointer, - _sel_differenceFromOrderedSet_withOptions_, other.pointer, options); - return NSObject._(_ret, retain: true, release: true); - } - - NSObject differenceFromOrderedSet_(NSOrderedSet other) { - final _ret = _objc_msgSend_492( - this.pointer, _sel_differenceFromOrderedSet_, other.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - NSOrderedSet? orderedSetByApplyingDifference_(NSObject difference) { - final _ret = _objc_msgSend_498( - this.pointer, _sel_orderedSetByApplyingDifference_, difference.pointer); - return _ret.address == 0 - ? null - : NSOrderedSet._(_ret, retain: true, release: true); - } - - NSObject valueForKey_(NSString key) { - final _ret = _objc_msgSend_31(this.pointer, _sel_valueForKey_, key.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - @override - void setValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - @override - void addObserver_forKeyPath_options_context_(NSObject observer, - NSString keyPath, int options, ffi.Pointer context) { - _objc_msgSend_139( - this.pointer, - _sel_addObserver_forKeyPath_options_context_, - observer.pointer, - keyPath.pointer, - options, - context); - } - - @override - void removeObserver_forKeyPath_context_( - NSObject observer, NSString keyPath, ffi.Pointer context) { - _objc_msgSend_140(this.pointer, _sel_removeObserver_forKeyPath_context_, - observer.pointer, keyPath.pointer, context); - } - - @override - void removeObserver_forKeyPath_(NSObject observer, NSString keyPath) { - _objc_msgSend_141(this.pointer, _sel_removeObserver_forKeyPath_, - observer.pointer, keyPath.pointer); - } - - NSArray sortedArrayUsingDescriptors_(NSArray sortDescriptors) { - final _ret = _objc_msgSend_68(this.pointer, - _sel_sortedArrayUsingDescriptors_, sortDescriptors.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSOrderedSet filteredOrderedSetUsingPredicate_(NSPredicate p) { - final _ret = _objc_msgSend_499( - this.pointer, _sel_filteredOrderedSetUsingPredicate_, p.pointer); - return NSOrderedSet._(_ret, retain: true, release: true); - } - - static NSOrderedSet new1() { - final _ret = _objc_msgSend_2(_class_NSOrderedSet, _sel_new); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - static NSOrderedSet allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSOrderedSet, _sel_allocWithZone_, zone); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - static NSOrderedSet alloc() { - final _ret = _objc_msgSend_2(_class_NSOrderedSet, _sel_alloc); - return NSOrderedSet._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSOrderedSet, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSOrderedSet, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSOrderedSet, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSOrderedSet, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSOrderedSet, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSOrderedSet, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSOrderedSet, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSOrderedSet, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSOrderedSet, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSOrderedSet = objc.getClass("NSOrderedSet"); -late final _sel_isEqualToOrderedSet_ = - objc.registerName("isEqualToOrderedSet:"); -final _objc_msgSend_489 = 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_intersectsOrderedSet_ = - objc.registerName("intersectsOrderedSet:"); -late final _sel_isSubsetOfOrderedSet_ = - objc.registerName("isSubsetOfOrderedSet:"); -late final _sel_reversedOrderedSet = objc.registerName("reversedOrderedSet"); -final _objc_msgSend_490 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_491 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_orderedSet = objc.registerName("orderedSet"); -late final _sel_orderedSetWithObject_ = - objc.registerName("orderedSetWithObject:"); -late final _sel_orderedSetWithObjects_count_ = - objc.registerName("orderedSetWithObjects:count:"); -late final _sel_orderedSetWithObjects_ = - objc.registerName("orderedSetWithObjects:"); -late final _sel_orderedSetWithOrderedSet_ = - objc.registerName("orderedSetWithOrderedSet:"); -final _objc_msgSend_492 = 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_orderedSetWithOrderedSet_range_copyItems_ = - objc.registerName("orderedSetWithOrderedSet:range:copyItems:"); -final _objc_msgSend_493 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Bool)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - bool)>(); -late final _sel_orderedSetWithArray_ = - objc.registerName("orderedSetWithArray:"); -late final _sel_orderedSetWithArray_range_copyItems_ = - objc.registerName("orderedSetWithArray:range:copyItems:"); -final _objc_msgSend_494 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Bool)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - bool)>(); -late final _sel_orderedSetWithSet_ = objc.registerName("orderedSetWithSet:"); -late final _sel_orderedSetWithSet_copyItems_ = - objc.registerName("orderedSetWithSet:copyItems:"); -late final _sel_initWithObject_ = objc.registerName("initWithObject:"); -late final _sel_initWithOrderedSet_ = objc.registerName("initWithOrderedSet:"); -late final _sel_initWithOrderedSet_copyItems_ = - objc.registerName("initWithOrderedSet:copyItems:"); -final _objc_msgSend_495 = 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_initWithOrderedSet_range_copyItems_ = - objc.registerName("initWithOrderedSet:range:copyItems:"); -late final _sel_initWithArray_range_copyItems_ = - objc.registerName("initWithArray:range:copyItems:"); -late final _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_ = - objc.registerName( - "differenceFromOrderedSet:withOptions:usingEquivalenceTest:"); -final _objc_msgSend_496 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_differenceFromOrderedSet_withOptions_ = - objc.registerName("differenceFromOrderedSet:withOptions:"); -final _objc_msgSend_497 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_differenceFromOrderedSet_ = - objc.registerName("differenceFromOrderedSet:"); -late final _sel_orderedSetByApplyingDifference_ = - objc.registerName("orderedSetByApplyingDifference:"); -final _objc_msgSend_498 = 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_filteredOrderedSetUsingPredicate_ = - objc.registerName("filteredOrderedSetUsingPredicate:"); -final _objc_msgSend_499 = 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_addObjects_count_ = objc.registerName("addObjects:count:"); -final _objc_msgSend_500 = 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_moveObjectsAtIndexes_toIndex_ = - objc.registerName("moveObjectsAtIndexes:toIndex:"); -final _objc_msgSend_501 = 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_setObject_atIndex_ = objc.registerName("setObject:atIndex:"); -late final _sel_replaceObjectsInRange_withObjects_count_ = - objc.registerName("replaceObjectsInRange:withObjects:count:"); -final _objc_msgSend_502 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer>, - ffi.UnsignedLong)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer>, - int)>(); -late final _sel_intersectOrderedSet_ = - objc.registerName("intersectOrderedSet:"); -final _objc_msgSend_503 = 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_minusOrderedSet_ = objc.registerName("minusOrderedSet:"); -late final _sel_unionOrderedSet_ = objc.registerName("unionOrderedSet:"); -late final _sel_intersectSet_ = objc.registerName("intersectSet:"); -final _objc_msgSend_504 = 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_minusSet_ = objc.registerName("minusSet:"); -late final _sel_unionSet_ = objc.registerName("unionSet:"); -late final _sel_sortRange_options_usingComparator_ = - objc.registerName("sortRange:options:usingComparator:"); -final _objc_msgSend_505 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); -late final _sel_orderedSetWithCapacity_ = - objc.registerName("orderedSetWithCapacity:"); -late final _sel_mutableOrderedSetValueForKey_ = - objc.registerName("mutableOrderedSetValueForKey:"); -final _objc_msgSend_506 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -class NSMutableSet extends NSSet { - NSMutableSet._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMutableSet] that points to the same underlying object as [other]. - static NSMutableSet castFrom(T other) { - return NSMutableSet._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSMutableSet] that wraps the given raw object pointer. - static NSMutableSet castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableSet._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableSet]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableSet); - } - - void addObject_(NSObject object) { - _objc_msgSend_15(this.pointer, _sel_addObject_, object.pointer); - } - - void removeObject_(NSObject object) { - _objc_msgSend_15(this.pointer, _sel_removeObject_, object.pointer); - } - - @override - NSMutableSet? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSMutableSet._(_ret, retain: true, release: true); - } - - @override - NSMutableSet init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableSet._(_ret, retain: true, release: true); - } - - NSMutableSet initWithCapacity_(int numItems) { - final _ret = - _objc_msgSend_65(this.pointer, _sel_initWithCapacity_, numItems); - return NSMutableSet._(_ret, retain: true, release: true); - } - - void addObjectsFromArray_(NSArray array) { - _objc_msgSend_472(this.pointer, _sel_addObjectsFromArray_, array.pointer); - } - - void intersectSet_(NSSet otherSet) { - _objc_msgSend_504(this.pointer, _sel_intersectSet_, otherSet.pointer); - } - - void minusSet_(NSSet otherSet) { - _objc_msgSend_504(this.pointer, _sel_minusSet_, otherSet.pointer); - } - - void removeAllObjects() { - _objc_msgSend_1(this.pointer, _sel_removeAllObjects); - } - - void unionSet_(NSSet otherSet) { - _objc_msgSend_504(this.pointer, _sel_unionSet_, otherSet.pointer); - } - - void setSet_(NSSet otherSet) { - _objc_msgSend_504(this.pointer, _sel_setSet_, otherSet.pointer); - } - - static NSMutableSet setWithCapacity_(int numItems) { - final _ret = - _objc_msgSend_65(_class_NSMutableSet, _sel_setWithCapacity_, numItems); - return NSMutableSet._(_ret, retain: true, release: true); - } - - void filterUsingPredicate_(NSPredicate predicate) { - _objc_msgSend_487( - this.pointer, _sel_filterUsingPredicate_, predicate.pointer); - } - - @override - NSMutableSet initWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - this.pointer, _sel_initWithObjects_count_, objects, cnt); - return NSMutableSet._(_ret, retain: true, release: true); - } - - static NSMutableSet set1() { - final _ret = _objc_msgSend_2(_class_NSMutableSet, _sel_set); - return NSMutableSet._(_ret, retain: true, release: true); - } - - static NSMutableSet setWithObject_(NSObject object) { - final _ret = _objc_msgSend_124( - _class_NSMutableSet, _sel_setWithObject_, object.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - static NSMutableSet setWithObjects_count_( - ffi.Pointer> objects, int cnt) { - final _ret = _objc_msgSend_66( - _class_NSMutableSet, _sel_setWithObjects_count_, objects, cnt); - return NSMutableSet._(_ret, retain: true, release: true); - } - - static NSMutableSet setWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - _class_NSMutableSet, _sel_setWithObjects_, firstObj.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - static NSMutableSet setWithSet_(NSSet set) { - final _ret = - _objc_msgSend_411(_class_NSMutableSet, _sel_setWithSet_, set.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - static NSMutableSet setWithArray_(NSArray array) { - final _ret = _objc_msgSend_125( - _class_NSMutableSet, _sel_setWithArray_, array.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - @override - NSMutableSet initWithObjects_(NSObject firstObj) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjects_, firstObj.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - @override - NSMutableSet initWithSet_(NSSet set) { - final _ret = - _objc_msgSend_411(this.pointer, _sel_initWithSet_, set.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - @override - NSMutableSet initWithSet_copyItems_(NSSet set, bool flag) { - final _ret = _objc_msgSend_412( - this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); - return NSMutableSet._(_ret, retain: false, release: true); - } - - @override - NSMutableSet initWithArray_(NSArray array) { - final _ret = - _objc_msgSend_125(this.pointer, _sel_initWithArray_, array.pointer); - return NSMutableSet._(_ret, retain: true, release: true); - } - - static NSMutableSet new1() { - final _ret = _objc_msgSend_2(_class_NSMutableSet, _sel_new); - return NSMutableSet._(_ret, retain: false, release: true); - } - - static NSMutableSet allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMutableSet, _sel_allocWithZone_, zone); - return NSMutableSet._(_ret, retain: false, release: true); - } - - static NSMutableSet alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableSet, _sel_alloc); - return NSMutableSet._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableSet, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableSet, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableSet, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMutableSet, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableSet, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableSet, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableSet, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableSet, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSMutableSet, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSMutableSet = objc.getClass("NSMutableSet"); -late final _sel_setSet_ = objc.registerName("setSet:"); -late final _sel_setWithCapacity_ = objc.registerName("setWithCapacity:"); -late final _sel_mutableSetValueForKey_ = - objc.registerName("mutableSetValueForKey:"); -final _objc_msgSend_507 = 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_valueForKeyPath_ = objc.registerName("valueForKeyPath:"); -late final _sel_setValue_forKeyPath_ = - objc.registerName("setValue:forKeyPath:"); -late final _sel_validateValue_forKeyPath_error_ = - objc.registerName("validateValue:forKeyPath:error:"); -late final _sel_mutableArrayValueForKeyPath_ = - objc.registerName("mutableArrayValueForKeyPath:"); -late final _sel_mutableOrderedSetValueForKeyPath_ = - objc.registerName("mutableOrderedSetValueForKeyPath:"); -late final _sel_mutableSetValueForKeyPath_ = - objc.registerName("mutableSetValueForKeyPath:"); -late final _sel_valueForUndefinedKey_ = - objc.registerName("valueForUndefinedKey:"); -late final _sel_setValue_forUndefinedKey_ = - objc.registerName("setValue:forUndefinedKey:"); -late final _sel_setNilValueForKey_ = objc.registerName("setNilValueForKey:"); -late final _sel_dictionaryWithValuesForKeys_ = - objc.registerName("dictionaryWithValuesForKeys:"); -final _objc_msgSend_508 = 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_setValuesForKeysWithDictionary_ = - objc.registerName("setValuesForKeysWithDictionary:"); -final _objc_msgSend_509 = 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_storedValueForKey_ = objc.registerName("storedValueForKey:"); -late final _sel_takeStoredValue_forKey_ = - objc.registerName("takeStoredValue:forKey:"); -late final _sel_takeValue_forKey_ = objc.registerName("takeValue:forKey:"); -late final _sel_takeValue_forKeyPath_ = - objc.registerName("takeValue:forKeyPath:"); -late final _sel_handleQueryWithUnboundKey_ = - objc.registerName("handleQueryWithUnboundKey:"); -late final _sel_handleTakeValue_forUnboundKey_ = - objc.registerName("handleTakeValue:forUnboundKey:"); -late final _sel_unableToSetNilForKey_ = - objc.registerName("unableToSetNilForKey:"); -late final _sel_valuesForKeys_ = objc.registerName("valuesForKeys:"); -late final _sel_takeValuesFromDictionary_ = - objc.registerName("takeValuesFromDictionary:"); -late final _sel_observeValueForKeyPath_ofObject_change_context_ = - objc.registerName("observeValueForKeyPath:ofObject:change:context:"); -final _objc_msgSend_510 = 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)>(); -late final _sel_willChangeValueForKey_ = - objc.registerName("willChangeValueForKey:"); -late final _sel_didChangeValueForKey_ = - objc.registerName("didChangeValueForKey:"); - -abstract class NSKeyValueChange { - static const int NSKeyValueChangeSetting = 1; - static const int NSKeyValueChangeInsertion = 2; - static const int NSKeyValueChangeRemoval = 3; - static const int NSKeyValueChangeReplacement = 4; -} - -late final _sel_willChange_valuesAtIndexes_forKey_ = - objc.registerName("willChange:valuesAtIndexes:forKey:"); -final _objc_msgSend_511 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_didChange_valuesAtIndexes_forKey_ = - objc.registerName("didChange:valuesAtIndexes:forKey:"); - -abstract class NSKeyValueSetMutationKind { - static const int NSKeyValueUnionSetMutation = 1; - static const int NSKeyValueMinusSetMutation = 2; - static const int NSKeyValueIntersectSetMutation = 3; - static const int NSKeyValueSetSetMutation = 4; -} - -late final _sel_willChangeValueForKey_withSetMutation_usingObjects_ = - objc.registerName("willChangeValueForKey:withSetMutation:usingObjects:"); -final _objc_msgSend_512 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_didChangeValueForKey_withSetMutation_usingObjects_ = - objc.registerName("didChangeValueForKey:withSetMutation:usingObjects:"); -late final _sel_observationInfo = objc.registerName("observationInfo"); -late final _sel_setObservationInfo_ = objc.registerName("setObservationInfo:"); -final _objc_msgSend_513 = 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_classForKeyedArchiver = - objc.registerName("classForKeyedArchiver"); - -class NSKeyedArchiver extends NSCoder { - NSKeyedArchiver._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSKeyedArchiver] that points to the same underlying object as [other]. - static NSKeyedArchiver castFrom(T other) { - return NSKeyedArchiver._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSKeyedArchiver] that wraps the given raw object pointer. - static NSKeyedArchiver castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSKeyedArchiver._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSKeyedArchiver]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSKeyedArchiver); - } - - NSKeyedArchiver initRequiringSecureCoding_(bool requiresSecureCoding) { - final _ret = _objc_msgSend_514( - this.pointer, _sel_initRequiringSecureCoding_, requiresSecureCoding); - return NSKeyedArchiver._(_ret, retain: true, release: true); - } - - static NSData? archivedDataWithRootObject_requiringSecureCoding_error_( - NSObject object, - bool requiresSecureCoding, - ffi.Pointer> error) { - final _ret = _objc_msgSend_515( - _class_NSKeyedArchiver, - _sel_archivedDataWithRootObject_requiringSecureCoding_error_, - object.pointer, - requiresSecureCoding, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - @override - NSKeyedArchiver init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSKeyedArchiver._(_ret, retain: true, release: true); - } - - NSKeyedArchiver initForWritingWithMutableData_(NSMutableData data) { - final _ret = _objc_msgSend_521( - this.pointer, _sel_initForWritingWithMutableData_, data.pointer); - return NSKeyedArchiver._(_ret, retain: true, release: true); - } - - static NSData archivedDataWithRootObject_(NSObject rootObject) { - final _ret = _objc_msgSend_522(_class_NSKeyedArchiver, - _sel_archivedDataWithRootObject_, rootObject.pointer); - return NSData._(_ret, retain: true, release: true); - } - - static bool archiveRootObject_toFile_(NSObject rootObject, NSString path) { - return _objc_msgSend_261(_class_NSKeyedArchiver, - _sel_archiveRootObject_toFile_, rootObject.pointer, path.pointer); - } - - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); - } - - int get outputFormat { - return _objc_msgSend_523(this.pointer, _sel_outputFormat); - } - - set outputFormat(int value) { - return _objc_msgSend_524(this.pointer, _sel_setOutputFormat_, value); - } - - NSData get encodedData { - final _ret = _objc_msgSend_43(this.pointer, _sel_encodedData); - return NSData._(_ret, retain: true, release: true); - } - - void finishEncoding() { - _objc_msgSend_1(this.pointer, _sel_finishEncoding); - } - - static void setClassName_forClass_(NSString? codedName, NSObject cls) { - _objc_msgSend_525(_class_NSKeyedArchiver, _sel_setClassName_forClass_, - codedName?.pointer ?? ffi.nullptr, cls.pointer); - } - - static NSString? classNameForClass_(NSObject cls) { - final _ret = _objc_msgSend_526( - _class_NSKeyedArchiver, _sel_classNameForClass_, cls.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - @override - void encodeObject_forKey_(NSObject? object, NSString key) { - _objc_msgSend_135(this.pointer, _sel_encodeObject_forKey_, - object?.pointer ?? ffi.nullptr, key.pointer); - } - - @override - void encodeConditionalObject_forKey_(NSObject? object, NSString key) { - _objc_msgSend_135(this.pointer, _sel_encodeConditionalObject_forKey_, - object?.pointer ?? ffi.nullptr, key.pointer); - } - - @override - void encodeBool_forKey_(bool value, NSString key) { - _objc_msgSend_296( - this.pointer, _sel_encodeBool_forKey_, value, key.pointer); - } - - @override - void encodeInt_forKey_(int value, NSString key) { - _objc_msgSend_297(this.pointer, _sel_encodeInt_forKey_, value, key.pointer); - } - - @override - void encodeInt32_forKey_(int value, NSString key) { - _objc_msgSend_298( - this.pointer, _sel_encodeInt32_forKey_, value, key.pointer); - } - - @override - void encodeInt64_forKey_(int value, NSString key) { - _objc_msgSend_299( - this.pointer, _sel_encodeInt64_forKey_, value, key.pointer); - } - - @override - void encodeFloat_forKey_(double value, NSString key) { - _objc_msgSend_300( - this.pointer, _sel_encodeFloat_forKey_, value, key.pointer); - } - - @override - void encodeDouble_forKey_(double value, NSString key) { - _objc_msgSend_301( - this.pointer, _sel_encodeDouble_forKey_, value, key.pointer); - } - - @override - void encodeBytes_length_forKey_( - ffi.Pointer bytes, int length, NSString key) { - _objc_msgSend_302(this.pointer, _sel_encodeBytes_length_forKey_, bytes, - length, key.pointer); - } - - @override - bool get requiresSecureCoding { - return _objc_msgSend_12(this.pointer, _sel_requiresSecureCoding); - } - - set requiresSecureCoding(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setRequiresSecureCoding_, value); - } - - static NSKeyedArchiver new1() { - final _ret = _objc_msgSend_2(_class_NSKeyedArchiver, _sel_new); - return NSKeyedArchiver._(_ret, retain: false, release: true); - } - - static NSKeyedArchiver allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSKeyedArchiver, _sel_allocWithZone_, zone); - return NSKeyedArchiver._(_ret, retain: false, release: true); - } - - static NSKeyedArchiver alloc() { - final _ret = _objc_msgSend_2(_class_NSKeyedArchiver, _sel_alloc); - return NSKeyedArchiver._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSKeyedArchiver, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSKeyedArchiver, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSKeyedArchiver, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSKeyedArchiver, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSKeyedArchiver, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSKeyedArchiver, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSKeyedArchiver, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSKeyedArchiver, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSKeyedArchiver, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSKeyedArchiver = objc.getClass("NSKeyedArchiver"); -late final _sel_initRequiringSecureCoding_ = - objc.registerName("initRequiringSecureCoding:"); -final _objc_msgSend_514 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, bool)>(); -late final _sel_archivedDataWithRootObject_requiringSecureCoding_error_ = objc - .registerName("archivedDataWithRootObject:requiringSecureCoding:error:"); -final _objc_msgSend_515 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer>)>(); - -class NSMutableData extends NSData { - NSMutableData._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMutableData] that points to the same underlying object as [other]. - static NSMutableData castFrom(T other) { - return NSMutableData._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSMutableData] that wraps the given raw object pointer. - static NSMutableData castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableData._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableData]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableData); - } - - ffi.Pointer get mutableBytes { - return _objc_msgSend_20(this.pointer, _sel_mutableBytes); - } - - @override - int get length { - return _objc_msgSend_10(this.pointer, _sel_length); - } - - set length(int value) { - return _objc_msgSend_516(this.pointer, _sel_setLength_, value); - } - - void appendBytes_length_(ffi.Pointer bytes, int length) { - _objc_msgSend_22(this.pointer, _sel_appendBytes_length_, bytes, length); - } - - void appendData_(NSData other) { - _objc_msgSend_285(this.pointer, _sel_appendData_, other.pointer); - } - - void increaseLengthBy_(int extraLength) { - _objc_msgSend_470(this.pointer, _sel_increaseLengthBy_, extraLength); - } - - void replaceBytesInRange_withBytes_( - _NSRange range, ffi.Pointer bytes) { - _objc_msgSend_517( - this.pointer, _sel_replaceBytesInRange_withBytes_, range, bytes); - } - - void resetBytesInRange_(_NSRange range) { - _objc_msgSend_476(this.pointer, _sel_resetBytesInRange_, range); - } - - void setData_(NSData data) { - _objc_msgSend_285(this.pointer, _sel_setData_, data.pointer); - } - - void replaceBytesInRange_withBytes_length_(_NSRange range, - ffi.Pointer replacementBytes, int replacementLength) { - _objc_msgSend_518(this.pointer, _sel_replaceBytesInRange_withBytes_length_, - range, replacementBytes, replacementLength); - } - - static NSMutableData? dataWithCapacity_(int aNumItems) { - final _ret = _objc_msgSend_519( - _class_NSMutableData, _sel_dataWithCapacity_, aNumItems); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData? dataWithLength_(int length) { - final _ret = - _objc_msgSend_519(_class_NSMutableData, _sel_dataWithLength_, length); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - NSMutableData? initWithCapacity_(int capacity) { - final _ret = - _objc_msgSend_519(this.pointer, _sel_initWithCapacity_, capacity); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - NSMutableData? initWithLength_(int length) { - final _ret = _objc_msgSend_519(this.pointer, _sel_initWithLength_, length); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - bool decompressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _objc_msgSend_520( - this.pointer, _sel_decompressUsingAlgorithm_error_, algorithm, error); - } - - bool compressUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - return _objc_msgSend_520( - this.pointer, _sel_compressUsingAlgorithm_error_, algorithm, error); - } - - static NSMutableData data() { - final _ret = _objc_msgSend_2(_class_NSMutableData, _sel_data); - return NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData dataWithBytes_length_( - ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - _class_NSMutableData, _sel_dataWithBytes_length_, bytes, length); - return NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData dataWithBytesNoCopy_length_( - ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - _class_NSMutableData, _sel_dataWithBytesNoCopy_length_, bytes, length); - return NSMutableData._(_ret, retain: false, release: true); - } - - static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _objc_msgSend_274(_class_NSMutableData, - _sel_dataWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); - return NSMutableData._(_ret, retain: false, release: true); - } - - static NSMutableData? dataWithContentsOfFile_options_error_(NSString path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_275( - _class_NSMutableData, - _sel_dataWithContentsOfFile_options_error_, - path.pointer, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData? dataWithContentsOfURL_options_error_(NSURL url, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_276( - _class_NSMutableData, - _sel_dataWithContentsOfURL_options_error_, - url.pointer, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData? dataWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSMutableData, _sel_dataWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData? dataWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - _class_NSMutableData, _sel_dataWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData initWithBytes_length_(ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - this.pointer, _sel_initWithBytes_length_, bytes, length); - return NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData initWithBytesNoCopy_length_( - ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_273( - this.pointer, _sel_initWithBytesNoCopy_length_, bytes, length); - return NSMutableData._(_ret, retain: false, release: true); - } - - @override - NSMutableData initWithBytesNoCopy_length_freeWhenDone_( - ffi.Pointer bytes, int length, bool b) { - final _ret = _objc_msgSend_274(this.pointer, - _sel_initWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); - return NSMutableData._(_ret, retain: false, release: true); - } - - @override - NSMutableData initWithBytesNoCopy_length_deallocator_( - ffi.Pointer bytes, - int length, - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _objc_msgSend_278( - this.pointer, - _sel_initWithBytesNoCopy_length_deallocator_, - bytes, - length, - deallocator?.pointer ?? ffi.nullptr); - return NSMutableData._(_ret, retain: false, release: true); - } - - @override - NSMutableData? initWithContentsOfFile_options_error_(NSString path, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_275( - this.pointer, - _sel_initWithContentsOfFile_options_error_, - path.pointer, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData? initWithContentsOfURL_options_error_(NSURL url, - int readOptionsMask, ffi.Pointer> errorPtr) { - final _ret = _objc_msgSend_276( - this.pointer, - _sel_initWithContentsOfURL_options_error_, - url.pointer, - readOptionsMask, - errorPtr); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData initWithData_(NSData data) { - final _ret = - _objc_msgSend_279(this.pointer, _sel_initWithData_, data.pointer); - return NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData dataWithData_(NSData data) { - final _ret = _objc_msgSend_279( - _class_NSMutableData, _sel_dataWithData_, data.pointer); - return NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData? initWithBase64EncodedString_options_( - NSString base64String, int options) { - final _ret = _objc_msgSend_280( - this.pointer, - _sel_initWithBase64EncodedString_options_, - base64String.pointer, - options); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData? initWithBase64EncodedData_options_( - NSData base64Data, int options) { - final _ret = _objc_msgSend_282(this.pointer, - _sel_initWithBase64EncodedData_options_, base64Data.pointer, options); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData? decompressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _objc_msgSend_284(this.pointer, - _sel_decompressedDataUsingAlgorithm_error_, algorithm, error); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - @override - NSMutableData? compressedDataUsingAlgorithm_error_( - int algorithm, ffi.Pointer> error) { - final _ret = _objc_msgSend_284(this.pointer, - _sel_compressedDataUsingAlgorithm_error_, algorithm, error); - return _ret.address == 0 - ? null - : NSMutableData._(_ret, retain: true, release: true); - } - - static NSObject? dataWithContentsOfMappedFile_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSMutableData, _sel_dataWithContentsOfMappedFile_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - @override - NSMutableData init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableData._(_ret, retain: true, release: true); - } - - static NSMutableData new1() { - final _ret = _objc_msgSend_2(_class_NSMutableData, _sel_new); - return NSMutableData._(_ret, retain: false, release: true); - } - - static NSMutableData allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMutableData, _sel_allocWithZone_, zone); - return NSMutableData._(_ret, retain: false, release: true); - } - - static NSMutableData alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableData, _sel_alloc); - return NSMutableData._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableData, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableData, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableData, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMutableData, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableData, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableData, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableData, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableData, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSMutableData, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSMutableData = objc.getClass("NSMutableData"); -late final _sel_mutableBytes = objc.registerName("mutableBytes"); -late final _sel_setLength_ = objc.registerName("setLength:"); -final _objc_msgSend_516 = 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_appendBytes_length_ = objc.registerName("appendBytes:length:"); -late final _sel_appendData_ = objc.registerName("appendData:"); -late final _sel_increaseLengthBy_ = objc.registerName("increaseLengthBy:"); -late final _sel_replaceBytesInRange_withBytes_ = - objc.registerName("replaceBytesInRange:withBytes:"); -final _objc_msgSend_517 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, _NSRange, ffi.Pointer)>(); -late final _sel_resetBytesInRange_ = objc.registerName("resetBytesInRange:"); -late final _sel_setData_ = objc.registerName("setData:"); -late final _sel_replaceBytesInRange_withBytes_length_ = - objc.registerName("replaceBytesInRange:withBytes:length:"); -final _objc_msgSend_518 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer, - int)>(); -late final _sel_dataWithCapacity_ = objc.registerName("dataWithCapacity:"); -final _objc_msgSend_519 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.UnsignedLong)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_dataWithLength_ = objc.registerName("dataWithLength:"); -late final _sel_initWithLength_ = objc.registerName("initWithLength:"); -late final _sel_decompressUsingAlgorithm_error_ = - objc.registerName("decompressUsingAlgorithm:error:"); -final _objc_msgSend_520 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_compressUsingAlgorithm_error_ = - objc.registerName("compressUsingAlgorithm:error:"); -late final _sel_initForWritingWithMutableData_ = - objc.registerName("initForWritingWithMutableData:"); -final _objc_msgSend_521 = 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_archivedDataWithRootObject_ = - objc.registerName("archivedDataWithRootObject:"); -final _objc_msgSend_522 = 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_archiveRootObject_toFile_ = - objc.registerName("archiveRootObject:toFile:"); - -abstract class NSPropertyListFormat { - static const int NSPropertyListOpenStepFormat = 1; - static const int NSPropertyListXMLFormat_v1_0 = 100; - static const int NSPropertyListBinaryFormat_v1_0 = 200; -} - -late final _sel_outputFormat = objc.registerName("outputFormat"); -final _objc_msgSend_523 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setOutputFormat_ = objc.registerName("setOutputFormat:"); -final _objc_msgSend_524 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_encodedData = objc.registerName("encodedData"); -late final _sel_finishEncoding = objc.registerName("finishEncoding"); -late final _sel_setClassName_forClass_ = - objc.registerName("setClassName:forClass:"); -final _objc_msgSend_525 = 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_classNameForClass_ = objc.registerName("classNameForClass:"); -final _objc_msgSend_526 = 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_setRequiresSecureCoding_ = - objc.registerName("setRequiresSecureCoding:"); -final _objc_msgSend_527 = 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_replacementObjectForKeyedArchiver_ = - objc.registerName("replacementObjectForKeyedArchiver:"); -final _objc_msgSend_528 = 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_performSelectorOnMainThread_withObject_waitUntilDone_modes_ = - objc.registerName( - "performSelectorOnMainThread:withObject:waitUntilDone:modes:"); -final _objc_msgSend_529 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); -late final _sel_performSelectorOnMainThread_withObject_waitUntilDone_ = - objc.registerName("performSelectorOnMainThread:withObject:waitUntilDone:"); -final _objc_msgSend_530 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); - -class NSThread extends NSObject { - NSThread._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSThread] that points to the same underlying object as [other]. - static NSThread castFrom(T other) { - return NSThread._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSThread] that wraps the given raw object pointer. - static NSThread castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSThread._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSThread]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSThread); - } - - static NSThread getCurrentThread() { - final _ret = _objc_msgSend_531(_class_NSThread, _sel_currentThread); - return NSThread._(_ret, retain: true, release: true); - } - - static void detachNewThreadWithBlock_(ObjCBlock_ffiVoid block) { - _objc_msgSend_532( - _class_NSThread, _sel_detachNewThreadWithBlock_, block.pointer); - } - - static void detachNewThreadSelector_toTarget_withObject_( - ffi.Pointer selector, - NSObject target, - NSObject? argument) { - _objc_msgSend_533( - _class_NSThread, - _sel_detachNewThreadSelector_toTarget_withObject_, - selector, - target.pointer, - argument?.pointer ?? ffi.nullptr); - } - - static bool isMultiThreaded() { - return _objc_msgSend_12(_class_NSThread, _sel_isMultiThreaded); - } - - NSMutableDictionary get threadDictionary { - final _ret = _objc_msgSend_539(this.pointer, _sel_threadDictionary); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static void sleepUntilDate_(NSDate date) { - _objc_msgSend_540(_class_NSThread, _sel_sleepUntilDate_, date.pointer); - } - - static void sleepForTimeInterval_(double ti) { - _objc_msgSend_541(_class_NSThread, _sel_sleepForTimeInterval_, ti); - } - - static void exit() { - _objc_msgSend_1(_class_NSThread, _sel_exit); - } - - double get threadPriority { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_threadPriority) - : _objc_msgSend_165(this.pointer, _sel_threadPriority); - } - - set threadPriority(double value) { - return _objc_msgSend_542(this.pointer, _sel_setThreadPriority_, value); - } - - int get qualityOfService { - return _objc_msgSend_543(this.pointer, _sel_qualityOfService); - } - - set qualityOfService(int value) { - return _objc_msgSend_544(this.pointer, _sel_setQualityOfService_, value); - } - - static NSArray getCallStackReturnAddresses() { - final _ret = - _objc_msgSend_85(_class_NSThread, _sel_callStackReturnAddresses); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray getCallStackSymbols() { - final _ret = _objc_msgSend_85(_class_NSThread, _sel_callStackSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSString? get name { - final _ret = _objc_msgSend_44(this.pointer, _sel_name); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set name(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); - } - - int get stackSize { - return _objc_msgSend_10(this.pointer, _sel_stackSize); - } - - set stackSize(int value) { - return _objc_msgSend_516(this.pointer, _sel_setStackSize_, value); - } - - bool get isMainThread { - return _objc_msgSend_12(this.pointer, _sel_isMainThread); - } - - static NSThread getMainThread() { - final _ret = _objc_msgSend_531(_class_NSThread, _sel_mainThread); - return NSThread._(_ret, retain: true, release: true); - } - - @override - NSThread init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSThread._(_ret, retain: true, release: true); - } - - NSThread initWithTarget_selector_object_(NSObject target, - ffi.Pointer selector, NSObject? argument) { - final _ret = _objc_msgSend_546( - this.pointer, - _sel_initWithTarget_selector_object_, - target.pointer, - selector, - argument?.pointer ?? ffi.nullptr); - return NSThread._(_ret, retain: true, release: true); - } - - NSThread initWithBlock_(ObjCBlock_ffiVoid block) { - final _ret = - _objc_msgSend_547(this.pointer, _sel_initWithBlock_, block.pointer); - return NSThread._(_ret, retain: true, release: true); - } - - bool get executing { - return _objc_msgSend_12(this.pointer, _sel_isExecuting); - } - - bool get finished { - return _objc_msgSend_12(this.pointer, _sel_isFinished); - } - - bool get cancelled { - return _objc_msgSend_12(this.pointer, _sel_isCancelled); - } - - void cancel() { - _objc_msgSend_1(this.pointer, _sel_cancel); - } - - void start() { - _objc_msgSend_1(this.pointer, _sel_start); - } - - void main() { - _objc_msgSend_1(this.pointer, _sel_main); - } - - static NSThread new1() { - final _ret = _objc_msgSend_2(_class_NSThread, _sel_new); - return NSThread._(_ret, retain: false, release: true); - } - - static NSThread allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSThread, _sel_allocWithZone_, zone); - return NSThread._(_ret, retain: false, release: true); - } - - static NSThread alloc() { - final _ret = _objc_msgSend_2(_class_NSThread, _sel_alloc); - return NSThread._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSThread, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSThread, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSThread, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSThread, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSThread, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSThread, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSThread, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSThread, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSThread, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSThread = objc.getClass("NSThread"); -late final _sel_currentThread = objc.registerName("currentThread"); -final _objc_msgSend_531 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -void _ObjCBlock_ffiVoid_fnPtrTrampoline( - ffi.Pointer block, -) => - block.ref.target - .cast>() - .asFunction()(); -final _ObjCBlock_ffiVoid_closureRegistry = {}; -int _ObjCBlock_ffiVoid_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_registerClosure(void Function() fn) { - final id = ++_ObjCBlock_ffiVoid_closureRegistryIndex; - _ObjCBlock_ffiVoid_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_closureTrampoline( - ffi.Pointer block, -) => - _ObjCBlock_ffiVoid_closureRegistry[block.ref.target.address]!(); - -class ObjCBlock_ffiVoid extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid._(pointer, retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid.fromFunctionPointer( - ffi.Pointer> ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer)>( - _ObjCBlock_ffiVoid_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid.fromFunction(void Function() fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer)>( - _ObjCBlock_ffiVoid_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_registerClosure(() => fn()))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid.listener(void Function() fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_registerClosure(() => fn()))); - static ffi.NativeCallable)>? - _dartFuncListenerTrampoline; - - void call() => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block)>>() - .asFunction)>()( - pointer, - ); -} - -late final _sel_detachNewThreadWithBlock_ = - objc.registerName("detachNewThreadWithBlock:"); -final _objc_msgSend_532 = 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_detachNewThreadSelector_toTarget_withObject_ = - objc.registerName("detachNewThreadSelector:toTarget:withObject:"); -final _objc_msgSend_533 = 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_isMultiThreaded = objc.registerName("isMultiThreaded"); - -class NSMutableDictionary extends NSDictionary { - NSMutableDictionary._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMutableDictionary] that points to the same underlying object as [other]. - static NSMutableDictionary castFrom(T other) { - return NSMutableDictionary._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSMutableDictionary] that wraps the given raw object pointer. - static NSMutableDictionary castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableDictionary._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableDictionary]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableDictionary); - } - - void removeObjectForKey_(NSObject aKey) { - _objc_msgSend_15(this.pointer, _sel_removeObjectForKey_, aKey.pointer); - } - - void setObject_forKey_(NSObject anObject, NSObject aKey) { - _objc_msgSend_534( - this.pointer, _sel_setObject_forKey_, anObject.pointer, aKey.pointer); - } - - @override - NSMutableDictionary init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - NSMutableDictionary initWithCapacity_(int numItems) { - final _ret = - _objc_msgSend_65(this.pointer, _sel_initWithCapacity_, numItems); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - @override - NSMutableDictionary? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, retain: true, release: true); - } - - void addEntriesFromDictionary_(NSDictionary otherDictionary) { - _objc_msgSend_509( - this.pointer, _sel_addEntriesFromDictionary_, otherDictionary.pointer); - } - - void removeAllObjects() { - _objc_msgSend_1(this.pointer, _sel_removeAllObjects); - } - - void removeObjectsForKeys_(NSArray keyArray) { - _objc_msgSend_472( - this.pointer, _sel_removeObjectsForKeys_, keyArray.pointer); - } - - void setDictionary_(NSDictionary otherDictionary) { - _objc_msgSend_509( - this.pointer, _sel_setDictionary_, otherDictionary.pointer); - } - - void setObject_forKeyedSubscript_(NSObject? obj, NSObject key) { - _objc_msgSend_535(this.pointer, _sel_setObject_forKeyedSubscript_, - obj?.pointer ?? ffi.nullptr, key.pointer); - } - - static NSMutableDictionary dictionaryWithCapacity_(int numItems) { - final _ret = _objc_msgSend_65( - _class_NSMutableDictionary, _sel_dictionaryWithCapacity_, numItems); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary? dictionaryWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_536(_class_NSMutableDictionary, - _sel_dictionaryWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary? dictionaryWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_537(_class_NSMutableDictionary, - _sel_dictionaryWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, retain: true, release: true); - } - - NSMutableDictionary? initWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_536( - this.pointer, _sel_initWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, retain: true, release: true); - } - - NSMutableDictionary? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_537( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithSharedKeySet_(NSObject keyset) { - final _ret = _objc_msgSend_538(_class_NSMutableDictionary, - _sel_dictionaryWithSharedKeySet_, keyset.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - void setValue_forKey_(NSObject? value, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setValue_forKey_, - value?.pointer ?? ffi.nullptr, key.pointer); - } - - @override - NSMutableDictionary initWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _objc_msgSend_147( - this.pointer, _sel_initWithObjects_forKeys_count_, objects, keys, cnt); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary dictionary() { - final _ret = _objc_msgSend_2(_class_NSMutableDictionary, _sel_dictionary); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObject_forKey_( - NSObject object, NSObject key) { - final _ret = _objc_msgSend_158(_class_NSMutableDictionary, - _sel_dictionaryWithObject_forKey_, object.pointer, key.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjects_forKeys_count_( - ffi.Pointer> objects, - ffi.Pointer> keys, - int cnt) { - final _ret = _objc_msgSend_147(_class_NSMutableDictionary, - _sel_dictionaryWithObjects_forKeys_count_, objects, keys, cnt); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjectsAndKeys_( - NSObject firstObject) { - final _ret = _objc_msgSend_124(_class_NSMutableDictionary, - _sel_dictionaryWithObjectsAndKeys_, firstObject.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithDictionary_(NSDictionary dict) { - final _ret = _objc_msgSend_159(_class_NSMutableDictionary, - _sel_dictionaryWithDictionary_, dict.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSMutableDictionary dictionaryWithObjects_forKeys_( - NSArray objects, NSArray keys) { - final _ret = _objc_msgSend_160(_class_NSMutableDictionary, - _sel_dictionaryWithObjects_forKeys_, objects.pointer, keys.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - @override - NSMutableDictionary initWithObjectsAndKeys_(NSObject firstObject) { - final _ret = _objc_msgSend_124( - this.pointer, _sel_initWithObjectsAndKeys_, firstObject.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - @override - NSMutableDictionary initWithDictionary_(NSDictionary otherDictionary) { - final _ret = _objc_msgSend_159( - this.pointer, _sel_initWithDictionary_, otherDictionary.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - @override - NSMutableDictionary initWithDictionary_copyItems_( - NSDictionary otherDictionary, bool flag) { - final _ret = _objc_msgSend_161(this.pointer, - _sel_initWithDictionary_copyItems_, otherDictionary.pointer, flag); - return NSMutableDictionary._(_ret, retain: false, release: true); - } - - @override - NSMutableDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { - final _ret = _objc_msgSend_160(this.pointer, _sel_initWithObjects_forKeys_, - objects.pointer, keys.pointer); - return NSMutableDictionary._(_ret, retain: true, release: true); - } - - static NSDictionary? dictionaryWithContentsOfURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_162(_class_NSMutableDictionary, - _sel_dictionaryWithContentsOfURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - static NSObject sharedKeySetForKeys_(NSArray keys) { - final _ret = _objc_msgSend_125( - _class_NSMutableDictionary, _sel_sharedKeySetForKeys_, keys.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static NSMutableDictionary new1() { - final _ret = _objc_msgSend_2(_class_NSMutableDictionary, _sel_new); - return NSMutableDictionary._(_ret, retain: false, release: true); - } - - static NSMutableDictionary allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMutableDictionary, _sel_allocWithZone_, zone); - return NSMutableDictionary._(_ret, retain: false, release: true); - } - - static NSMutableDictionary alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableDictionary, _sel_alloc); - return NSMutableDictionary._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableDictionary, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableDictionary, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableDictionary, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMutableDictionary, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableDictionary, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableDictionary, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableDictionary, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableDictionary, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSMutableDictionary, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSMutableDictionary = objc.getClass("NSMutableDictionary"); -late final _sel_removeObjectForKey_ = objc.registerName("removeObjectForKey:"); -late final _sel_setObject_forKey_ = objc.registerName("setObject:forKey:"); -final _objc_msgSend_534 = 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_addEntriesFromDictionary_ = - objc.registerName("addEntriesFromDictionary:"); -late final _sel_removeObjectsForKeys_ = - objc.registerName("removeObjectsForKeys:"); -late final _sel_setDictionary_ = objc.registerName("setDictionary:"); -late final _sel_setObject_forKeyedSubscript_ = - objc.registerName("setObject:forKeyedSubscript:"); -final _objc_msgSend_535 = 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_dictionaryWithCapacity_ = - objc.registerName("dictionaryWithCapacity:"); -final _objc_msgSend_536 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_537 = 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_dictionaryWithSharedKeySet_ = - objc.registerName("dictionaryWithSharedKeySet:"); -final _objc_msgSend_538 = 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_threadDictionary = objc.registerName("threadDictionary"); -final _objc_msgSend_539 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_sleepUntilDate_ = objc.registerName("sleepUntilDate:"); -final _objc_msgSend_540 = 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_sleepForTimeInterval_ = - objc.registerName("sleepForTimeInterval:"); -final _objc_msgSend_541 = 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_exit = objc.registerName("exit"); -late final _sel_threadPriority = objc.registerName("threadPriority"); -late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); -final _objc_msgSend_542 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Double)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, double)>(); - -abstract class NSQualityOfService { - static const int NSQualityOfServiceUserInteractive = 33; - static const int NSQualityOfServiceUserInitiated = 25; - static const int NSQualityOfServiceUtility = 17; - static const int NSQualityOfServiceBackground = 9; - static const int NSQualityOfServiceDefault = -1; -} - -late final _sel_qualityOfService = objc.registerName("qualityOfService"); -final _objc_msgSend_543 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setQualityOfService_ = - objc.registerName("setQualityOfService:"); -final _objc_msgSend_544 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_callStackReturnAddresses = - objc.registerName("callStackReturnAddresses"); -late final _sel_callStackSymbols = objc.registerName("callStackSymbols"); -late final _sel_setName_ = objc.registerName("setName:"); -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_stackSize = objc.registerName("stackSize"); -late final _sel_setStackSize_ = objc.registerName("setStackSize:"); -late final _sel_isMainThread = objc.registerName("isMainThread"); -late final _sel_mainThread = objc.registerName("mainThread"); -late final _sel_initWithTarget_selector_object_ = - objc.registerName("initWithTarget:selector:object:"); -final _objc_msgSend_546 = 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_initWithBlock_ = objc.registerName("initWithBlock:"); -final _objc_msgSend_547 = 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_isExecuting = objc.registerName("isExecuting"); -late final _sel_isFinished = objc.registerName("isFinished"); -late final _sel_isCancelled = objc.registerName("isCancelled"); -late final _sel_cancel = objc.registerName("cancel"); -late final _sel_start = objc.registerName("start"); -late final _sel_main = objc.registerName("main"); -late final _sel_performSelector_onThread_withObject_waitUntilDone_modes_ = objc - .registerName("performSelector:onThread:withObject:waitUntilDone:modes:"); -final _objc_msgSend_548 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - ffi.Pointer)>(); -late final _sel_performSelector_onThread_withObject_waitUntilDone_ = - objc.registerName("performSelector:onThread:withObject:waitUntilDone:"); -final _objc_msgSend_549 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_performSelectorInBackground_withObject_ = - objc.registerName("performSelectorInBackground:withObject:"); -late final _sel_classForArchiver = objc.registerName("classForArchiver"); - -class NSArchiver extends NSCoder { - NSArchiver._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSArchiver] that points to the same underlying object as [other]. - static NSArchiver castFrom(T other) { - return NSArchiver._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSArchiver] that wraps the given raw object pointer. - static NSArchiver castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSArchiver._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSArchiver]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSArchiver); - } - - NSArchiver initForWritingWithMutableData_(NSMutableData mdata) { - final _ret = _objc_msgSend_521( - this.pointer, _sel_initForWritingWithMutableData_, mdata.pointer); - return NSArchiver._(_ret, retain: true, release: true); - } - - NSMutableData get archiverData { - final _ret = _objc_msgSend_550(this.pointer, _sel_archiverData); - return NSMutableData._(_ret, retain: true, release: true); - } - - @override - void encodeRootObject_(NSObject rootObject) { - _objc_msgSend_15(this.pointer, _sel_encodeRootObject_, rootObject.pointer); - } - - @override - void encodeConditionalObject_(NSObject? object) { - _objc_msgSend_289(this.pointer, _sel_encodeConditionalObject_, - object?.pointer ?? ffi.nullptr); - } - - static NSData archivedDataWithRootObject_(NSObject rootObject) { - final _ret = _objc_msgSend_522(_class_NSArchiver, - _sel_archivedDataWithRootObject_, rootObject.pointer); - return NSData._(_ret, retain: true, release: true); - } - - static bool archiveRootObject_toFile_(NSObject rootObject, NSString path) { - return _objc_msgSend_261(_class_NSArchiver, _sel_archiveRootObject_toFile_, - rootObject.pointer, path.pointer); - } - - void encodeClassName_intoClassName_( - NSString trueName, NSString inArchiveName) { - _objc_msgSend_551(this.pointer, _sel_encodeClassName_intoClassName_, - trueName.pointer, inArchiveName.pointer); - } - - NSString? classNameEncodedForTrueClassName_(NSString trueName) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_classNameEncodedForTrueClassName_, trueName.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - void replaceObject_withObject_(NSObject object, NSObject newObject) { - _objc_msgSend_534(this.pointer, _sel_replaceObject_withObject_, - object.pointer, newObject.pointer); - } - - @override - NSArchiver init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSArchiver._(_ret, retain: true, release: true); - } - - static NSArchiver new1() { - final _ret = _objc_msgSend_2(_class_NSArchiver, _sel_new); - return NSArchiver._(_ret, retain: false, release: true); - } - - static NSArchiver allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSArchiver, _sel_allocWithZone_, zone); - return NSArchiver._(_ret, retain: false, release: true); - } - - static NSArchiver alloc() { - final _ret = _objc_msgSend_2(_class_NSArchiver, _sel_alloc); - return NSArchiver._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSArchiver, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSArchiver, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSArchiver, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSArchiver, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSArchiver, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSArchiver, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSArchiver, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSArchiver, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSArchiver, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSArchiver = objc.getClass("NSArchiver"); -late final _sel_archiverData = objc.registerName("archiverData"); -final _objc_msgSend_550 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_encodeClassName_intoClassName_ = - objc.registerName("encodeClassName:intoClassName:"); -final _objc_msgSend_551 = 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_classNameEncodedForTrueClassName_ = - objc.registerName("classNameEncodedForTrueClassName:"); -late final _sel_replaceObject_withObject_ = - objc.registerName("replaceObject:withObject:"); -late final _sel_replacementObjectForArchiver_ = - objc.registerName("replacementObjectForArchiver:"); -final _objc_msgSend_552 = 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_classForPortCoder = objc.registerName("classForPortCoder"); - -class NSPortCoder extends NSCoder { - NSPortCoder._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSPortCoder] that points to the same underlying object as [other]. - static NSPortCoder castFrom(T other) { - return NSPortCoder._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSPortCoder] that wraps the given raw object pointer. - static NSPortCoder castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPortCoder._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSPortCoder]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSPortCoder); - } - - bool isBycopy() { - return _objc_msgSend_12(this.pointer, _sel_isBycopy); - } - - bool isByref() { - return _objc_msgSend_12(this.pointer, _sel_isByref); - } - - void encodePortObject_(NSPort aport) { - _objc_msgSend_593(this.pointer, _sel_encodePortObject_, aport.pointer); - } - - NSPort? decodePortObject() { - final _ret = _objc_msgSend_594(this.pointer, _sel_decodePortObject); - return _ret.address == 0 - ? null - : NSPort._(_ret, retain: true, release: true); - } - - NSConnection? connection() { - final _ret = _objc_msgSend_595(this.pointer, _sel_connection); - return _ret.address == 0 - ? null - : NSConnection._(_ret, retain: true, release: true); - } - - static NSObject portCoderWithReceivePort_sendPort_components_( - NSPort? rcvPort, NSPort? sndPort, NSArray? comps) { - final _ret = _objc_msgSend_596( - _class_NSPortCoder, - _sel_portCoderWithReceivePort_sendPort_components_, - rcvPort?.pointer ?? ffi.nullptr, - sndPort?.pointer ?? ffi.nullptr, - comps?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); - } - - NSObject initWithReceivePort_sendPort_components_( - NSPort? rcvPort, NSPort? sndPort, NSArray? comps) { - final _ret = _objc_msgSend_596( - this.pointer, - _sel_initWithReceivePort_sendPort_components_, - rcvPort?.pointer ?? ffi.nullptr, - sndPort?.pointer ?? ffi.nullptr, - comps?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); - } - - void dispatch() { - _objc_msgSend_1(this.pointer, _sel_dispatch); - } - - @override - NSPortCoder init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSPortCoder._(_ret, retain: true, release: true); - } - - static NSPortCoder new1() { - final _ret = _objc_msgSend_2(_class_NSPortCoder, _sel_new); - return NSPortCoder._(_ret, retain: false, release: true); - } - - static NSPortCoder allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSPortCoder, _sel_allocWithZone_, zone); - return NSPortCoder._(_ret, retain: false, release: true); - } - - static NSPortCoder alloc() { - final _ret = _objc_msgSend_2(_class_NSPortCoder, _sel_alloc); - return NSPortCoder._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSPortCoder, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSPortCoder, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSPortCoder, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSPortCoder, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSPortCoder, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSPortCoder, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSPortCoder, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSPortCoder, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSPortCoder, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSPortCoder = objc.getClass("NSPortCoder"); -late final _sel_isBycopy = objc.registerName("isBycopy"); -late final _sel_isByref = objc.registerName("isByref"); - -class NSPort extends NSObject { - NSPort._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSPort] that points to the same underlying object as [other]. - static NSPort castFrom(T other) { - return NSPort._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSPort] that wraps the given raw object pointer. - static NSPort castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPort._(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); - } - - static NSPort port() { - final _ret = _objc_msgSend_553(_class_NSPort, _sel_port); - return NSPort._(_ret, retain: true, release: true); - } - - void invalidate() { - _objc_msgSend_1(this.pointer, _sel_invalidate); - } - - bool get valid { - return _objc_msgSend_12(this.pointer, _sel_isValid); - } - - void setDelegate_(NSObject? anObject) { - _objc_msgSend_289( - this.pointer, _sel_setDelegate_, anObject?.pointer ?? ffi.nullptr); - } - - NSObject? delegate() { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - void scheduleInRunLoop_forMode_(NSRunLoop runLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_scheduleInRunLoop_forMode_, - runLoop.pointer, mode.pointer); - } - - void removeFromRunLoop_forMode_(NSRunLoop runLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_removeFromRunLoop_forMode_, - runLoop.pointer, mode.pointer); - } - - int get reservedSpaceLength { - return _objc_msgSend_10(this.pointer, _sel_reservedSpaceLength); - } - - bool sendBeforeDate_components_from_reserved_( - NSDate limitDate, - NSMutableArray? components, - NSPort? receivePort, - int headerSpaceReserved) { - return _objc_msgSend_570( - this.pointer, - _sel_sendBeforeDate_components_from_reserved_, - limitDate.pointer, - components?.pointer ?? ffi.nullptr, - receivePort?.pointer ?? ffi.nullptr, - headerSpaceReserved); - } - - bool sendBeforeDate_msgid_components_from_reserved_( - NSDate limitDate, - int msgID, - NSMutableArray? components, - NSPort? receivePort, - int headerSpaceReserved) { - return _objc_msgSend_571( - this.pointer, - _sel_sendBeforeDate_msgid_components_from_reserved_, - limitDate.pointer, - msgID, - components?.pointer ?? ffi.nullptr, - receivePort?.pointer ?? ffi.nullptr, - headerSpaceReserved); - } - - void addConnection_toRunLoop_forMode_( - NSConnection conn, NSRunLoop runLoop, NSString mode) { - _objc_msgSend_592(this.pointer, _sel_addConnection_toRunLoop_forMode_, - conn.pointer, runLoop.pointer, mode.pointer); - } - - void removeConnection_fromRunLoop_forMode_( - NSConnection conn, NSRunLoop runLoop, NSString mode) { - _objc_msgSend_592(this.pointer, _sel_removeConnection_fromRunLoop_forMode_, - conn.pointer, runLoop.pointer, mode.pointer); - } - - @override - NSPort init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSPort._(_ret, retain: true, release: true); - } - - static NSPort new1() { - final _ret = _objc_msgSend_2(_class_NSPort, _sel_new); - return NSPort._(_ret, retain: false, release: true); - } - - static NSPort allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSPort, _sel_allocWithZone_, zone); - return NSPort._(_ret, retain: false, release: true); - } - - static NSPort alloc() { - final _ret = _objc_msgSend_2(_class_NSPort, _sel_alloc); - return NSPort._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSPort, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSPort, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSPort, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSPort, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSPort, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64( - _class_NSPort, _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSPort, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSPort, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSPort, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSPort = objc.getClass("NSPort"); -final _objc_msgSend_553 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_invalidate = objc.registerName("invalidate"); -late final _sel_isValid = objc.registerName("isValid"); - -class NSRunLoop extends NSObject { - NSRunLoop._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSRunLoop] that points to the same underlying object as [other]. - static NSRunLoop castFrom(T other) { - return NSRunLoop._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSRunLoop] that wraps the given raw object pointer. - static NSRunLoop castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSRunLoop._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSRunLoop]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSRunLoop); - } - - static NSRunLoop getCurrentRunLoop() { - final _ret = _objc_msgSend_554(_class_NSRunLoop, _sel_currentRunLoop); - return NSRunLoop._(_ret, retain: true, release: true); - } - - static NSRunLoop getMainRunLoop() { - final _ret = _objc_msgSend_554(_class_NSRunLoop, _sel_mainRunLoop); - return NSRunLoop._(_ret, retain: true, release: true); - } - - NSString? get currentMode { - final _ret = _objc_msgSend_44(this.pointer, _sel_currentMode); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - ffi.Pointer<__CFRunLoop> getCFRunLoop() { - return _objc_msgSend_555(this.pointer, _sel_getCFRunLoop); - } - - void addTimer_forMode_(NSTimer timer, NSString mode) { - _objc_msgSend_562( - this.pointer, _sel_addTimer_forMode_, timer.pointer, mode.pointer); - } - - void addPort_forMode_(NSPort aPort, NSString mode) { - _objc_msgSend_563( - this.pointer, _sel_addPort_forMode_, aPort.pointer, mode.pointer); - } - - void removePort_forMode_(NSPort aPort, NSString mode) { - _objc_msgSend_563( - this.pointer, _sel_removePort_forMode_, aPort.pointer, mode.pointer); - } - - NSDate? limitDateForMode_(NSString mode) { - final _ret = - _objc_msgSend_564(this.pointer, _sel_limitDateForMode_, mode.pointer); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - void acceptInputForMode_beforeDate_(NSString mode, NSDate limitDate) { - _objc_msgSend_565(this.pointer, _sel_acceptInputForMode_beforeDate_, - mode.pointer, limitDate.pointer); - } - - void run() { - _objc_msgSend_1(this.pointer, _sel_run); - } - - void runUntilDate_(NSDate limitDate) { - _objc_msgSend_540(this.pointer, _sel_runUntilDate_, limitDate.pointer); - } - - bool runMode_beforeDate_(NSString mode, NSDate limitDate) { - return _objc_msgSend_566(this.pointer, _sel_runMode_beforeDate_, - mode.pointer, limitDate.pointer); - } - - void configureAsServer() { - _objc_msgSend_1(this.pointer, _sel_configureAsServer); - } - - void performInModes_block_(NSArray modes, ObjCBlock_ffiVoid block) { - _objc_msgSend_567( - this.pointer, _sel_performInModes_block_, modes.pointer, block.pointer); - } - - void performBlock_(ObjCBlock_ffiVoid block) { - _objc_msgSend_532(this.pointer, _sel_performBlock_, block.pointer); - } - - void performSelector_target_argument_order_modes_( - ffi.Pointer aSelector, - NSObject target, - NSObject? arg, - int order, - NSArray modes) { - _objc_msgSend_568( - this.pointer, - _sel_performSelector_target_argument_order_modes_, - aSelector, - target.pointer, - arg?.pointer ?? ffi.nullptr, - order, - modes.pointer); - } - - void cancelPerformSelector_target_argument_( - ffi.Pointer aSelector, - NSObject target, - NSObject? arg) { - _objc_msgSend_533(this.pointer, _sel_cancelPerformSelector_target_argument_, - aSelector, target.pointer, arg?.pointer ?? ffi.nullptr); - } - - void cancelPerformSelectorsWithTarget_(NSObject target) { - _objc_msgSend_15( - this.pointer, _sel_cancelPerformSelectorsWithTarget_, target.pointer); - } - - @override - NSRunLoop init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSRunLoop._(_ret, retain: true, release: true); - } - - static NSRunLoop new1() { - final _ret = _objc_msgSend_2(_class_NSRunLoop, _sel_new); - return NSRunLoop._(_ret, retain: false, release: true); - } - - static NSRunLoop allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSRunLoop, _sel_allocWithZone_, zone); - return NSRunLoop._(_ret, retain: false, release: true); - } - - static NSRunLoop alloc() { - final _ret = _objc_msgSend_2(_class_NSRunLoop, _sel_alloc); - return NSRunLoop._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSRunLoop, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSRunLoop, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSRunLoop, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSRunLoop, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSRunLoop, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSRunLoop, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSRunLoop, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSRunLoop, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSRunLoop, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSRunLoop = objc.getClass("NSRunLoop"); -late final _sel_currentRunLoop = objc.registerName("currentRunLoop"); -final _objc_msgSend_554 = 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_555 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer<__CFRunLoop> Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer<__CFRunLoop> Function( - ffi.Pointer, ffi.Pointer)>(); - -class NSTimer extends NSObject { - NSTimer._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSTimer] that points to the same underlying object as [other]. - static NSTimer castFrom(T other) { - return NSTimer._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSTimer] that wraps the given raw object pointer. - static NSTimer castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSTimer._(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); - } - - static NSTimer timerWithTimeInterval_invocation_repeats_( - double ti, NSInvocation invocation, bool yesOrNo) { - final _ret = _objc_msgSend_556( - _class_NSTimer, - _sel_timerWithTimeInterval_invocation_repeats_, - ti, - invocation.pointer, - yesOrNo); - return NSTimer._(_ret, retain: true, release: true); - } - - static NSTimer scheduledTimerWithTimeInterval_invocation_repeats_( - double ti, NSInvocation invocation, bool yesOrNo) { - final _ret = _objc_msgSend_556( - _class_NSTimer, - _sel_scheduledTimerWithTimeInterval_invocation_repeats_, - ti, - invocation.pointer, - yesOrNo); - return NSTimer._(_ret, retain: true, release: true); - } - - static NSTimer timerWithTimeInterval_target_selector_userInfo_repeats_( - double ti, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? userInfo, - bool yesOrNo) { - final _ret = _objc_msgSend_557( - _class_NSTimer, - _sel_timerWithTimeInterval_target_selector_userInfo_repeats_, - ti, - aTarget.pointer, - aSelector, - userInfo?.pointer ?? ffi.nullptr, - yesOrNo); - return NSTimer._(_ret, retain: true, release: true); - } - - static NSTimer - scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_( - double ti, - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? userInfo, - bool yesOrNo) { - final _ret = _objc_msgSend_557( - _class_NSTimer, - _sel_scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_, - ti, - aTarget.pointer, - aSelector, - userInfo?.pointer ?? ffi.nullptr, - yesOrNo); - return NSTimer._(_ret, retain: true, release: true); - } - - static NSTimer timerWithTimeInterval_repeats_block_( - double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { - final _ret = _objc_msgSend_558( - _class_NSTimer, - _sel_timerWithTimeInterval_repeats_block_, - interval, - repeats, - block.pointer); - return NSTimer._(_ret, retain: true, release: true); - } - - static NSTimer scheduledTimerWithTimeInterval_repeats_block_( - double interval, bool repeats, ObjCBlock_ffiVoid_NSTimer block) { - final _ret = _objc_msgSend_558( - _class_NSTimer, - _sel_scheduledTimerWithTimeInterval_repeats_block_, - interval, - repeats, - block.pointer); - return NSTimer._(_ret, retain: true, release: true); - } - - NSTimer initWithFireDate_interval_repeats_block_(NSDate date, double interval, - bool repeats, ObjCBlock_ffiVoid_NSTimer block) { - final _ret = _objc_msgSend_559( - this.pointer, - _sel_initWithFireDate_interval_repeats_block_, - date.pointer, - interval, - repeats, - block.pointer); - return NSTimer._(_ret, retain: true, release: true); - } - - NSTimer initWithFireDate_interval_target_selector_userInfo_repeats_( - NSDate date, - double ti, - NSObject t, - ffi.Pointer s, - NSObject? ui, - bool rep) { - final _ret = _objc_msgSend_560( - this.pointer, - _sel_initWithFireDate_interval_target_selector_userInfo_repeats_, - date.pointer, - ti, - t.pointer, - s, - ui?.pointer ?? ffi.nullptr, - rep); - return NSTimer._(_ret, retain: true, release: true); - } - - void fire() { - _objc_msgSend_1(this.pointer, _sel_fire); - } - - NSDate get fireDate { - final _ret = _objc_msgSend_172(this.pointer, _sel_fireDate); - return NSDate._(_ret, retain: true, release: true); - } - - set fireDate(NSDate value) { - return _objc_msgSend_561(this.pointer, _sel_setFireDate_, value.pointer); - } - - double get timeInterval { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_timeInterval) - : _objc_msgSend_165(this.pointer, _sel_timeInterval); - } - - double get tolerance { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_tolerance) - : _objc_msgSend_165(this.pointer, _sel_tolerance); - } - - set tolerance(double value) { - return _objc_msgSend_542(this.pointer, _sel_setTolerance_, value); - } - - void invalidate() { - _objc_msgSend_1(this.pointer, _sel_invalidate); - } - - bool get valid { - return _objc_msgSend_12(this.pointer, _sel_isValid); - } - - NSObject? get userInfo { - final _ret = _objc_msgSend_17(this.pointer, _sel_userInfo); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - @override - NSTimer init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSTimer._(_ret, retain: true, release: true); - } - - static NSTimer new1() { - final _ret = _objc_msgSend_2(_class_NSTimer, _sel_new); - return NSTimer._(_ret, retain: false, release: true); - } - - static NSTimer allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSTimer, _sel_allocWithZone_, zone); - return NSTimer._(_ret, retain: false, release: true); - } - - static NSTimer alloc() { - final _ret = _objc_msgSend_2(_class_NSTimer, _sel_alloc); - return NSTimer._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSTimer, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSTimer, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSTimer, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSTimer, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSTimer, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSTimer, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSTimer, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSTimer, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSTimer, _sel_classForKeyedUnarchiver); - return NSObject._(_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_556 = 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_557 = 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); -final _ObjCBlock_ffiVoid_NSTimer_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSTimer_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSTimer_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSTimer_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSTimer_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSTimer_closureRegistry[block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_NSTimer extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSTimer._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSTimer castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSTimer._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSTimer.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTimer_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSTimer.fromFunction(void Function(NSTimer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSTimer_registerClosure( - (ffi.Pointer arg0) => - fn(NSTimer._(arg0, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSTimer.listener(void Function(NSTimer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSTimer_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSTimer_registerClosure( - (ffi.Pointer arg0) => - fn(NSTimer._(arg0, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSTimer arg0) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer)>()(pointer, arg0.pointer); -} - -late final _sel_timerWithTimeInterval_repeats_block_ = - objc.registerName("timerWithTimeInterval:repeats:block:"); -final _objc_msgSend_558 = 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_559 = 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_560 = 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:"); -final _objc_msgSend_561 = 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:"); -late final _sel_addTimer_forMode_ = objc.registerName("addTimer:forMode:"); -final _objc_msgSend_562 = 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_addPort_forMode_ = objc.registerName("addPort:forMode:"); -final _objc_msgSend_563 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_removePort_forMode_ = objc.registerName("removePort:forMode:"); -late final _sel_limitDateForMode_ = objc.registerName("limitDateForMode:"); -final _objc_msgSend_564 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_acceptInputForMode_beforeDate_ = - objc.registerName("acceptInputForMode:beforeDate:"); -final _objc_msgSend_565 = 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:"); -late final _sel_runMode_beforeDate_ = objc.registerName("runMode:beforeDate:"); -final _objc_msgSend_566 = 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_567 = 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:"); -late final _sel_performSelector_target_argument_order_modes_ = - objc.registerName("performSelector:target:argument:order:modes:"); -final _objc_msgSend_568 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_cancelPerformSelector_target_argument_ = - objc.registerName("cancelPerformSelector:target:argument:"); -late final _sel_cancelPerformSelectorsWithTarget_ = - objc.registerName("cancelPerformSelectorsWithTarget:"); -late final _sel_scheduleInRunLoop_forMode_ = - objc.registerName("scheduleInRunLoop:forMode:"); -final _objc_msgSend_569 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_removeFromRunLoop_forMode_ = - objc.registerName("removeFromRunLoop:forMode:"); -late final _sel_reservedSpaceLength = objc.registerName("reservedSpaceLength"); -late final _sel_sendBeforeDate_components_from_reserved_ = - objc.registerName("sendBeforeDate:components:from:reserved:"); -final _objc_msgSend_570 = 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_571 = 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)>(); - -class NSConnection extends NSObject { - NSConnection._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSConnection] that points to the same underlying object as [other]. - static NSConnection castFrom(T other) { - return NSConnection._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSConnection] that wraps the given raw object pointer. - static NSConnection castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSConnection._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSConnection]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSConnection); - } - - NSDictionary get statistics { - final _ret = _objc_msgSend_181(this.pointer, _sel_statistics); - return NSDictionary._(_ret, retain: true, release: true); - } - - static NSArray allConnections() { - final _ret = _objc_msgSend_85(_class_NSConnection, _sel_allConnections); - return NSArray._(_ret, retain: true, release: true); - } - - static NSConnection defaultConnection() { - final _ret = _objc_msgSend_572(_class_NSConnection, _sel_defaultConnection); - return NSConnection._(_ret, retain: true, release: true); - } - - static NSConnection? connectionWithRegisteredName_host_( - NSString name, NSString? hostName) { - final _ret = _objc_msgSend_573( - _class_NSConnection, - _sel_connectionWithRegisteredName_host_, - name.pointer, - hostName?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSConnection._(_ret, retain: true, release: true); - } - - static NSConnection? connectionWithRegisteredName_host_usingNameServer_( - NSString name, NSString? hostName, NSPortNameServer server) { - final _ret = _objc_msgSend_578( - _class_NSConnection, - _sel_connectionWithRegisteredName_host_usingNameServer_, - name.pointer, - hostName?.pointer ?? ffi.nullptr, - server.pointer); - return _ret.address == 0 - ? null - : NSConnection._(_ret, retain: true, release: true); - } - - static NSDistantObject? rootProxyForConnectionWithRegisteredName_host_( - NSString name, NSString? hostName) { - final _ret = _objc_msgSend_583( - _class_NSConnection, - _sel_rootProxyForConnectionWithRegisteredName_host_, - name.pointer, - hostName?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSDistantObject._(_ret, retain: true, release: true); - } - - static NSDistantObject? - rootProxyForConnectionWithRegisteredName_host_usingNameServer_( - NSString name, NSString? hostName, NSPortNameServer server) { - final _ret = _objc_msgSend_584( - _class_NSConnection, - _sel_rootProxyForConnectionWithRegisteredName_host_usingNameServer_, - name.pointer, - hostName?.pointer ?? ffi.nullptr, - server.pointer); - return _ret.address == 0 - ? null - : NSDistantObject._(_ret, retain: true, release: true); - } - - static NSConnection? serviceConnectionWithName_rootObject_usingNameServer_( - NSString name, NSObject root, NSPortNameServer server) { - final _ret = _objc_msgSend_585( - _class_NSConnection, - _sel_serviceConnectionWithName_rootObject_usingNameServer_, - name.pointer, - root.pointer, - server.pointer); - return _ret.address == 0 - ? null - : NSConnection._(_ret, retain: true, release: true); - } - - static NSConnection? serviceConnectionWithName_rootObject_( - NSString name, NSObject root) { - final _ret = _objc_msgSend_586(_class_NSConnection, - _sel_serviceConnectionWithName_rootObject_, name.pointer, root.pointer); - return _ret.address == 0 - ? null - : NSConnection._(_ret, retain: true, release: true); - } - - double get requestTimeout { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_requestTimeout) - : _objc_msgSend_165(this.pointer, _sel_requestTimeout); - } - - set requestTimeout(double value) { - return _objc_msgSend_542(this.pointer, _sel_setRequestTimeout_, value); - } - - double get replyTimeout { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_replyTimeout) - : _objc_msgSend_165(this.pointer, _sel_replyTimeout); - } - - set replyTimeout(double value) { - return _objc_msgSend_542(this.pointer, _sel_setReplyTimeout_, value); - } - - NSObject? get rootObject { - final _ret = _objc_msgSend_17(this.pointer, _sel_rootObject); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set rootObject(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setRootObject_, value?.pointer ?? ffi.nullptr); - } - - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); - } - - bool get independentConversationQueueing { - return _objc_msgSend_12(this.pointer, _sel_independentConversationQueueing); - } - - set independentConversationQueueing(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setIndependentConversationQueueing_, value); - } - - bool get valid { - return _objc_msgSend_12(this.pointer, _sel_isValid); - } - - NSDistantObject get rootProxy { - final _ret = _objc_msgSend_587(this.pointer, _sel_rootProxy); - return NSDistantObject._(_ret, retain: true, release: true); - } - - void invalidate() { - _objc_msgSend_1(this.pointer, _sel_invalidate); - } - - void addRequestMode_(NSString rmode) { - _objc_msgSend_247(this.pointer, _sel_addRequestMode_, rmode.pointer); - } - - void removeRequestMode_(NSString rmode) { - _objc_msgSend_247(this.pointer, _sel_removeRequestMode_, rmode.pointer); - } - - NSArray get requestModes { - final _ret = _objc_msgSend_85(this.pointer, _sel_requestModes); - return NSArray._(_ret, retain: true, release: true); - } - - bool registerName_(NSString? name) { - return _objc_msgSend_588( - this.pointer, _sel_registerName_, name?.pointer ?? ffi.nullptr); - } - - bool registerName_withNameServer_(NSString? name, NSPortNameServer server) { - return _objc_msgSend_589(this.pointer, _sel_registerName_withNameServer_, - name?.pointer ?? ffi.nullptr, server.pointer); - } - - static NSConnection? connectionWithReceivePort_sendPort_( - NSPort? receivePort, NSPort? sendPort) { - final _ret = _objc_msgSend_590( - _class_NSConnection, - _sel_connectionWithReceivePort_sendPort_, - receivePort?.pointer ?? ffi.nullptr, - sendPort?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSConnection._(_ret, retain: true, release: true); - } - - static NSObject? currentConversation() { - final _ret = - _objc_msgSend_17(_class_NSConnection, _sel_currentConversation); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSConnection? initWithReceivePort_sendPort_( - NSPort? receivePort, NSPort? sendPort) { - final _ret = _objc_msgSend_590( - this.pointer, - _sel_initWithReceivePort_sendPort_, - receivePort?.pointer ?? ffi.nullptr, - sendPort?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSConnection._(_ret, retain: true, release: true); - } - - NSPort get sendPort { - final _ret = _objc_msgSend_553(this.pointer, _sel_sendPort); - return NSPort._(_ret, retain: true, release: true); - } - - NSPort get receivePort { - final _ret = _objc_msgSend_553(this.pointer, _sel_receivePort); - return NSPort._(_ret, retain: true, release: true); - } - - void enableMultipleThreads() { - _objc_msgSend_1(this.pointer, _sel_enableMultipleThreads); - } - - bool get multipleThreadsEnabled { - return _objc_msgSend_12(this.pointer, _sel_multipleThreadsEnabled); - } - - void addRunLoop_(NSRunLoop runloop) { - _objc_msgSend_591(this.pointer, _sel_addRunLoop_, runloop.pointer); - } - - void removeRunLoop_(NSRunLoop runloop) { - _objc_msgSend_591(this.pointer, _sel_removeRunLoop_, runloop.pointer); - } - - void runInNewThread() { - _objc_msgSend_1(this.pointer, _sel_runInNewThread); - } - - NSArray get remoteObjects { - final _ret = _objc_msgSend_85(this.pointer, _sel_remoteObjects); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get localObjects { - final _ret = _objc_msgSend_85(this.pointer, _sel_localObjects); - return NSArray._(_ret, retain: true, release: true); - } - - void dispatchWithComponents_(NSArray components) { - _objc_msgSend_472( - this.pointer, _sel_dispatchWithComponents_, components.pointer); - } - - @override - NSConnection init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSConnection._(_ret, retain: true, release: true); - } - - static NSConnection new1() { - final _ret = _objc_msgSend_2(_class_NSConnection, _sel_new); - return NSConnection._(_ret, retain: false, release: true); - } - - static NSConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSConnection, _sel_allocWithZone_, zone); - return NSConnection._(_ret, retain: false, release: true); - } - - static NSConnection alloc() { - final _ret = _objc_msgSend_2(_class_NSConnection, _sel_alloc); - return NSConnection._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSConnection, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSConnection, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSConnection, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSConnection, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSConnection, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSConnection, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSConnection, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSConnection, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSConnection, _sel_classForKeyedUnarchiver); - return NSObject._(_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_572 = 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_573 = 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)>(); - -class NSPortNameServer extends NSObject { - NSPortNameServer._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSPortNameServer] that points to the same underlying object as [other]. - static NSPortNameServer castFrom(T other) { - return NSPortNameServer._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSPortNameServer] that wraps the given raw object pointer. - static NSPortNameServer castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPortNameServer._(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); - } - - static NSPortNameServer systemDefaultPortNameServer() { - final _ret = _objc_msgSend_574( - _class_NSPortNameServer, _sel_systemDefaultPortNameServer); - return NSPortNameServer._(_ret, retain: true, release: true); - } - - NSPort? portForName_(NSString name) { - final _ret = - _objc_msgSend_575(this.pointer, _sel_portForName_, name.pointer); - return _ret.address == 0 - ? null - : NSPort._(_ret, retain: true, release: true); - } - - NSPort? portForName_host_(NSString name, NSString? host) { - final _ret = _objc_msgSend_576(this.pointer, _sel_portForName_host_, - name.pointer, host?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSPort._(_ret, retain: true, release: true); - } - - bool registerPort_name_(NSPort port, NSString name) { - return _objc_msgSend_577( - this.pointer, _sel_registerPort_name_, port.pointer, name.pointer); - } - - bool removePortForName_(NSString name) { - return _objc_msgSend_64( - this.pointer, _sel_removePortForName_, name.pointer); - } - - @override - NSPortNameServer init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSPortNameServer._(_ret, retain: true, release: true); - } - - static NSPortNameServer new1() { - final _ret = _objc_msgSend_2(_class_NSPortNameServer, _sel_new); - return NSPortNameServer._(_ret, retain: false, release: true); - } - - static NSPortNameServer allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSPortNameServer, _sel_allocWithZone_, zone); - return NSPortNameServer._(_ret, retain: false, release: true); - } - - static NSPortNameServer alloc() { - final _ret = _objc_msgSend_2(_class_NSPortNameServer, _sel_alloc); - return NSPortNameServer._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSPortNameServer, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSPortNameServer, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSPortNameServer, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSPortNameServer, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSPortNameServer, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSPortNameServer, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSPortNameServer, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSPortNameServer, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSPortNameServer, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSPortNameServer = objc.getClass("NSPortNameServer"); -late final _sel_systemDefaultPortNameServer = - objc.registerName("systemDefaultPortNameServer"); -final _objc_msgSend_574 = 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_575 = 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_576 = 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_577 = 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_578 = 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)>(); - -class NSDistantObject extends NSProxy { - NSDistantObject._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSDistantObject] that points to the same underlying object as [other]. - static NSDistantObject castFrom(T other) { - return NSDistantObject._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSDistantObject] that wraps the given raw object pointer. - static NSDistantObject castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDistantObject._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSDistantObject]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSDistantObject); - } - - static NSObject? proxyWithTarget_connection_( - NSObject target, NSConnection connection) { - final _ret = _objc_msgSend_580(_class_NSDistantObject, - _sel_proxyWithTarget_connection_, target.pointer, connection.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSDistantObject? initWithTarget_connection_( - NSObject target, NSConnection connection) { - final _ret = _objc_msgSend_580(this.pointer, - _sel_initWithTarget_connection_, target.pointer, connection.pointer); - return _ret.address == 0 - ? null - : NSDistantObject._(_ret, retain: true, release: true); - } - - static NSObject proxyWithLocal_connection_( - NSObject target, NSConnection connection) { - final _ret = _objc_msgSend_581(_class_NSDistantObject, - _sel_proxyWithLocal_connection_, target.pointer, connection.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - NSDistantObject initWithLocal_connection_( - NSObject target, NSConnection connection) { - final _ret = _objc_msgSend_581(this.pointer, _sel_initWithLocal_connection_, - target.pointer, connection.pointer); - return NSDistantObject._(_ret, retain: true, release: true); - } - - NSDistantObject? initWithCoder_(NSCoder inCoder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, inCoder.pointer); - return _ret.address == 0 - ? null - : NSDistantObject._(_ret, retain: true, release: true); - } - - void setProtocolForProxy_(Protocol? proto) { - _objc_msgSend_582( - this.pointer, _sel_setProtocolForProxy_, proto?.pointer ?? ffi.nullptr); - } - - NSConnection get connectionForProxy { - final _ret = _objc_msgSend_572(this.pointer, _sel_connectionForProxy); - return NSConnection._(_ret, retain: true, release: true); - } - - static NSObject alloc() { - final _ret = _objc_msgSend_2(_class_NSDistantObject, _sel_alloc); - return NSObject._(_ret, retain: false, release: true); - } - - static bool respondsToSelector_(ffi.Pointer aSelector) { - return _objc_msgSend_4( - _class_NSDistantObject, _sel_respondsToSelector_, aSelector); - } -} - -late final _class_NSDistantObject = objc.getClass("NSDistantObject"); - -class NSProxy extends objc.ObjCObjectBase { - NSProxy._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super(pointer, retain: retain, release: release); - - /// Returns a [NSProxy] that points to the same underlying object as [other]. - static NSProxy castFrom(T other) { - return NSProxy._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSProxy] that wraps the given raw object pointer. - static NSProxy castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProxy._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSProxy]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSProxy); - } - - static NSObject alloc() { - final _ret = _objc_msgSend_2(_class_NSProxy, _sel_alloc); - return NSObject._(_ret, retain: false, release: true); - } - - static NSObject allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSProxy, _sel_allocWithZone_, zone); - return NSObject._(_ret, retain: false, release: true); - } - - static NSObject class1() { - final _ret = _objc_msgSend_2(_class_NSProxy, _sel_class); - return NSObject._(_ret, retain: true, release: true); - } - - void forwardInvocation_(NSInvocation invocation) { - _objc_msgSend_421( - this.pointer, _sel_forwardInvocation_, invocation.pointer); - } - - NSMethodSignature? methodSignatureForSelector_( - ffi.Pointer sel) { - final _ret = - _objc_msgSend_579(this.pointer, _sel_methodSignatureForSelector_, sel); - return _ret.address == 0 - ? null - : NSMethodSignature._(_ret, retain: true, release: true); - } - - void dealloc() { - _objc_msgSend_1(this.pointer, _sel_dealloc); - } - - void finalize() { - _objc_msgSend_1(this.pointer, _sel_finalize); - } - - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); - } - - NSString get debugDescription { - final _ret = _objc_msgSend_21(this.pointer, _sel_debugDescription); - return NSString._(_ret, retain: true, release: true); - } - - static bool respondsToSelector_(ffi.Pointer aSelector) { - return _objc_msgSend_4(_class_NSProxy, _sel_respondsToSelector_, aSelector); - } - - bool allowsWeakReference() { - return _objc_msgSend_12(this.pointer, _sel_allowsWeakReference); - } - - bool retainWeakReference() { - return _objc_msgSend_12(this.pointer, _sel_retainWeakReference); - } -} - -late final _class_NSProxy = objc.getClass("NSProxy"); -final _objc_msgSend_579 = 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_respondsToSelector_ = objc.registerName("respondsToSelector:"); -late final _sel_proxyWithTarget_connection_ = - objc.registerName("proxyWithTarget:connection:"); -final _objc_msgSend_580 = 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_initWithTarget_connection_ = - objc.registerName("initWithTarget:connection:"); -late final _sel_proxyWithLocal_connection_ = - objc.registerName("proxyWithLocal:connection:"); -final _objc_msgSend_581 = 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_setProtocolForProxy_ = - objc.registerName("setProtocolForProxy:"); -final _objc_msgSend_582 = 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_connectionForProxy = objc.registerName("connectionForProxy"); -late final _sel_rootProxyForConnectionWithRegisteredName_host_ = - objc.registerName("rootProxyForConnectionWithRegisteredName:host:"); -final _objc_msgSend_583 = 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_rootProxyForConnectionWithRegisteredName_host_usingNameServer_ = - objc.registerName( - "rootProxyForConnectionWithRegisteredName:host:usingNameServer:"); -final _objc_msgSend_584 = 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_serviceConnectionWithName_rootObject_usingNameServer_ = - objc.registerName("serviceConnectionWithName:rootObject:usingNameServer:"); -final _objc_msgSend_585 = 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_serviceConnectionWithName_rootObject_ = - objc.registerName("serviceConnectionWithName:rootObject:"); -final _objc_msgSend_586 = 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_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_587 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer 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_588 = 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_registerName_withNameServer_ = - objc.registerName("registerName:withNameServer:"); -final _objc_msgSend_589 = 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_590 = 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_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_591 = 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:"); -late final _sel_addConnection_toRunLoop_forMode_ = - objc.registerName("addConnection:toRunLoop:forMode:"); -final _objc_msgSend_592 = 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_encodePortObject_ = objc.registerName("encodePortObject:"); -final _objc_msgSend_593 = 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_decodePortObject = objc.registerName("decodePortObject"); -final _objc_msgSend_594 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_connection = objc.registerName("connection"); -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_portCoderWithReceivePort_sendPort_components_ = - objc.registerName("portCoderWithReceivePort:sendPort:components:"); -final _objc_msgSend_596 = 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_initWithReceivePort_sendPort_components_ = - objc.registerName("initWithReceivePort:sendPort:components:"); -late final _sel_dispatch = objc.registerName("dispatch"); -late final _sel_replacementObjectForPortCoder_ = - objc.registerName("replacementObjectForPortCoder:"); -final _objc_msgSend_597 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -class NSClassDescription extends NSObject { - NSClassDescription._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSClassDescription] that points to the same underlying object as [other]. - static NSClassDescription castFrom(T other) { - return NSClassDescription._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSClassDescription] that wraps the given raw object pointer. - static NSClassDescription castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSClassDescription._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSClassDescription]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSClassDescription); - } - - static void registerClassDescription_forClass_( - NSClassDescription description, NSObject aClass) { - _objc_msgSend_598( - _class_NSClassDescription, - _sel_registerClassDescription_forClass_, - description.pointer, - aClass.pointer); - } - - static void invalidateClassDescriptionCache() { - _objc_msgSend_1( - _class_NSClassDescription, _sel_invalidateClassDescriptionCache); - } - - static NSClassDescription? classDescriptionForClass_(NSObject aClass) { - final _ret = _objc_msgSend_599(_class_NSClassDescription, - _sel_classDescriptionForClass_, aClass.pointer); - return _ret.address == 0 - ? null - : NSClassDescription._(_ret, retain: true, release: true); - } - - @override - NSArray get attributeKeys { - final _ret = _objc_msgSend_85(this.pointer, _sel_attributeKeys); - return NSArray._(_ret, retain: true, release: true); - } - - @override - NSArray get toOneRelationshipKeys { - final _ret = _objc_msgSend_85(this.pointer, _sel_toOneRelationshipKeys); - return NSArray._(_ret, retain: true, release: true); - } - - @override - NSArray get toManyRelationshipKeys { - final _ret = _objc_msgSend_85(this.pointer, _sel_toManyRelationshipKeys); - return NSArray._(_ret, retain: true, release: true); - } - - @override - NSString? inverseForRelationshipKey_(NSString relationshipKey) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_inverseForRelationshipKey_, relationshipKey.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - @override - NSClassDescription init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSClassDescription._(_ret, retain: true, release: true); - } - - static NSClassDescription new1() { - final _ret = _objc_msgSend_2(_class_NSClassDescription, _sel_new); - return NSClassDescription._(_ret, retain: false, release: true); - } - - static NSClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSClassDescription, _sel_allocWithZone_, zone); - return NSClassDescription._(_ret, retain: false, release: true); - } - - static NSClassDescription alloc() { - final _ret = _objc_msgSend_2(_class_NSClassDescription, _sel_alloc); - return NSClassDescription._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSClassDescription, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSClassDescription, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSClassDescription, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSClassDescription, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSClassDescription, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSClassDescription, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSClassDescription, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSClassDescription, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSClassDescription, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSClassDescription = objc.getClass("NSClassDescription"); -late final _sel_registerClassDescription_forClass_ = - objc.registerName("registerClassDescription:forClass:"); -final _objc_msgSend_598 = 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"); -late final _sel_classDescriptionForClass_ = - objc.registerName("classDescriptionForClass:"); -final _objc_msgSend_599 = 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:"); -late final _sel_classDescription = objc.registerName("classDescription"); -final _objc_msgSend_600 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - -class NSScriptObjectSpecifier extends NSObject { - NSScriptObjectSpecifier._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSScriptObjectSpecifier] that points to the same underlying object as [other]. - static NSScriptObjectSpecifier castFrom( - T other) { - return NSScriptObjectSpecifier._(other.pointer, - retain: true, release: true); - } - - /// Returns a [NSScriptObjectSpecifier] that wraps the given raw object pointer. - static NSScriptObjectSpecifier castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSScriptObjectSpecifier._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSScriptObjectSpecifier]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSScriptObjectSpecifier); - } - - static NSScriptObjectSpecifier? objectSpecifierWithDescriptor_( - NSAppleEventDescriptor descriptor) { - final _ret = _objc_msgSend_624(_class_NSScriptObjectSpecifier, - _sel_objectSpecifierWithDescriptor_, descriptor.pointer); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, retain: true, release: true); - } - - NSScriptObjectSpecifier initWithContainerSpecifier_key_( - NSScriptObjectSpecifier container, NSString property) { - final _ret = _objc_msgSend_625( - this.pointer, - _sel_initWithContainerSpecifier_key_, - container.pointer, - property.pointer); - return NSScriptObjectSpecifier._(_ret, retain: true, release: true); - } - - NSScriptObjectSpecifier - initWithContainerClassDescription_containerSpecifier_key_( - NSScriptClassDescription classDesc, - NSScriptObjectSpecifier? container, - NSString property) { - final _ret = _objc_msgSend_645( - this.pointer, - _sel_initWithContainerClassDescription_containerSpecifier_key_, - classDesc.pointer, - container?.pointer ?? ffi.nullptr, - property.pointer); - return NSScriptObjectSpecifier._(_ret, retain: true, release: true); - } - - NSScriptObjectSpecifier? initWithCoder_(NSCoder inCoder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, inCoder.pointer); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, retain: true, release: true); - } - - NSScriptObjectSpecifier? get childSpecifier { - final _ret = _objc_msgSend_632(this.pointer, _sel_childSpecifier); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, retain: true, release: true); - } - - set childSpecifier(NSScriptObjectSpecifier? value) { - return _objc_msgSend_633( - this.pointer, _sel_setChildSpecifier_, value?.pointer ?? ffi.nullptr); - } - - NSScriptObjectSpecifier? get containerSpecifier { - final _ret = _objc_msgSend_632(this.pointer, _sel_containerSpecifier); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, retain: true, release: true); - } - - set containerSpecifier(NSScriptObjectSpecifier? value) { - return _objc_msgSend_633(this.pointer, _sel_setContainerSpecifier_, - value?.pointer ?? ffi.nullptr); - } - - bool get containerIsObjectBeingTested { - return _objc_msgSend_12(this.pointer, _sel_containerIsObjectBeingTested); - } - - set containerIsObjectBeingTested(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setContainerIsObjectBeingTested_, value); - } - - bool get containerIsRangeContainerObject { - return _objc_msgSend_12(this.pointer, _sel_containerIsRangeContainerObject); - } - - set containerIsRangeContainerObject(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setContainerIsRangeContainerObject_, value); - } - - NSString get key { - final _ret = _objc_msgSend_21(this.pointer, _sel_key); - return NSString._(_ret, retain: true, release: true); - } - - set key(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setKey_, value.pointer); - } - - NSScriptClassDescription? get containerClassDescription { - final _ret = - _objc_msgSend_628(this.pointer, _sel_containerClassDescription); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, retain: true, release: true); - } - - set containerClassDescription(NSScriptClassDescription? value) { - return _objc_msgSend_647(this.pointer, _sel_setContainerClassDescription_, - value?.pointer ?? ffi.nullptr); - } - - NSScriptClassDescription? get keyClassDescription { - final _ret = _objc_msgSend_628(this.pointer, _sel_keyClassDescription); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, retain: true, release: true); - } - - ffi.Pointer indicesOfObjectsByEvaluatingWithContainer_count_( - NSObject container, ffi.Pointer count) { - return _objc_msgSend_648( - this.pointer, - _sel_indicesOfObjectsByEvaluatingWithContainer_count_, - container.pointer, - count); - } - - NSObject? objectsByEvaluatingWithContainers_(NSObject containers) { - final _ret = _objc_msgSend_16(this.pointer, - _sel_objectsByEvaluatingWithContainers_, containers.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? get objectsByEvaluatingSpecifier { - final _ret = - _objc_msgSend_17(this.pointer, _sel_objectsByEvaluatingSpecifier); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - int get evaluationErrorNumber { - return _objc_msgSend_83(this.pointer, _sel_evaluationErrorNumber); - } - - set evaluationErrorNumber(int value) { - return _objc_msgSend_635( - this.pointer, _sel_setEvaluationErrorNumber_, value); - } - - NSScriptObjectSpecifier? get evaluationErrorSpecifier { - final _ret = _objc_msgSend_632(this.pointer, _sel_evaluationErrorSpecifier); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, retain: true, release: true); - } - - NSAppleEventDescriptor? get descriptor { - final _ret = _objc_msgSend_636(this.pointer, _sel_descriptor); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - @override - NSScriptObjectSpecifier init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSScriptObjectSpecifier._(_ret, retain: true, release: true); - } - - static NSScriptObjectSpecifier new1() { - final _ret = _objc_msgSend_2(_class_NSScriptObjectSpecifier, _sel_new); - return NSScriptObjectSpecifier._(_ret, retain: false, release: true); - } - - static NSScriptObjectSpecifier allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSScriptObjectSpecifier, _sel_allocWithZone_, zone); - return NSScriptObjectSpecifier._(_ret, retain: false, release: true); - } - - static NSScriptObjectSpecifier alloc() { - final _ret = _objc_msgSend_2(_class_NSScriptObjectSpecifier, _sel_alloc); - return NSScriptObjectSpecifier._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSScriptObjectSpecifier, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSScriptObjectSpecifier, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSScriptObjectSpecifier, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSScriptObjectSpecifier, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSScriptObjectSpecifier, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSScriptObjectSpecifier, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSScriptObjectSpecifier, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSScriptObjectSpecifier, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSScriptObjectSpecifier, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSScriptObjectSpecifier = - objc.getClass("NSScriptObjectSpecifier"); - -class NSAppleEventDescriptor extends NSObject { - NSAppleEventDescriptor._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSAppleEventDescriptor] that points to the same underlying object as [other]. - static NSAppleEventDescriptor castFrom( - T other) { - return NSAppleEventDescriptor._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSAppleEventDescriptor] that wraps the given raw object pointer. - static NSAppleEventDescriptor castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSAppleEventDescriptor._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSAppleEventDescriptor]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSAppleEventDescriptor); - } - - static NSAppleEventDescriptor nullDescriptor() { - final _ret = - _objc_msgSend_601(_class_NSAppleEventDescriptor, _sel_nullDescriptor); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor? descriptorWithDescriptorType_bytes_length_( - int descriptorType, ffi.Pointer bytes, int byteCount) { - final _ret = _objc_msgSend_602( - _class_NSAppleEventDescriptor, - _sel_descriptorWithDescriptorType_bytes_length_, - descriptorType, - bytes, - byteCount); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor? descriptorWithDescriptorType_data_( - int descriptorType, NSData? data) { - final _ret = _objc_msgSend_603( - _class_NSAppleEventDescriptor, - _sel_descriptorWithDescriptorType_data_, - descriptorType, - data?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor descriptorWithBoolean_(int boolean) { - final _ret = _objc_msgSend_604( - _class_NSAppleEventDescriptor, _sel_descriptorWithBoolean_, boolean); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor descriptorWithEnumCode_(int enumerator) { - final _ret = _objc_msgSend_605(_class_NSAppleEventDescriptor, - _sel_descriptorWithEnumCode_, enumerator); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor descriptorWithInt32_(int signedInt) { - final _ret = _objc_msgSend_606( - _class_NSAppleEventDescriptor, _sel_descriptorWithInt32_, signedInt); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor descriptorWithDouble_(double doubleValue) { - final _ret = _objc_msgSend_607( - _class_NSAppleEventDescriptor, _sel_descriptorWithDouble_, doubleValue); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor descriptorWithTypeCode_(int typeCode) { - final _ret = _objc_msgSend_605( - _class_NSAppleEventDescriptor, _sel_descriptorWithTypeCode_, typeCode); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor descriptorWithString_(NSString string) { - final _ret = _objc_msgSend_608(_class_NSAppleEventDescriptor, - _sel_descriptorWithString_, string.pointer); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor descriptorWithDate_(NSDate date) { - final _ret = _objc_msgSend_609( - _class_NSAppleEventDescriptor, _sel_descriptorWithDate_, date.pointer); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor descriptorWithFileURL_(NSURL fileURL) { - final _ret = _objc_msgSend_610(_class_NSAppleEventDescriptor, - _sel_descriptorWithFileURL_, fileURL.pointer); - return NSAppleEventDescriptor._(_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_611( - _class_NSAppleEventDescriptor, - _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_, - eventClass, - eventID, - targetDescriptor?.pointer ?? ffi.nullptr, - returnID, - transactionID); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor listDescriptor() { - final _ret = - _objc_msgSend_601(_class_NSAppleEventDescriptor, _sel_listDescriptor); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor recordDescriptor() { - final _ret = - _objc_msgSend_601(_class_NSAppleEventDescriptor, _sel_recordDescriptor); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor currentProcessDescriptor() { - final _ret = _objc_msgSend_601( - _class_NSAppleEventDescriptor, _sel_currentProcessDescriptor); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor descriptorWithProcessIdentifier_( - int processIdentifier) { - final _ret = _objc_msgSend_606(_class_NSAppleEventDescriptor, - _sel_descriptorWithProcessIdentifier_, processIdentifier); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor descriptorWithBundleIdentifier_( - NSString bundleIdentifier) { - final _ret = _objc_msgSend_608(_class_NSAppleEventDescriptor, - _sel_descriptorWithBundleIdentifier_, bundleIdentifier.pointer); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor descriptorWithApplicationURL_( - NSURL applicationURL) { - final _ret = _objc_msgSend_610(_class_NSAppleEventDescriptor, - _sel_descriptorWithApplicationURL_, applicationURL.pointer); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - NSAppleEventDescriptor initWithAEDescNoCopy_(ffi.Pointer aeDesc) { - final _ret = - _objc_msgSend_612(this.pointer, _sel_initWithAEDescNoCopy_, aeDesc); - return NSAppleEventDescriptor._(_ret, retain: false, release: true); - } - - NSAppleEventDescriptor? initWithDescriptorType_bytes_length_( - int descriptorType, ffi.Pointer bytes, int byteCount) { - final _ret = _objc_msgSend_613( - this.pointer, - _sel_initWithDescriptorType_bytes_length_, - descriptorType, - bytes, - byteCount); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - NSAppleEventDescriptor? initWithDescriptorType_data_( - int descriptorType, NSData? data) { - final _ret = _objc_msgSend_614( - this.pointer, - _sel_initWithDescriptorType_data_, - descriptorType, - data?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - NSAppleEventDescriptor - initWithEventClass_eventID_targetDescriptor_returnID_transactionID_( - int eventClass, - int eventID, - NSAppleEventDescriptor? targetDescriptor, - int returnID, - int transactionID) { - final _ret = _objc_msgSend_615( - this.pointer, - _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_, - eventClass, - eventID, - targetDescriptor?.pointer ?? ffi.nullptr, - returnID, - transactionID); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - NSAppleEventDescriptor initListDescriptor() { - final _ret = _objc_msgSend_2(this.pointer, _sel_initListDescriptor); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - NSAppleEventDescriptor initRecordDescriptor() { - final _ret = _objc_msgSend_2(this.pointer, _sel_initRecordDescriptor); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - ffi.Pointer get aeDesc { - return _objc_msgSend_616(this.pointer, _sel_aeDesc); - } - - int get descriptorType { - return _objc_msgSend_214(this.pointer, _sel_descriptorType); - } - - NSData get data { - final _ret = _objc_msgSend_43(this.pointer, _sel_data); - return NSData._(_ret, retain: true, release: true); - } - - int get booleanValue { - return _objc_msgSend_234(this.pointer, _sel_booleanValue); - } - - int get enumCodeValue { - return _objc_msgSend_214(this.pointer, _sel_enumCodeValue); - } - - int get int32Value { - return _objc_msgSend_237(this.pointer, _sel_int32Value); - } - - double get doubleValue { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_doubleValue) - : _objc_msgSend_165(this.pointer, _sel_doubleValue); - } - - int get typeCodeValue { - return _objc_msgSend_214(this.pointer, _sel_typeCodeValue); - } - - NSString? get stringValue { - final _ret = _objc_msgSend_44(this.pointer, _sel_stringValue); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSDate? get dateValue { - final _ret = _objc_msgSend_183(this.pointer, _sel_dateValue); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - NSURL? get fileURLValue { - final _ret = _objc_msgSend_45(this.pointer, _sel_fileURLValue); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - int get eventClass { - return _objc_msgSend_214(this.pointer, _sel_eventClass); - } - - int get eventID { - return _objc_msgSend_214(this.pointer, _sel_eventID); - } - - int get returnID { - return _objc_msgSend_235(this.pointer, _sel_returnID); - } - - int get transactionID { - return _objc_msgSend_237(this.pointer, _sel_transactionID); - } - - void setParamDescriptor_forKeyword_( - NSAppleEventDescriptor descriptor, int keyword) { - _objc_msgSend_617(this.pointer, _sel_setParamDescriptor_forKeyword_, - descriptor.pointer, keyword); - } - - NSAppleEventDescriptor? paramDescriptorForKeyword_(int keyword) { - final _ret = _objc_msgSend_618( - this.pointer, _sel_paramDescriptorForKeyword_, keyword); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - void removeParamDescriptorWithKeyword_(int keyword) { - _objc_msgSend_619( - this.pointer, _sel_removeParamDescriptorWithKeyword_, keyword); - } - - void setAttributeDescriptor_forKeyword_( - NSAppleEventDescriptor descriptor, int keyword) { - _objc_msgSend_617(this.pointer, _sel_setAttributeDescriptor_forKeyword_, - descriptor.pointer, keyword); - } - - NSAppleEventDescriptor? attributeDescriptorForKeyword_(int keyword) { - final _ret = _objc_msgSend_618( - this.pointer, _sel_attributeDescriptorForKeyword_, keyword); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - NSAppleEventDescriptor? sendEventWithOptions_timeout_error_( - int sendOptions, - double timeoutInSeconds, - ffi.Pointer> error) { - final _ret = _objc_msgSend_620( - this.pointer, - _sel_sendEventWithOptions_timeout_error_, - sendOptions, - timeoutInSeconds, - error); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - bool get isRecordDescriptor { - return _objc_msgSend_12(this.pointer, _sel_isRecordDescriptor); - } - - int get numberOfItems { - return _objc_msgSend_83(this.pointer, _sel_numberOfItems); - } - - void insertDescriptor_atIndex_(NSAppleEventDescriptor descriptor, int index) { - _objc_msgSend_621(this.pointer, _sel_insertDescriptor_atIndex_, - descriptor.pointer, index); - } - - NSAppleEventDescriptor? descriptorAtIndex_(int index) { - final _ret = - _objc_msgSend_622(this.pointer, _sel_descriptorAtIndex_, index); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - void removeDescriptorAtIndex_(int index) { - _objc_msgSend_423(this.pointer, _sel_removeDescriptorAtIndex_, index); - } - - void setDescriptor_forKeyword_( - NSAppleEventDescriptor descriptor, int keyword) { - _objc_msgSend_617(this.pointer, _sel_setDescriptor_forKeyword_, - descriptor.pointer, keyword); - } - - NSAppleEventDescriptor? descriptorForKeyword_(int keyword) { - final _ret = - _objc_msgSend_618(this.pointer, _sel_descriptorForKeyword_, keyword); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - void removeDescriptorWithKeyword_(int keyword) { - _objc_msgSend_619(this.pointer, _sel_removeDescriptorWithKeyword_, keyword); - } - - int keywordForDescriptorAtIndex_(int index) { - return _objc_msgSend_623( - this.pointer, _sel_keywordForDescriptorAtIndex_, index); - } - - NSAppleEventDescriptor? coerceToDescriptorType_(int descriptorType) { - final _ret = _objc_msgSend_618( - this.pointer, _sel_coerceToDescriptorType_, descriptorType); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - @override - NSAppleEventDescriptor init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - static NSAppleEventDescriptor new1() { - final _ret = _objc_msgSend_2(_class_NSAppleEventDescriptor, _sel_new); - return NSAppleEventDescriptor._(_ret, retain: false, release: true); - } - - static NSAppleEventDescriptor allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSAppleEventDescriptor, _sel_allocWithZone_, zone); - return NSAppleEventDescriptor._(_ret, retain: false, release: true); - } - - static NSAppleEventDescriptor alloc() { - final _ret = _objc_msgSend_2(_class_NSAppleEventDescriptor, _sel_alloc); - return NSAppleEventDescriptor._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSAppleEventDescriptor, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSAppleEventDescriptor, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSAppleEventDescriptor, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSAppleEventDescriptor, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSAppleEventDescriptor, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSAppleEventDescriptor, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSAppleEventDescriptor, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSAppleEventDescriptor, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSAppleEventDescriptor, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSAppleEventDescriptor = - objc.getClass("NSAppleEventDescriptor"); -late final _sel_nullDescriptor = objc.registerName("nullDescriptor"); -final _objc_msgSend_601 = 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_602 = 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_603 = 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_604 = 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_605 = 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_606 = 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_607 = 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_608 = 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_609 = 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_610 = 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_611 = 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:"); - -@ffi.Packed(2) -final class AEDesc extends ffi.Struct { - @ffi.UnsignedInt() - external int descriptorType; - - external ffi.Pointer> dataHandle; -} - -final class OpaqueAEDataStorageType extends ffi.Opaque {} - -late final _sel_initWithAEDescNoCopy_ = - objc.registerName("initWithAEDescNoCopy:"); -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_initWithDescriptorType_bytes_length_ = - objc.registerName("initWithDescriptorType:bytes:length:"); -final _objc_msgSend_613 = 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_614 = 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_615 = 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_616 = 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"); -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_617 = 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:"); -final _objc_msgSend_618 = 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_619 = 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:"); - -abstract class NSAppleEventSendOptions { - static const int NSAppleEventSendNoReply = 1; - static const int NSAppleEventSendQueueReply = 2; - static const int NSAppleEventSendWaitForReply = 3; - static const int NSAppleEventSendNeverInteract = 16; - static const int NSAppleEventSendCanInteract = 32; - static const int NSAppleEventSendAlwaysInteract = 48; - static const int NSAppleEventSendCanSwitchLayer = 64; - static const int NSAppleEventSendDontRecord = 4096; - static const int NSAppleEventSendDontExecute = 8192; - static const int NSAppleEventSendDontAnnotate = 65536; - static const int NSAppleEventSendDefaultOptions = 35; -} - -late final _sel_sendEventWithOptions_timeout_error_ = - objc.registerName("sendEventWithOptions:timeout:error:"); -final _objc_msgSend_620 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_621 = 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_622 = 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_623 = 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_624 = 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_625 = 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)>(); - -class NSScriptClassDescription extends NSClassDescription { - NSScriptClassDescription._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSScriptClassDescription] that points to the same underlying object as [other]. - static NSScriptClassDescription castFrom( - T other) { - return NSScriptClassDescription._(other.pointer, - retain: true, release: true); - } - - /// Returns a [NSScriptClassDescription] that wraps the given raw object pointer. - static NSScriptClassDescription castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSScriptClassDescription._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSScriptClassDescription]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSScriptClassDescription); - } - - static NSScriptClassDescription? classDescriptionForClass_(NSObject aClass) { - final _ret = _objc_msgSend_626(_class_NSScriptClassDescription, - _sel_classDescriptionForClass_, aClass.pointer); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, retain: true, release: true); - } - - NSScriptClassDescription? initWithSuiteName_className_dictionary_( - NSString suiteName, NSString className, NSDictionary? classDeclaration) { - final _ret = _objc_msgSend_627( - this.pointer, - _sel_initWithSuiteName_className_dictionary_, - suiteName.pointer, - className.pointer, - classDeclaration?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, retain: true, release: true); - } - - NSString? get suiteName { - final _ret = _objc_msgSend_44(this.pointer, _sel_suiteName); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get className { - final _ret = _objc_msgSend_44(this.pointer, _sel_className); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get implementationClassName { - final _ret = _objc_msgSend_44(this.pointer, _sel_implementationClassName); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSScriptClassDescription? get superclassDescription { - final _ret = _objc_msgSend_628(this.pointer, _sel_superclassDescription); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, retain: true, release: true); - } - - int get appleEventCode { - return _objc_msgSend_214(this.pointer, _sel_appleEventCode); - } - - bool matchesAppleEventCode_(int appleEventCode) { - return _objc_msgSend_194( - this.pointer, _sel_matchesAppleEventCode_, appleEventCode); - } - - bool supportsCommand_(NSScriptCommandDescription commandDescription) { - return _objc_msgSend_641( - this.pointer, _sel_supportsCommand_, commandDescription.pointer); - } - - ffi.Pointer selectorForCommand_( - NSScriptCommandDescription commandDescription) { - return _objc_msgSend_642( - this.pointer, _sel_selectorForCommand_, commandDescription.pointer); - } - - NSString? typeForKey_(NSString key) { - final _ret = _objc_msgSend_186(this.pointer, _sel_typeForKey_, key.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSScriptClassDescription? classDescriptionForKey_(NSString key) { - final _ret = _objc_msgSend_643( - this.pointer, _sel_classDescriptionForKey_, key.pointer); - return _ret.address == 0 - ? null - : NSScriptClassDescription._(_ret, retain: true, release: true); - } - - int appleEventCodeForKey_(NSString key) { - return _objc_msgSend_629( - this.pointer, _sel_appleEventCodeForKey_, key.pointer); - } - - NSString? keyWithAppleEventCode_(int appleEventCode) { - final _ret = _objc_msgSend_644( - this.pointer, _sel_keyWithAppleEventCode_, appleEventCode); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get defaultSubcontainerAttributeKey { - final _ret = - _objc_msgSend_44(this.pointer, _sel_defaultSubcontainerAttributeKey); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - bool isLocationRequiredToCreateForKey_(NSString toManyRelationshipKey) { - return _objc_msgSend_64(this.pointer, - _sel_isLocationRequiredToCreateForKey_, toManyRelationshipKey.pointer); - } - - bool hasPropertyForKey_(NSString key) { - return _objc_msgSend_64(this.pointer, _sel_hasPropertyForKey_, key.pointer); - } - - bool hasOrderedToManyRelationshipForKey_(NSString key) { - return _objc_msgSend_64( - this.pointer, _sel_hasOrderedToManyRelationshipForKey_, key.pointer); - } - - bool hasReadablePropertyForKey_(NSString key) { - return _objc_msgSend_64( - this.pointer, _sel_hasReadablePropertyForKey_, key.pointer); - } - - bool hasWritablePropertyForKey_(NSString key) { - return _objc_msgSend_64( - this.pointer, _sel_hasWritablePropertyForKey_, key.pointer); - } - - bool isReadOnlyKey_(NSString key) { - return _objc_msgSend_64(this.pointer, _sel_isReadOnlyKey_, key.pointer); - } - - static void registerClassDescription_forClass_( - NSClassDescription description, NSObject aClass) { - _objc_msgSend_598( - _class_NSScriptClassDescription, - _sel_registerClassDescription_forClass_, - description.pointer, - aClass.pointer); - } - - static void invalidateClassDescriptionCache() { - _objc_msgSend_1( - _class_NSScriptClassDescription, _sel_invalidateClassDescriptionCache); - } - - @override - NSScriptClassDescription init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSScriptClassDescription._(_ret, retain: true, release: true); - } - - static NSScriptClassDescription new1() { - final _ret = _objc_msgSend_2(_class_NSScriptClassDescription, _sel_new); - return NSScriptClassDescription._(_ret, retain: false, release: true); - } - - static NSScriptClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSScriptClassDescription, _sel_allocWithZone_, zone); - return NSScriptClassDescription._(_ret, retain: false, release: true); - } - - static NSScriptClassDescription alloc() { - final _ret = _objc_msgSend_2(_class_NSScriptClassDescription, _sel_alloc); - return NSScriptClassDescription._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSScriptClassDescription, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSScriptClassDescription, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSScriptClassDescription, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSScriptClassDescription, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSScriptClassDescription, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSScriptClassDescription, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSScriptClassDescription, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSScriptClassDescription, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSScriptClassDescription, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSScriptClassDescription = - objc.getClass("NSScriptClassDescription"); -final _objc_msgSend_626 = 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_627 = 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_628 = 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"); -late final _sel_matchesAppleEventCode_ = - objc.registerName("matchesAppleEventCode:"); - -class NSScriptCommandDescription extends NSObject { - NSScriptCommandDescription._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSScriptCommandDescription] that points to the same underlying object as [other]. - static NSScriptCommandDescription castFrom( - T other) { - return NSScriptCommandDescription._(other.pointer, - retain: true, release: true); - } - - /// Returns a [NSScriptCommandDescription] that wraps the given raw object pointer. - static NSScriptCommandDescription castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSScriptCommandDescription._(other, - retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSScriptCommandDescription]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSScriptCommandDescription); - } - - @override - NSObject init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSObject._(_ret, retain: true, release: true); - } - - NSScriptCommandDescription? initWithSuiteName_commandName_dictionary_( - NSString suiteName, - NSString commandName, - NSDictionary? commandDeclaration) { - final _ret = _objc_msgSend_627( - this.pointer, - _sel_initWithSuiteName_commandName_dictionary_, - suiteName.pointer, - commandName.pointer, - commandDeclaration?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSScriptCommandDescription._(_ret, retain: true, release: true); - } - - NSScriptCommandDescription? initWithCoder_(NSCoder inCoder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, inCoder.pointer); - return _ret.address == 0 - ? null - : NSScriptCommandDescription._(_ret, retain: true, release: true); - } - - NSString get suiteName { - final _ret = _objc_msgSend_21(this.pointer, _sel_suiteName); - return NSString._(_ret, retain: true, release: true); - } - - NSString get commandName { - final _ret = _objc_msgSend_21(this.pointer, _sel_commandName); - return NSString._(_ret, retain: true, release: true); - } - - int get appleEventClassCode { - return _objc_msgSend_214(this.pointer, _sel_appleEventClassCode); - } - - int get appleEventCode { - return _objc_msgSend_214(this.pointer, _sel_appleEventCode); - } - - NSString get commandClassName { - final _ret = _objc_msgSend_21(this.pointer, _sel_commandClassName); - return NSString._(_ret, retain: true, release: true); - } - - NSString? get returnType { - final _ret = _objc_msgSend_44(this.pointer, _sel_returnType); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - int get appleEventCodeForReturnType { - return _objc_msgSend_214(this.pointer, _sel_appleEventCodeForReturnType); - } - - NSArray get argumentNames { - final _ret = _objc_msgSend_85(this.pointer, _sel_argumentNames); - return NSArray._(_ret, retain: true, release: true); - } - - NSString? typeForArgumentWithName_(NSString argumentName) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_typeForArgumentWithName_, argumentName.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - int appleEventCodeForArgumentWithName_(NSString argumentName) { - return _objc_msgSend_629(this.pointer, - _sel_appleEventCodeForArgumentWithName_, argumentName.pointer); - } - - bool isOptionalArgumentWithName_(NSString argumentName) { - return _objc_msgSend_64( - this.pointer, _sel_isOptionalArgumentWithName_, argumentName.pointer); - } - - NSScriptCommand createCommandInstance() { - final _ret = _objc_msgSend_639(this.pointer, _sel_createCommandInstance); - return NSScriptCommand._(_ret, retain: true, release: true); - } - - NSScriptCommand createCommandInstanceWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_640( - this.pointer, _sel_createCommandInstanceWithZone_, zone); - return NSScriptCommand._(_ret, retain: true, release: true); - } - - static NSScriptCommandDescription new1() { - final _ret = _objc_msgSend_2(_class_NSScriptCommandDescription, _sel_new); - return NSScriptCommandDescription._(_ret, retain: false, release: true); - } - - static NSScriptCommandDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSScriptCommandDescription, _sel_allocWithZone_, zone); - return NSScriptCommandDescription._(_ret, retain: false, release: true); - } - - static NSScriptCommandDescription alloc() { - final _ret = _objc_msgSend_2(_class_NSScriptCommandDescription, _sel_alloc); - return NSScriptCommandDescription._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSScriptCommandDescription, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSScriptCommandDescription, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12(_class_NSScriptCommandDescription, - _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSScriptCommandDescription, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSScriptCommandDescription, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSScriptCommandDescription, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSScriptCommandDescription, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSScriptCommandDescription, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSScriptCommandDescription, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -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_629 = 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:"); - -class NSScriptCommand extends NSObject { - NSScriptCommand._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSScriptCommand] that points to the same underlying object as [other]. - static NSScriptCommand castFrom(T other) { - return NSScriptCommand._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSScriptCommand] that wraps the given raw object pointer. - static NSScriptCommand castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSScriptCommand._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSScriptCommand]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSScriptCommand); - } - - NSScriptCommand initWithCommandDescription_( - NSScriptCommandDescription commandDef) { - final _ret = _objc_msgSend_630( - this.pointer, _sel_initWithCommandDescription_, commandDef.pointer); - return NSScriptCommand._(_ret, retain: true, release: true); - } - - NSScriptCommand? initWithCoder_(NSCoder inCoder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, inCoder.pointer); - return _ret.address == 0 - ? null - : NSScriptCommand._(_ret, retain: true, release: true); - } - - NSScriptCommandDescription get commandDescription { - final _ret = _objc_msgSend_631(this.pointer, _sel_commandDescription); - return NSScriptCommandDescription._(_ret, retain: true, release: true); - } - - NSObject? get directParameter { - final _ret = _objc_msgSend_17(this.pointer, _sel_directParameter); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set directParameter(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDirectParameter_, value?.pointer ?? ffi.nullptr); - } - - NSScriptObjectSpecifier? get receiversSpecifier { - final _ret = _objc_msgSend_632(this.pointer, _sel_receiversSpecifier); - return _ret.address == 0 - ? null - : NSScriptObjectSpecifier._(_ret, retain: true, release: true); - } - - set receiversSpecifier(NSScriptObjectSpecifier? value) { - return _objc_msgSend_633(this.pointer, _sel_setReceiversSpecifier_, - value?.pointer ?? ffi.nullptr); - } - - NSObject? get evaluatedReceivers { - final _ret = _objc_msgSend_17(this.pointer, _sel_evaluatedReceivers); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSDictionary? get arguments { - final _ret = _objc_msgSend_390(this.pointer, _sel_arguments); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - set arguments(NSDictionary? value) { - return _objc_msgSend_634( - this.pointer, _sel_setArguments_, value?.pointer ?? ffi.nullptr); - } - - NSDictionary? get evaluatedArguments { - final _ret = _objc_msgSend_390(this.pointer, _sel_evaluatedArguments); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - bool get wellFormed { - return _objc_msgSend_12(this.pointer, _sel_isWellFormed); - } - - NSObject? performDefaultImplementation() { - final _ret = - _objc_msgSend_17(this.pointer, _sel_performDefaultImplementation); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? executeCommand() { - final _ret = _objc_msgSend_17(this.pointer, _sel_executeCommand); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - int get scriptErrorNumber { - return _objc_msgSend_83(this.pointer, _sel_scriptErrorNumber); - } - - set scriptErrorNumber(int value) { - return _objc_msgSend_635(this.pointer, _sel_setScriptErrorNumber_, value); - } - - NSAppleEventDescriptor? get scriptErrorOffendingObjectDescriptor { - final _ret = _objc_msgSend_636( - this.pointer, _sel_scriptErrorOffendingObjectDescriptor); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - set scriptErrorOffendingObjectDescriptor(NSAppleEventDescriptor? value) { - return _objc_msgSend_637( - this.pointer, - _sel_setScriptErrorOffendingObjectDescriptor_, - value?.pointer ?? ffi.nullptr); - } - - NSAppleEventDescriptor? get scriptErrorExpectedTypeDescriptor { - final _ret = - _objc_msgSend_636(this.pointer, _sel_scriptErrorExpectedTypeDescriptor); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - set scriptErrorExpectedTypeDescriptor(NSAppleEventDescriptor? value) { - return _objc_msgSend_637( - this.pointer, - _sel_setScriptErrorExpectedTypeDescriptor_, - value?.pointer ?? ffi.nullptr); - } - - NSString? get scriptErrorString { - final _ret = _objc_msgSend_44(this.pointer, _sel_scriptErrorString); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set scriptErrorString(NSString? value) { - return _objc_msgSend_545(this.pointer, _sel_setScriptErrorString_, - value?.pointer ?? ffi.nullptr); - } - - static NSScriptCommand? currentCommand() { - final _ret = _objc_msgSend_638(_class_NSScriptCommand, _sel_currentCommand); - return _ret.address == 0 - ? null - : NSScriptCommand._(_ret, retain: true, release: true); - } - - NSAppleEventDescriptor? get appleEvent { - final _ret = _objc_msgSend_636(this.pointer, _sel_appleEvent); - return _ret.address == 0 - ? null - : NSAppleEventDescriptor._(_ret, retain: true, release: true); - } - - void suspendExecution() { - _objc_msgSend_1(this.pointer, _sel_suspendExecution); - } - - void resumeExecutionWithResult_(NSObject? result) { - _objc_msgSend_289(this.pointer, _sel_resumeExecutionWithResult_, - result?.pointer ?? ffi.nullptr); - } - - @override - NSScriptCommand init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSScriptCommand._(_ret, retain: true, release: true); - } - - static NSScriptCommand new1() { - final _ret = _objc_msgSend_2(_class_NSScriptCommand, _sel_new); - return NSScriptCommand._(_ret, retain: false, release: true); - } - - static NSScriptCommand allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSScriptCommand, _sel_allocWithZone_, zone); - return NSScriptCommand._(_ret, retain: false, release: true); - } - - static NSScriptCommand alloc() { - final _ret = _objc_msgSend_2(_class_NSScriptCommand, _sel_alloc); - return NSScriptCommand._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSScriptCommand, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSScriptCommand, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSScriptCommand, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSScriptCommand, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSScriptCommand, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSScriptCommand, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSScriptCommand, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSScriptCommand, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSScriptCommand, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSScriptCommand = objc.getClass("NSScriptCommand"); -late final _sel_initWithCommandDescription_ = - objc.registerName("initWithCommandDescription:"); -final _objc_msgSend_630 = 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_631 = 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:"); -late final _sel_receiversSpecifier = objc.registerName("receiversSpecifier"); -final _objc_msgSend_632 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setReceiversSpecifier_ = - objc.registerName("setReceiversSpecifier:"); -final _objc_msgSend_633 = 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_evaluatedReceivers = objc.registerName("evaluatedReceivers"); -late final _sel_arguments = objc.registerName("arguments"); -late final _sel_setArguments_ = objc.registerName("setArguments:"); -final _objc_msgSend_634 = 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_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:"); -final _objc_msgSend_635 = 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_scriptErrorOffendingObjectDescriptor = - objc.registerName("scriptErrorOffendingObjectDescriptor"); -final _objc_msgSend_636 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setScriptErrorOffendingObjectDescriptor_ = - objc.registerName("setScriptErrorOffendingObjectDescriptor:"); -final _objc_msgSend_637 = 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_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_638 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer 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_639 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_createCommandInstanceWithZone_ = - objc.registerName("createCommandInstanceWithZone:"); -final _objc_msgSend_640 = 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_641 = 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_selectorForCommand_ = objc.registerName("selectorForCommand:"); -final _objc_msgSend_642 = 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:"); -final _objc_msgSend_643 = 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_appleEventCodeForKey_ = - objc.registerName("appleEventCodeForKey:"); -late final _sel_keyWithAppleEventCode_ = - objc.registerName("keyWithAppleEventCode:"); -final _objc_msgSend_644 = 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_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:"); -late final _sel_initWithContainerClassDescription_containerSpecifier_key_ = objc - .registerName("initWithContainerClassDescription:containerSpecifier:key:"); -final _objc_msgSend_645 = 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"); -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:"); -final _objc_msgSend_646 = 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_containerClassDescription = - objc.registerName("containerClassDescription"); -late final _sel_setContainerClassDescription_ = - objc.registerName("setContainerClassDescription:"); -final _objc_msgSend_647 = 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_648 = 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"); -late final _sel_scriptingValueForSpecifier_ = - objc.registerName("scriptingValueForSpecifier:"); -final _objc_msgSend_649 = 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_scriptingProperties = objc.registerName("scriptingProperties"); -late final _sel_setScriptingProperties_ = - objc.registerName("setScriptingProperties:"); -late final _sel_copyScriptingValue_forKey_withProperties_ = - objc.registerName("copyScriptingValue:forKey:withProperties:"); -final _objc_msgSend_650 = 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_newScriptingObjectOfClass_forValueForKey_withContentsValue_properties_ = - objc.registerName( - "newScriptingObjectOfClass:forValueForKey:withContentsValue:properties:"); -final _objc_msgSend_651 = 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_classCode = objc.registerName("classCode"); -late final _sel_valueAtIndex_inPropertyWithKey_ = - objc.registerName("valueAtIndex:inPropertyWithKey:"); -final _objc_msgSend_652 = 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_valueWithName_inPropertyWithKey_ = - objc.registerName("valueWithName:inPropertyWithKey:"); -late final _sel_valueWithUniqueID_inPropertyWithKey_ = - objc.registerName("valueWithUniqueID:inPropertyWithKey:"); -late final _sel_insertValue_atIndex_inPropertyWithKey_ = - objc.registerName("insertValue:atIndex:inPropertyWithKey:"); -final _objc_msgSend_653 = 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_removeValueAtIndex_fromPropertyWithKey_ = - objc.registerName("removeValueAtIndex:fromPropertyWithKey:"); -final _objc_msgSend_654 = 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_replaceValueAtIndex_inPropertyWithKey_withValue_ = - objc.registerName("replaceValueAtIndex:inPropertyWithKey:withValue:"); -final _objc_msgSend_655 = 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_insertValue_inPropertyWithKey_ = - objc.registerName("insertValue:inPropertyWithKey:"); -final _objc_msgSend_656 = 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_coerceValue_forKey_ = objc.registerName("coerceValue:forKey:"); -final _objc_msgSend_657 = 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_objectSpecifier = objc.registerName("objectSpecifier"); -late final _sel_indicesOfObjectsByEvaluatingObjectSpecifier_ = - objc.registerName("indicesOfObjectsByEvaluatingObjectSpecifier:"); -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_isEqualTo_ = objc.registerName("isEqualTo:"); -late final _sel_isLessThanOrEqualTo_ = - objc.registerName("isLessThanOrEqualTo:"); -late final _sel_isLessThan_ = objc.registerName("isLessThan:"); -late final _sel_isGreaterThanOrEqualTo_ = - objc.registerName("isGreaterThanOrEqualTo:"); -late final _sel_isGreaterThan_ = objc.registerName("isGreaterThan:"); -late final _sel_isNotEqualTo_ = objc.registerName("isNotEqualTo:"); -late final _sel_doesContain_ = objc.registerName("doesContain:"); -late final _sel_isLike_ = objc.registerName("isLike:"); -late final _sel_isCaseInsensitiveLike_ = - objc.registerName("isCaseInsensitiveLike:"); -late final _sel_scriptingIsEqualTo_ = objc.registerName("scriptingIsEqualTo:"); -late final _sel_scriptingIsLessThanOrEqualTo_ = - objc.registerName("scriptingIsLessThanOrEqualTo:"); -late final _sel_scriptingIsLessThan_ = - objc.registerName("scriptingIsLessThan:"); -late final _sel_scriptingIsGreaterThanOrEqualTo_ = - objc.registerName("scriptingIsGreaterThanOrEqualTo:"); -late final _sel_scriptingIsGreaterThan_ = - objc.registerName("scriptingIsGreaterThan:"); -late final _sel_scriptingBeginsWith_ = - objc.registerName("scriptingBeginsWith:"); -late final _sel_scriptingEndsWith_ = objc.registerName("scriptingEndsWith:"); -late final _sel_scriptingContains_ = objc.registerName("scriptingContains:"); - -class NSItemProvider extends NSObject { - NSItemProvider._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSItemProvider] that points to the same underlying object as [other]. - static NSItemProvider castFrom(T other) { - return NSItemProvider._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSItemProvider] that wraps the given raw object pointer. - static NSItemProvider castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSItemProvider._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSItemProvider]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSItemProvider); - } - - @override - NSItemProvider init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSItemProvider._(_ret, retain: true, release: true); - } - - void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( - NSString typeIdentifier, - int visibility, - ObjCBlock_NSProgress_ffiVoidNSDataNSError loadHandler) { - _objc_msgSend_673( - this.pointer, - _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_, - typeIdentifier.pointer, - visibility, - loadHandler.pointer); - } - - void - registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_( - NSString typeIdentifier, - int fileOptions, - int visibility, - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError loadHandler) { - _objc_msgSend_674( - this.pointer, - _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_, - typeIdentifier.pointer, - fileOptions, - visibility, - loadHandler.pointer); - } - - NSArray get registeredTypeIdentifiers { - final _ret = _objc_msgSend_85(this.pointer, _sel_registeredTypeIdentifiers); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { - final _ret = _objc_msgSend_675(this.pointer, - _sel_registeredTypeIdentifiersWithFileOptions_, fileOptions); - return NSArray._(_ret, retain: true, release: true); - } - - bool hasItemConformingToTypeIdentifier_(NSString typeIdentifier) { - return _objc_msgSend_64(this.pointer, - _sel_hasItemConformingToTypeIdentifier_, typeIdentifier.pointer); - } - - bool hasRepresentationConformingToTypeIdentifier_fileOptions_( - NSString typeIdentifier, int fileOptions) { - return _objc_msgSend_676( - this.pointer, - _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_, - typeIdentifier.pointer, - fileOptions); - } - - NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_NSData_NSError completionHandler) { - final _ret = _objc_msgSend_677( - this.pointer, - _sel_loadDataRepresentationForTypeIdentifier_completionHandler_, - typeIdentifier.pointer, - completionHandler.pointer); - return NSProgress._(_ret, retain: true, release: true); - } - - NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_NSURL_NSError completionHandler) { - final _ret = _objc_msgSend_678( - this.pointer, - _sel_loadFileRepresentationForTypeIdentifier_completionHandler_, - typeIdentifier.pointer, - completionHandler.pointer); - return NSProgress._(_ret, retain: true, release: true); - } - - NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_NSURL_bool_NSError completionHandler) { - final _ret = _objc_msgSend_679( - this.pointer, - _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_, - typeIdentifier.pointer, - completionHandler.pointer); - return NSProgress._(_ret, retain: true, release: true); - } - - NSString? get suggestedName { - final _ret = _objc_msgSend_44(this.pointer, _sel_suggestedName); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set suggestedName(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setSuggestedName_, value?.pointer ?? ffi.nullptr); - } - - NSItemProvider initWithObject_(NSObject object) { - final _ret = - _objc_msgSend_124(this.pointer, _sel_initWithObject_, object.pointer); - return NSItemProvider._(_ret, retain: true, release: true); - } - - void registerObject_visibility_(NSObject object, int visibility) { - _objc_msgSend_680(this.pointer, _sel_registerObject_visibility_, - object.pointer, visibility); - } - - void registerObjectOfClass_visibility_loadHandler_( - NSObject aClass, - int visibility, - ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError loadHandler) { - _objc_msgSend_681( - this.pointer, - _sel_registerObjectOfClass_visibility_loadHandler_, - aClass.pointer, - visibility, - loadHandler.pointer); - } - - bool canLoadObjectOfClass_(NSObject aClass) { - return _objc_msgSend_0( - this.pointer, _sel_canLoadObjectOfClass_, aClass.pointer); - } - - NSProgress loadObjectOfClass_completionHandler_(NSObject aClass, - ObjCBlock_ffiVoid_objcObjCObject_NSError completionHandler) { - final _ret = _objc_msgSend_682( - this.pointer, - _sel_loadObjectOfClass_completionHandler_, - aClass.pointer, - completionHandler.pointer); - return NSProgress._(_ret, retain: true, release: true); - } - - NSItemProvider initWithItem_typeIdentifier_( - NSObject? item, NSString? typeIdentifier) { - final _ret = _objc_msgSend_683( - this.pointer, - _sel_initWithItem_typeIdentifier_, - item?.pointer ?? ffi.nullptr, - typeIdentifier?.pointer ?? ffi.nullptr); - return NSItemProvider._(_ret, retain: true, release: true); - } - - NSItemProvider? initWithContentsOfURL_(NSURL fileURL) { - final _ret = _objc_msgSend_277( - this.pointer, _sel_initWithContentsOfURL_, fileURL.pointer); - return _ret.address == 0 - ? null - : NSItemProvider._(_ret, retain: true, release: true); - } - - void registerItemForTypeIdentifier_loadHandler_( - NSString typeIdentifier, - ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary - loadHandler) { - _objc_msgSend_684( - this.pointer, - _sel_registerItemForTypeIdentifier_loadHandler_, - typeIdentifier.pointer, - loadHandler.pointer); - } - - void loadItemForTypeIdentifier_options_completionHandler_( - NSString typeIdentifier, - NSDictionary? options, - ObjCBlock_ffiVoid_objcObjCObject_NSError1? completionHandler) { - _objc_msgSend_685( - this.pointer, - _sel_loadItemForTypeIdentifier_options_completionHandler_, - typeIdentifier.pointer, - options?.pointer ?? ffi.nullptr, - completionHandler?.pointer ?? ffi.nullptr); - } - - ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary? - get previewImageHandler { - final _ret = _objc_msgSend_686(this.pointer, _sel_previewImageHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary - ._(_ret, retain: true, release: true); - } - - set previewImageHandler( - ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary? - value) { - return _objc_msgSend_687(this.pointer, _sel_setPreviewImageHandler_, - value?.pointer ?? ffi.nullptr); - } - - void loadPreviewImageWithOptions_completionHandler_(NSDictionary options, - ObjCBlock_ffiVoid_objcObjCObject_NSError1 completionHandler) { - _objc_msgSend_688( - this.pointer, - _sel_loadPreviewImageWithOptions_completionHandler_, - options.pointer, - completionHandler.pointer); - } - - static NSItemProvider new1() { - final _ret = _objc_msgSend_2(_class_NSItemProvider, _sel_new); - return NSItemProvider._(_ret, retain: false, release: true); - } - - static NSItemProvider allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSItemProvider, _sel_allocWithZone_, zone); - return NSItemProvider._(_ret, retain: false, release: true); - } - - static NSItemProvider alloc() { - final _ret = _objc_msgSend_2(_class_NSItemProvider, _sel_alloc); - return NSItemProvider._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSItemProvider, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSItemProvider, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSItemProvider, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSItemProvider, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSItemProvider, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSItemProvider, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSItemProvider, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSItemProvider, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSItemProvider, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSItemProvider = objc.getClass("NSItemProvider"); - -abstract class NSItemProviderRepresentationVisibility { - static const int NSItemProviderRepresentationVisibilityAll = 0; - static const int NSItemProviderRepresentationVisibilityTeam = 1; - static const int NSItemProviderRepresentationVisibilityGroup = 2; - static const int NSItemProviderRepresentationVisibilityOwnProcess = 3; -} - -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_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); -final _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry = - Function(ffi.Pointer)>{}; -int _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure( - ffi.Pointer Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex; - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0) => - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[ - block.ref.target.address]!(arg0); - -class ObjCBlock_NSProgress_ffiVoidNSDataNSError extends objc.ObjCBlockBase { - ObjCBlock_NSProgress_ffiVoidNSDataNSError._( - 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_NSProgress_ffiVoidNSDataNSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_NSProgress_ffiVoidNSDataNSError._(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_NSProgress_ffiVoidNSDataNSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_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_NSProgress_ffiVoidNSDataNSError.fromFunction( - NSProgress? Function(ObjCBlock_ffiVoid_NSData_NSError) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline) - .cast(), - _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure( - (ffi.Pointer arg0) => - fn(ObjCBlock_ffiVoid_NSData_NSError._(arg0, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr))); - static ffi.Pointer? _dartFuncTrampoline; - - NSProgress? call(ObjCBlock_ffiVoid_NSData_NSError 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 - : NSProgress._( - 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); -} - -class NSProgress extends NSObject { - NSProgress._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSProgress] that points to the same underlying object as [other]. - static NSProgress castFrom(T other) { - return NSProgress._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSProgress] that wraps the given raw object pointer. - static NSProgress castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProgress._(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); - } - - static NSProgress? currentProgress() { - final _ret = _objc_msgSend_659(_class_NSProgress, _sel_currentProgress); - return _ret.address == 0 - ? null - : NSProgress._(_ret, retain: true, release: true); - } - - static NSProgress progressWithTotalUnitCount_(int unitCount) { - final _ret = _objc_msgSend_660( - _class_NSProgress, _sel_progressWithTotalUnitCount_, unitCount); - return NSProgress._(_ret, retain: true, release: true); - } - - static NSProgress discreteProgressWithTotalUnitCount_(int unitCount) { - final _ret = _objc_msgSend_660( - _class_NSProgress, _sel_discreteProgressWithTotalUnitCount_, unitCount); - return NSProgress._(_ret, retain: true, release: true); - } - - static NSProgress progressWithTotalUnitCount_parent_pendingUnitCount_( - int unitCount, NSProgress parent, int portionOfParentTotalUnitCount) { - final _ret = _objc_msgSend_661( - _class_NSProgress, - _sel_progressWithTotalUnitCount_parent_pendingUnitCount_, - unitCount, - parent.pointer, - portionOfParentTotalUnitCount); - return NSProgress._(_ret, retain: true, release: true); - } - - NSProgress initWithParent_userInfo_( - NSProgress? parentProgressOrNil, NSObject? userInfoOrNil) { - final _ret = _objc_msgSend_662( - this.pointer, - _sel_initWithParent_userInfo_, - parentProgressOrNil?.pointer ?? ffi.nullptr, - userInfoOrNil?.pointer ?? ffi.nullptr); - return NSProgress._(_ret, retain: true, release: true); - } - - void becomeCurrentWithPendingUnitCount_(int unitCount) { - _objc_msgSend_663( - this.pointer, _sel_becomeCurrentWithPendingUnitCount_, unitCount); - } - - void performAsCurrentWithPendingUnitCount_usingBlock_( - int unitCount, ObjCBlock_ffiVoid work) { - _objc_msgSend_664( - this.pointer, - _sel_performAsCurrentWithPendingUnitCount_usingBlock_, - unitCount, - work.pointer); - } - - void resignCurrent() { - _objc_msgSend_1(this.pointer, _sel_resignCurrent); - } - - void addChild_withPendingUnitCount_(NSProgress child, int inUnitCount) { - _objc_msgSend_665(this.pointer, _sel_addChild_withPendingUnitCount_, - child.pointer, inUnitCount); - } - - int get totalUnitCount { - return _objc_msgSend_666(this.pointer, _sel_totalUnitCount); - } - - set totalUnitCount(int value) { - return _objc_msgSend_667(this.pointer, _sel_setTotalUnitCount_, value); - } - - int get completedUnitCount { - return _objc_msgSend_666(this.pointer, _sel_completedUnitCount); - } - - set completedUnitCount(int value) { - return _objc_msgSend_667(this.pointer, _sel_setCompletedUnitCount_, value); - } - - NSString get localizedDescription { - final _ret = _objc_msgSend_21(this.pointer, _sel_localizedDescription); - return NSString._(_ret, retain: true, release: true); - } - - set localizedDescription(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setLocalizedDescription_, value.pointer); - } - - NSString get localizedAdditionalDescription { - final _ret = - _objc_msgSend_21(this.pointer, _sel_localizedAdditionalDescription); - return NSString._(_ret, retain: true, release: true); - } - - set localizedAdditionalDescription(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setLocalizedAdditionalDescription_, value.pointer); - } - - bool get cancellable { - return _objc_msgSend_12(this.pointer, _sel_isCancellable); - } - - set cancellable(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setCancellable_, value); - } - - bool get pausable { - return _objc_msgSend_12(this.pointer, _sel_isPausable); - } - - set pausable(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setPausable_, value); - } - - bool get cancelled { - return _objc_msgSend_12(this.pointer, _sel_isCancelled); - } - - bool get paused { - return _objc_msgSend_12(this.pointer, _sel_isPaused); - } - - ObjCBlock_ffiVoid? get cancellationHandler { - final _ret = _objc_msgSend_668(this.pointer, _sel_cancellationHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid._(_ret, retain: true, release: true); - } - - set cancellationHandler(ObjCBlock_ffiVoid? value) { - return _objc_msgSend_669(this.pointer, _sel_setCancellationHandler_, - value?.pointer ?? ffi.nullptr); - } - - ObjCBlock_ffiVoid? get pausingHandler { - final _ret = _objc_msgSend_668(this.pointer, _sel_pausingHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid._(_ret, retain: true, release: true); - } - - set pausingHandler(ObjCBlock_ffiVoid? value) { - return _objc_msgSend_669( - this.pointer, _sel_setPausingHandler_, value?.pointer ?? ffi.nullptr); - } - - ObjCBlock_ffiVoid? get resumingHandler { - final _ret = _objc_msgSend_668(this.pointer, _sel_resumingHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid._(_ret, retain: true, release: true); - } - - set resumingHandler(ObjCBlock_ffiVoid? value) { - return _objc_msgSend_669( - this.pointer, _sel_setResumingHandler_, value?.pointer ?? ffi.nullptr); - } - - void setUserInfoObject_forKey_(NSObject? objectOrNil, NSString key) { - _objc_msgSend_135(this.pointer, _sel_setUserInfoObject_forKey_, - objectOrNil?.pointer ?? ffi.nullptr, key.pointer); - } - - bool get indeterminate { - return _objc_msgSend_12(this.pointer, _sel_isIndeterminate); - } - - double get fractionCompleted { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_fractionCompleted) - : _objc_msgSend_165(this.pointer, _sel_fractionCompleted); - } - - bool get finished { - return _objc_msgSend_12(this.pointer, _sel_isFinished); - } - - void cancel() { - _objc_msgSend_1(this.pointer, _sel_cancel); - } - - void pause() { - _objc_msgSend_1(this.pointer, _sel_pause); - } - - void resume() { - _objc_msgSend_1(this.pointer, _sel_resume); - } - - NSObject get userInfo { - final _ret = _objc_msgSend_2(this.pointer, _sel_userInfo); - return NSObject._(_ret, retain: true, release: true); - } - - NSString? get kind { - final _ret = _objc_msgSend_44(this.pointer, _sel_kind); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set kind(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setKind_, value?.pointer ?? ffi.nullptr); - } - - NSNumber? get estimatedTimeRemaining { - final _ret = _objc_msgSend_215(this.pointer, _sel_estimatedTimeRemaining); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); - } - - set estimatedTimeRemaining(NSNumber? value) { - return _objc_msgSend_670(this.pointer, _sel_setEstimatedTimeRemaining_, - value?.pointer ?? ffi.nullptr); - } - - NSNumber? get throughput { - final _ret = _objc_msgSend_215(this.pointer, _sel_throughput); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); - } - - set throughput(NSNumber? value) { - return _objc_msgSend_670( - this.pointer, _sel_setThroughput_, value?.pointer ?? ffi.nullptr); - } - - NSString? get fileOperationKind { - final _ret = _objc_msgSend_44(this.pointer, _sel_fileOperationKind); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set fileOperationKind(NSString? value) { - return _objc_msgSend_545(this.pointer, _sel_setFileOperationKind_, - value?.pointer ?? ffi.nullptr); - } - - NSURL? get fileURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_fileURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - set fileURL(NSURL? value) { - return _objc_msgSend_671( - this.pointer, _sel_setFileURL_, value?.pointer ?? ffi.nullptr); - } - - NSNumber? get fileTotalCount { - final _ret = _objc_msgSend_215(this.pointer, _sel_fileTotalCount); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); - } - - set fileTotalCount(NSNumber? value) { - return _objc_msgSend_670( - this.pointer, _sel_setFileTotalCount_, value?.pointer ?? ffi.nullptr); - } - - NSNumber? get fileCompletedCount { - final _ret = _objc_msgSend_215(this.pointer, _sel_fileCompletedCount); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); - } - - set fileCompletedCount(NSNumber? value) { - return _objc_msgSend_670(this.pointer, _sel_setFileCompletedCount_, - value?.pointer ?? ffi.nullptr); - } - - void publish() { - _objc_msgSend_1(this.pointer, _sel_publish); - } - - void unpublish() { - _objc_msgSend_1(this.pointer, _sel_unpublish); - } - - static NSObject addSubscriberForFileURL_withPublishingHandler_( - NSURL url, ObjCBlock_ffiVoid_NSProgress publishingHandler) { - final _ret = _objc_msgSend_672( - _class_NSProgress, - _sel_addSubscriberForFileURL_withPublishingHandler_, - url.pointer, - publishingHandler.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - static void removeSubscriber_(NSObject subscriber) { - _objc_msgSend_15( - _class_NSProgress, _sel_removeSubscriber_, subscriber.pointer); - } - - bool get old { - return _objc_msgSend_12(this.pointer, _sel_isOld); - } - - @override - NSProgress init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSProgress._(_ret, retain: true, release: true); - } - - static NSProgress new1() { - final _ret = _objc_msgSend_2(_class_NSProgress, _sel_new); - return NSProgress._(_ret, retain: false, release: true); - } - - static NSProgress allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSProgress, _sel_allocWithZone_, zone); - return NSProgress._(_ret, retain: false, release: true); - } - - static NSProgress alloc() { - final _ret = _objc_msgSend_2(_class_NSProgress, _sel_alloc); - return NSProgress._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSProgress, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSProgress, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSProgress, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSProgress, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSProgress, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSProgress, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSProgress, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSProgress, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSProgress, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSProgress = objc.getClass("NSProgress"); -late final _sel_currentProgress = objc.registerName("currentProgress"); -final _objc_msgSend_659 = 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_660 = 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_661 = 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)>(); -late final _sel_initWithParent_userInfo_ = - objc.registerName("initWithParent:userInfo:"); -final _objc_msgSend_662 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_becomeCurrentWithPendingUnitCount_ = - objc.registerName("becomeCurrentWithPendingUnitCount:"); -final _objc_msgSend_663 = 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_performAsCurrentWithPendingUnitCount_usingBlock_ = - objc.registerName("performAsCurrentWithPendingUnitCount:usingBlock:"); -final _objc_msgSend_664 = 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"); -late final _sel_addChild_withPendingUnitCount_ = - objc.registerName("addChild:withPendingUnitCount:"); -final _objc_msgSend_665 = 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_666 = 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_667 = 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_setLocalizedDescription_ = - objc.registerName("setLocalizedDescription:"); -late final _sel_localizedAdditionalDescription = - objc.registerName("localizedAdditionalDescription"); -late final _sel_setLocalizedAdditionalDescription_ = - objc.registerName("setLocalizedAdditionalDescription:"); -late final _sel_isCancellable = objc.registerName("isCancellable"); -late final _sel_setCancellable_ = objc.registerName("setCancellable:"); -late final _sel_isPausable = objc.registerName("isPausable"); -late final _sel_setPausable_ = objc.registerName("setPausable:"); -late final _sel_isPaused = objc.registerName("isPaused"); -late final _sel_cancellationHandler = objc.registerName("cancellationHandler"); -final _objc_msgSend_668 = 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_669 = 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:"); -late final _sel_isIndeterminate = objc.registerName("isIndeterminate"); -late final _sel_fractionCompleted = objc.registerName("fractionCompleted"); -late final _sel_pause = objc.registerName("pause"); -late final _sel_resume = objc.registerName("resume"); -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:"); -final _objc_msgSend_670 = 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"); -late final _sel_setFileURL_ = objc.registerName("setFileURL:"); -final _objc_msgSend_671 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_fileTotalCount = objc.registerName("fileTotalCount"); -late final _sel_setFileTotalCount_ = objc.registerName("setFileTotalCount:"); -late final _sel_fileCompletedCount = objc.registerName("fileCompletedCount"); -late final _sel_setFileCompletedCount_ = - objc.registerName("setFileCompletedCount:"); -late final _sel_publish = objc.registerName("publish"); -late final _sel_unpublish = objc.registerName("unpublish"); -ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer)>()(arg0); -final _ObjCBlock_ffiVoid_NSProgress_closureRegistry = - Function(ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSProgress_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_registerClosure( - ffi.Pointer Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSProgress_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSProgress_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer _ObjCBlock_ffiVoid_NSProgress_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSProgress_closureRegistry[block.ref.target.address]!( - arg0); - -class ObjCBlock_ffiVoid_NSProgress extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSProgress._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSProgress castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSProgress._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSProgress.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSProgress_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSProgress.fromFunction( - ObjCBlock_ffiVoid? Function(NSProgress) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSProgress_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSProgress_registerClosure( - (ffi.Pointer arg0) => - fn(NSProgress._(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._( - pointer.ref.invoke.cast Function(ffi.Pointer block, ffi.Pointer arg0)>>().asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>()(pointer, arg0.pointer), - retain: false, - release: true); -} - -late final _sel_addSubscriberForFileURL_withPublishingHandler_ = - objc.registerName("addSubscriberForFileURL:withPublishingHandler:"); -final _objc_msgSend_672 = 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"); -void _ObjCBlock_ffiVoid_NSData_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); -final _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_NSData_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSData_NSError._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSData_NSError._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData_NSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSData_NSError.fromFunction(void Function(NSData?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSData._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSError._(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_NSData_NSError.listener(void Function(NSData?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSData._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSData? arg0, 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_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_ = - objc.registerName( - "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); -final _objc_msgSend_673 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - -abstract class NSItemProviderFileOptions { - static const int NSItemProviderFileOptionOpenInPlace = 1; -} - -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_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); -final _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry = - Function(ffi.Pointer)>{}; -int _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( - ffi.Pointer Function(ffi.Pointer) fn) { - final id = - ++_ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex; - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0) => - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[ - block.ref.target.address]!(arg0); - -class ObjCBlock_NSProgress_ffiVoidNSURLboolNSError extends objc.ObjCBlockBase { - ObjCBlock_NSProgress_ffiVoidNSURLboolNSError._( - 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_NSProgress_ffiVoidNSURLboolNSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_NSProgress_ffiVoidNSURLboolNSError._(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_NSProgress_ffiVoidNSURLboolNSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_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_NSProgress_ffiVoidNSURLboolNSError.fromFunction( - NSProgress? Function(ObjCBlock_ffiVoid_NSURL_bool_NSError) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline) - .cast(), - _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( - (ffi.Pointer arg0) => - fn(ObjCBlock_ffiVoid_NSURL_bool_NSError._(arg0, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr))); - static ffi.Pointer? _dartFuncTrampoline; - - NSProgress? call(ObjCBlock_ffiVoid_NSURL_bool_NSError 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 - : NSProgress._( - 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); -} - -void _ObjCBlock_ffiVoid_NSURL_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); -final _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( - void Function( - ffi.Pointer, bool, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_NSURL_bool_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSURL_bool_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_NSURL_bool_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSURL_bool_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_bool_NSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Bool arg1, ffi.Pointer arg2)>> - ptr) - : this._( - objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_bool_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_NSURL_bool_NSError.fromFunction( - void Function(NSURL?, bool, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSURL._(arg0, retain: true, release: true), arg1, arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURL_bool_NSError.listener(void Function(NSURL?, bool, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Bool, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSURL._(arg0, retain: true, release: true), - arg1, - arg2.address == 0 - ? null - : NSError._(arg2, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSURL? arg0, bool arg1, 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 ?? ffi.nullptr, arg1, arg2?.pointer ?? ffi.nullptr); -} - -late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_ = - objc.registerName( - "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); -final _objc_msgSend_674 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer)>(); -late final _sel_registeredTypeIdentifiers = - objc.registerName("registeredTypeIdentifiers"); -late final _sel_registeredTypeIdentifiersWithFileOptions_ = - objc.registerName("registeredTypeIdentifiersWithFileOptions:"); -final _objc_msgSend_675 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_hasItemConformingToTypeIdentifier_ = - objc.registerName("hasItemConformingToTypeIdentifier:"); -late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_ = objc - .registerName("hasRepresentationConformingToTypeIdentifier:fileOptions:"); -final _objc_msgSend_676 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_ = - objc.registerName( - "loadDataRepresentationForTypeIdentifier:completionHandler:"); -final _objc_msgSend_677 = 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_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); -final _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[block.ref.target.address]!( - arg0, arg1); - -class ObjCBlock_ffiVoid_NSURL_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_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_ffiVoid_NSURL_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_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_ffiVoid_NSURL_NSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_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_NSURL_NSError.fromFunction(void Function(NSURL?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure((ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSURL._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSError._(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_NSURL_NSError.listener(void Function(NSURL?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSURL._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSURL? arg0, 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_loadFileRepresentationForTypeIdentifier_completionHandler_ = - objc.registerName( - "loadFileRepresentationForTypeIdentifier:completionHandler:"); -final _objc_msgSend_678 = 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_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_ = - objc.registerName( - "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); -final _objc_msgSend_679 = 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_suggestedName = objc.registerName("suggestedName"); -late final _sel_setSuggestedName_ = objc.registerName("setSuggestedName:"); -late final _sel_registerObject_visibility_ = - objc.registerName("registerObject:visibility:"); -final _objc_msgSend_680 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_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); -final _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureRegistry = - Function(ffi.Pointer)>{}; -int _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_registerClosure( - ffi.Pointer Function(ffi.Pointer) fn) { - final id = - ++_ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureRegistryIndex; - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -ffi.Pointer - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0) => - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureRegistry[ - block.ref.target.address]!(arg0); - -class ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError - extends objc.ObjCBlockBase { - ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError._( - 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_NSProgress_ffiVoidobjcObjCObjectNSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError._(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_NSProgress_ffiVoidobjcObjCObjectNSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_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_NSProgress_ffiVoidobjcObjCObjectNSError.fromFunction( - NSProgress? Function(ObjCBlock_ffiVoid_objcObjCObject_NSError) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureTrampoline) - .cast(), - _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_registerClosure( - (ffi.Pointer arg0) => - fn(ObjCBlock_ffiVoid_objcObjCObject_NSError._(arg0, retain: true, release: true)) - ?.retainAndReturnPointer() ?? - ffi.nullptr))); - static ffi.Pointer? _dartFuncTrampoline; - - NSProgress? call(ObjCBlock_ffiVoid_objcObjCObject_NSError 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 - : NSProgress._( - 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); -} - -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); -final _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_NSError_registerClosure( - void Function(ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_objcObjCObject_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_objcObjCObject_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_objcObjCObject_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_objcObjCObject_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_objcObjCObject_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_objcObjCObject_NSError.fromFunctionPointer( - ffi - .Pointer< - ffi - .NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_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_objcObjCObject_NSError.fromFunction( - void Function(NSObject?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSObject._(arg0, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(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_objcObjCObject_NSError.listener( - void Function(NSObject?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn( - arg0.address == 0 - ? null - : NSObject._(arg0, retain: true, release: true), - arg1.address == 0 - ? null - : NSError._(arg1, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject? arg0, 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_registerObjectOfClass_visibility_loadHandler_ = - objc.registerName("registerObjectOfClass:visibility:loadHandler:"); -final _objc_msgSend_681 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_canLoadObjectOfClass_ = - objc.registerName("canLoadObjectOfClass:"); -late final _sel_loadObjectOfClass_completionHandler_ = - objc.registerName("loadObjectOfClass:completionHandler:"); -final _objc_msgSend_682 = 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_initWithItem_typeIdentifier_ = - objc.registerName("initWithItem:typeIdentifier:"); -final _objc_msgSend_683 = 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)>(); -void - _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_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); -final _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureRegistry = - , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_registerClosure( - void Function(ffi.Pointer, ffi.Pointer, - ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureRegistryIndex; - _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureRegistry[ - id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary - extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary - ._(pointer, retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary.fromFunction( - void Function(ObjCBlock_ffiVoid_objcObjCObject_NSError1, NSObject, NSDictionary) - fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(_ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - ObjCBlock_ffiVoid_objcObjCObject_NSError1._(arg0, retain: true, release: true), - NSObject._(arg1, retain: true, release: true), - NSDictionary._(arg2, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary.listener( - void Function(ObjCBlock_ffiVoid_objcObjCObject_NSError1, NSObject, NSDictionary) - fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener(_ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - ObjCBlock_ffiVoid_objcObjCObject_NSError1._(arg0, retain: true, release: true), - NSObject._(arg1, retain: true, release: true), - NSDictionary._(arg2, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(ObjCBlock_ffiVoid_objcObjCObject_NSError1 arg0, NSObject arg1, - NSDictionary arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, arg0.pointer, arg1.pointer, arg2.pointer); -} - -void _ObjCBlock_ffiVoid_objcObjCObject_NSError1_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); -final _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureRegistry = , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_registerClosure( - void Function( - ffi.Pointer, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureRegistryIndex; - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -class ObjCBlock_ffiVoid_objcObjCObject_NSError1 extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_objcObjCObject_NSError1._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_objcObjCObject_NSError1 castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_objcObjCObject_NSError1._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_objcObjCObject_NSError1.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Pointer arg1)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_objcObjCObject_NSError1.fromFunction( - void Function(NSObject?, NSError) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(arg0.address == 0 ? null : NSObject._(arg0, retain: true, release: true), NSError._(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_objcObjCObject_NSError1.listener(void Function(NSObject?, NSError) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_NSError1_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 ? null : NSObject._(arg0, retain: true, release: true), - NSError._(arg1, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject? arg0, 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); -} - -late final _sel_registerItemForTypeIdentifier_loadHandler_ = - objc.registerName("registerItemForTypeIdentifier:loadHandler:"); -final _objc_msgSend_684 = 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_loadItemForTypeIdentifier_options_completionHandler_ = - objc.registerName("loadItemForTypeIdentifier:options:completionHandler:"); -final _objc_msgSend_685 = 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_previewImageHandler = objc.registerName("previewImageHandler"); -final _objc_msgSend_686 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setPreviewImageHandler_ = - objc.registerName("setPreviewImageHandler:"); -final _objc_msgSend_687 = 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_loadPreviewImageWithOptions_completionHandler_ = - objc.registerName("loadPreviewImageWithOptions:completionHandler:"); -final _objc_msgSend_688 = 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)>(); - -class NSMutableString extends NSString { - NSMutableString._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMutableString] that points to the same underlying object as [other]. - static NSMutableString castFrom(T other) { - return NSMutableString._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSMutableString] that wraps the given raw object pointer. - static NSMutableString castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableString._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableString]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableString); - } - - void replaceCharactersInRange_withString_(_NSRange range, NSString aString) { - _objc_msgSend_689(this.pointer, _sel_replaceCharactersInRange_withString_, - range, aString.pointer); - } - - void insertString_atIndex_(NSString aString, int loc) { - _objc_msgSend_690( - this.pointer, _sel_insertString_atIndex_, aString.pointer, loc); - } - - void deleteCharactersInRange_(_NSRange range) { - _objc_msgSend_476(this.pointer, _sel_deleteCharactersInRange_, range); - } - - void appendString_(NSString aString) { - _objc_msgSend_247(this.pointer, _sel_appendString_, aString.pointer); - } - - void appendFormat_(NSString format) { - _objc_msgSend_247(this.pointer, _sel_appendFormat_, format.pointer); - } - - void setString_(NSString aString) { - _objc_msgSend_247(this.pointer, _sel_setString_, aString.pointer); - } - - int replaceOccurrencesOfString_withString_options_range_(NSString target, - NSString replacement, int options, _NSRange searchRange) { - return _objc_msgSend_691( - this.pointer, - _sel_replaceOccurrencesOfString_withString_options_range_, - target.pointer, - replacement.pointer, - options, - searchRange); - } - - bool applyTransform_reverse_range_updatedRange_(NSString transform, - bool reverse, _NSRange range, ffi.Pointer<_NSRange> resultingRange) { - return _objc_msgSend_692( - this.pointer, - _sel_applyTransform_reverse_range_updatedRange_, - transform.pointer, - reverse, - range, - resultingRange); - } - - NSMutableString initWithCapacity_(int capacity) { - final _ret = - _objc_msgSend_693(this.pointer, _sel_initWithCapacity_, capacity); - return NSMutableString._(_ret, retain: true, release: true); - } - - static NSMutableString stringWithCapacity_(int capacity) { - final _ret = _objc_msgSend_693( - _class_NSMutableString, _sel_stringWithCapacity_, capacity); - return NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - static ffi.Pointer getAvailableStringEncodings() { - return _objc_msgSend_357( - _class_NSMutableString, _sel_availableStringEncodings); - } - - static NSString localizedNameOfStringEncoding_(int encoding) { - final _ret = _objc_msgSend_332( - _class_NSMutableString, _sel_localizedNameOfStringEncoding_, encoding); - return NSString._(_ret, retain: true, release: true); - } - - static int getDefaultCStringEncoding() { - return _objc_msgSend_10( - _class_NSMutableString, _sel_defaultCStringEncoding); - } - - @override - NSMutableString initWithCharactersNoCopy_length_freeWhenDone_( - ffi.Pointer characters, int length, bool freeBuffer) { - final _ret = _objc_msgSend_369( - this.pointer, - _sel_initWithCharactersNoCopy_length_freeWhenDone_, - characters, - length, - freeBuffer); - return NSMutableString._(_ret, retain: false, release: true); - } - - @override - NSMutableString initWithCharactersNoCopy_length_deallocator_( - ffi.Pointer chars, - int len, - ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong? deallocator) { - final _ret = _objc_msgSend_370( - this.pointer, - _sel_initWithCharactersNoCopy_length_deallocator_, - chars, - len, - deallocator?.pointer ?? ffi.nullptr); - return NSMutableString._(_ret, retain: false, release: true); - } - - @override - NSMutableString initWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _objc_msgSend_371( - this.pointer, _sel_initWithCharacters_length_, characters, length); - return NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString? initWithUTF8String_( - ffi.Pointer nullTerminatedCString) { - final _ret = _objc_msgSend_372( - this.pointer, _sel_initWithUTF8String_, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString initWithString_(NSString aString) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithString_, aString.pointer); - return NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString initWithFormat_(NSString format) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithFormat_, format.pointer); - return NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString initWithFormat_arguments_( - NSString format, ffi.Pointer<__va_list_tag> argList) { - final _ret = _objc_msgSend_373( - this.pointer, _sel_initWithFormat_arguments_, format.pointer, argList); - return NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString initWithFormat_locale_(NSString format, NSObject? locale) { - final _ret = _objc_msgSend_374(this.pointer, _sel_initWithFormat_locale_, - format.pointer, locale?.pointer ?? ffi.nullptr); - return NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString initWithFormat_locale_arguments_( - NSString format, NSObject? locale, ffi.Pointer<__va_list_tag> argList) { - final _ret = _objc_msgSend_375( - this.pointer, - _sel_initWithFormat_locale_arguments_, - format.pointer, - locale?.pointer ?? ffi.nullptr, - argList); - return NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString? initWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _objc_msgSend_376( - this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_error_, - format.pointer, - validFormatSpecifiers.pointer, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer> error) { - final _ret = _objc_msgSend_377( - this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_, - format.pointer, - validFormatSpecifiers.pointer, - locale?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString? - initWithValidatedFormat_validFormatSpecifiers_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _objc_msgSend_378( - this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_, - format.pointer, - validFormatSpecifiers.pointer, - argList, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString? - initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( - NSString format, - NSString validFormatSpecifiers, - NSObject? locale, - ffi.Pointer<__va_list_tag> argList, - ffi.Pointer> error) { - final _ret = _objc_msgSend_379( - this.pointer, - _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_, - format.pointer, - validFormatSpecifiers.pointer, - locale?.pointer ?? ffi.nullptr, - argList, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString? initWithData_encoding_(NSData data, int encoding) { - final _ret = _objc_msgSend_380( - this.pointer, _sel_initWithData_encoding_, data.pointer, encoding); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString? initWithBytes_length_encoding_( - ffi.Pointer bytes, int len, int encoding) { - final _ret = _objc_msgSend_381(this.pointer, - _sel_initWithBytes_length_encoding_, bytes, len, encoding); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString? initWithBytesNoCopy_length_encoding_freeWhenDone_( - ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { - final _ret = _objc_msgSend_382( - this.pointer, - _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_, - bytes, - len, - encoding, - freeBuffer); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: false, release: true); - } - - @override - NSMutableString? initWithBytesNoCopy_length_encoding_deallocator_( - ffi.Pointer bytes, - int len, - int encoding, - ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { - final _ret = _objc_msgSend_383( - this.pointer, - _sel_initWithBytesNoCopy_length_encoding_deallocator_, - bytes, - len, - encoding, - deallocator?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: false, release: true); - } - - static NSMutableString string() { - final _ret = _objc_msgSend_2(_class_NSMutableString, _sel_string); - return NSMutableString._(_ret, retain: true, release: true); - } - - static NSMutableString stringWithString_(NSString string) { - final _ret = _objc_msgSend_31( - _class_NSMutableString, _sel_stringWithString_, string.pointer); - return NSMutableString._(_ret, retain: true, release: true); - } - - static NSMutableString stringWithCharacters_length_( - ffi.Pointer characters, int length) { - final _ret = _objc_msgSend_371(_class_NSMutableString, - _sel_stringWithCharacters_length_, characters, length); - return NSMutableString._(_ret, retain: true, release: true); - } - - static NSMutableString? stringWithUTF8String_( - ffi.Pointer nullTerminatedCString) { - final _ret = _objc_msgSend_372(_class_NSMutableString, - _sel_stringWithUTF8String_, nullTerminatedCString); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - static NSMutableString stringWithFormat_(NSString format) { - final _ret = _objc_msgSend_31( - _class_NSMutableString, _sel_stringWithFormat_, format.pointer); - return NSMutableString._(_ret, retain: true, release: true); - } - - static NSMutableString localizedStringWithFormat_(NSString format) { - final _ret = _objc_msgSend_31(_class_NSMutableString, - _sel_localizedStringWithFormat_, format.pointer); - return NSMutableString._(_ret, retain: true, release: true); - } - - static NSMutableString? - stringWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _objc_msgSend_376( - _class_NSMutableString, - _sel_stringWithValidatedFormat_validFormatSpecifiers_error_, - format.pointer, - validFormatSpecifiers.pointer, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - static NSMutableString? - localizedStringWithValidatedFormat_validFormatSpecifiers_error_( - NSString format, - NSString validFormatSpecifiers, - ffi.Pointer> error) { - final _ret = _objc_msgSend_376( - _class_NSMutableString, - _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_, - format.pointer, - validFormatSpecifiers.pointer, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString? initWithCString_encoding_( - ffi.Pointer nullTerminatedCString, int encoding) { - final _ret = _objc_msgSend_384(this.pointer, _sel_initWithCString_encoding_, - nullTerminatedCString, encoding); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - static NSMutableString? stringWithCString_encoding_( - ffi.Pointer cString, int enc) { - final _ret = _objc_msgSend_384( - _class_NSMutableString, _sel_stringWithCString_encoding_, cString, enc); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString? initWithContentsOfURL_encoding_error_( - NSURL url, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_385(this.pointer, - _sel_initWithContentsOfURL_encoding_error_, url.pointer, enc, error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString? initWithContentsOfFile_encoding_error_( - NSString path, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_386(this.pointer, - _sel_initWithContentsOfFile_encoding_error_, path.pointer, enc, error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - static NSMutableString? stringWithContentsOfURL_encoding_error_( - NSURL url, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_385(_class_NSMutableString, - _sel_stringWithContentsOfURL_encoding_error_, url.pointer, enc, error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - static NSMutableString? stringWithContentsOfFile_encoding_error_( - NSString path, int enc, ffi.Pointer> error) { - final _ret = _objc_msgSend_386( - _class_NSMutableString, - _sel_stringWithContentsOfFile_encoding_error_, - path.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString? initWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_387( - this.pointer, - _sel_initWithContentsOfURL_usedEncoding_error_, - url.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - @override - NSMutableString? initWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_388( - this.pointer, - _sel_initWithContentsOfFile_usedEncoding_error_, - path.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - static NSMutableString? stringWithContentsOfURL_usedEncoding_error_( - NSURL url, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_387( - _class_NSMutableString, - _sel_stringWithContentsOfURL_usedEncoding_error_, - url.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - static NSMutableString? stringWithContentsOfFile_usedEncoding_error_( - NSString path, - ffi.Pointer enc, - ffi.Pointer> error) { - final _ret = _objc_msgSend_388( - _class_NSMutableString, - _sel_stringWithContentsOfFile_usedEncoding_error_, - path.pointer, - enc, - error); - return _ret.address == 0 - ? null - : NSMutableString._(_ret, retain: true, release: true); - } - - static int - stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( - NSData data, - NSDictionary? opts, - ffi.Pointer> string, - ffi.Pointer usedLossyConversion) { - return _objc_msgSend_389( - _class_NSMutableString, - _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_, - data.pointer, - opts?.pointer ?? ffi.nullptr, - string, - usedLossyConversion); - } - - static NSObject? stringWithContentsOfFile_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSMutableString, _sel_stringWithContentsOfFile_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSObject? stringWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - _class_NSMutableString, _sel_stringWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSObject? stringWithCString_length_( - ffi.Pointer bytes, int length) { - final _ret = _objc_msgSend_384( - _class_NSMutableString, _sel_stringWithCString_length_, bytes, length); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSObject? stringWithCString_(ffi.Pointer bytes) { - final _ret = _objc_msgSend_372( - _class_NSMutableString, _sel_stringWithCString_, bytes); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - static NSString pathWithComponents_(NSArray components) { - final _ret = _objc_msgSend_396( - _class_NSMutableString, _sel_pathWithComponents_, components.pointer); - return NSString._(_ret, retain: true, release: true); - } - - static NSMutableString new1() { - final _ret = _objc_msgSend_2(_class_NSMutableString, _sel_new); - return NSMutableString._(_ret, retain: false, release: true); - } - - static NSMutableString allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMutableString, _sel_allocWithZone_, zone); - return NSMutableString._(_ret, retain: false, release: true); - } - - static NSMutableString alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableString, _sel_alloc); - return NSMutableString._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableString, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableString, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableString, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMutableString, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableString, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableString, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableString, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableString, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSMutableString, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSMutableString = objc.getClass("NSMutableString"); -late final _sel_replaceCharactersInRange_withString_ = - objc.registerName("replaceCharactersInRange:withString:"); -final _objc_msgSend_689 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_insertString_atIndex_ = - objc.registerName("insertString:atIndex:"); -final _objc_msgSend_690 = 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_deleteCharactersInRange_ = - objc.registerName("deleteCharactersInRange:"); -late final _sel_appendString_ = objc.registerName("appendString:"); -late final _sel_appendFormat_ = objc.registerName("appendFormat:"); -late final _sel_setString_ = objc.registerName("setString:"); -late final _sel_replaceOccurrencesOfString_withString_options_range_ = - objc.registerName("replaceOccurrencesOfString:withString:options:range:"); -final _objc_msgSend_691 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -late final _sel_applyTransform_reverse_range_updatedRange_ = - objc.registerName("applyTransform:reverse:range:updatedRange:"); -final _objc_msgSend_692 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - _NSRange, - ffi.Pointer<_NSRange>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool, - _NSRange, - ffi.Pointer<_NSRange>)>(); -final _objc_msgSend_693 = 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_stringWithCapacity_ = objc.registerName("stringWithCapacity:"); - -class NSNotification extends NSObject { - NSNotification._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSNotification] that points to the same underlying object as [other]. - static NSNotification castFrom(T other) { - return NSNotification._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSNotification] that wraps the given raw object pointer. - static NSNotification castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNotification._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSNotification]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSNotification); - } - - NSString get name { - final _ret = _objc_msgSend_21(this.pointer, _sel_name); - return NSString._(_ret, retain: true, release: true); - } - - NSObject? get object { - final _ret = _objc_msgSend_17(this.pointer, _sel_object); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSDictionary? get userInfo { - final _ret = _objc_msgSend_390(this.pointer, _sel_userInfo); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSNotification initWithName_object_userInfo_( - NSString name, NSObject? object, NSDictionary? userInfo) { - final _ret = _objc_msgSend_694( - this.pointer, - _sel_initWithName_object_userInfo_, - name.pointer, - object?.pointer ?? ffi.nullptr, - userInfo?.pointer ?? ffi.nullptr); - return NSNotification._(_ret, retain: true, release: true); - } - - NSNotification? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSNotification._(_ret, retain: true, release: true); - } - - static NSNotification notificationWithName_object_( - NSString aName, NSObject? anObject) { - final _ret = _objc_msgSend_374( - _class_NSNotification, - _sel_notificationWithName_object_, - aName.pointer, - anObject?.pointer ?? ffi.nullptr); - return NSNotification._(_ret, retain: true, release: true); - } - - static NSNotification notificationWithName_object_userInfo_( - NSString aName, NSObject? anObject, NSDictionary? aUserInfo) { - final _ret = _objc_msgSend_694( - _class_NSNotification, - _sel_notificationWithName_object_userInfo_, - aName.pointer, - anObject?.pointer ?? ffi.nullptr, - aUserInfo?.pointer ?? ffi.nullptr); - return NSNotification._(_ret, retain: true, release: true); - } - - @override - NSNotification init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSNotification._(_ret, retain: true, release: true); - } - - static NSNotification new1() { - final _ret = _objc_msgSend_2(_class_NSNotification, _sel_new); - return NSNotification._(_ret, retain: false, release: true); - } - - static NSNotification allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSNotification, _sel_allocWithZone_, zone); - return NSNotification._(_ret, retain: false, release: true); - } - - static NSNotification alloc() { - final _ret = _objc_msgSend_2(_class_NSNotification, _sel_alloc); - return NSNotification._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSNotification, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSNotification, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSNotification, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSNotification, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSNotification, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSNotification, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSNotification, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSNotification, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSNotification, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSNotification = objc.getClass("NSNotification"); -late final _sel_object = objc.registerName("object"); -late final _sel_initWithName_object_userInfo_ = - objc.registerName("initWithName:object:userInfo:"); -final _objc_msgSend_694 = 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_notificationWithName_object_ = - objc.registerName("notificationWithName:object:"); -late final _sel_notificationWithName_object_userInfo_ = - objc.registerName("notificationWithName:object:userInfo:"); - -class NSBundle extends NSObject { - NSBundle._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSBundle] that points to the same underlying object as [other]. - static NSBundle castFrom(T other) { - return NSBundle._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSBundle] that wraps the given raw object pointer. - static NSBundle castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSBundle._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSBundle]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSBundle); - } - - static NSBundle getMainBundle() { - final _ret = _objc_msgSend_695(_class_NSBundle, _sel_mainBundle); - return NSBundle._(_ret, retain: true, release: true); - } - - static NSBundle? bundleWithPath_(NSString path) { - final _ret = - _objc_msgSend_38(_class_NSBundle, _sel_bundleWithPath_, path.pointer); - return _ret.address == 0 - ? null - : NSBundle._(_ret, retain: true, release: true); - } - - NSBundle? initWithPath_(NSString path) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_initWithPath_, path.pointer); - return _ret.address == 0 - ? null - : NSBundle._(_ret, retain: true, release: true); - } - - static NSBundle? bundleWithURL_(NSURL url) { - final _ret = - _objc_msgSend_277(_class_NSBundle, _sel_bundleWithURL_, url.pointer); - return _ret.address == 0 - ? null - : NSBundle._(_ret, retain: true, release: true); - } - - NSBundle? initWithURL_(NSURL url) { - final _ret = - _objc_msgSend_277(this.pointer, _sel_initWithURL_, url.pointer); - return _ret.address == 0 - ? null - : NSBundle._(_ret, retain: true, release: true); - } - - static NSBundle bundleForClass_(NSObject aClass) { - final _ret = _objc_msgSend_696( - _class_NSBundle, _sel_bundleForClass_, aClass.pointer); - return NSBundle._(_ret, retain: true, release: true); - } - - static NSBundle? bundleWithIdentifier_(NSString identifier) { - final _ret = _objc_msgSend_697( - _class_NSBundle, _sel_bundleWithIdentifier_, identifier.pointer); - return _ret.address == 0 - ? null - : NSBundle._(_ret, retain: true, release: true); - } - - static NSArray getAllBundles() { - final _ret = _objc_msgSend_85(_class_NSBundle, _sel_allBundles); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray getAllFrameworks() { - final _ret = _objc_msgSend_85(_class_NSBundle, _sel_allFrameworks); - return NSArray._(_ret, retain: true, release: true); - } - - bool load() { - return _objc_msgSend_12(this.pointer, _sel_load); - } - - bool get loaded { - return _objc_msgSend_12(this.pointer, _sel_isLoaded); - } - - bool unload() { - return _objc_msgSend_12(this.pointer, _sel_unload); - } - - bool preflightAndReturnError_( - ffi.Pointer> error) { - return _objc_msgSend_255( - this.pointer, _sel_preflightAndReturnError_, error); - } - - bool loadAndReturnError_(ffi.Pointer> error) { - return _objc_msgSend_255(this.pointer, _sel_loadAndReturnError_, error); - } - - NSURL get bundleURL { - final _ret = _objc_msgSend_466(this.pointer, _sel_bundleURL); - return NSURL._(_ret, retain: true, release: true); - } - - NSURL? get resourceURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_resourceURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? get executableURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_executableURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? URLForAuxiliaryExecutable_(NSString executableName) { - final _ret = _objc_msgSend_257( - this.pointer, _sel_URLForAuxiliaryExecutable_, executableName.pointer); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? get privateFrameworksURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_privateFrameworksURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? get sharedFrameworksURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_sharedFrameworksURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? get sharedSupportURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_sharedSupportURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? get builtInPlugInsURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_builtInPlugInsURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? get appStoreReceiptURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_appStoreReceiptURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSString get bundlePath { - final _ret = _objc_msgSend_21(this.pointer, _sel_bundlePath); - return NSString._(_ret, retain: true, release: true); - } - - NSString? get resourcePath { - final _ret = _objc_msgSend_44(this.pointer, _sel_resourcePath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get executablePath { - final _ret = _objc_msgSend_44(this.pointer, _sel_executablePath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? pathForAuxiliaryExecutable_(NSString executableName) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_pathForAuxiliaryExecutable_, executableName.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get privateFrameworksPath { - final _ret = _objc_msgSend_44(this.pointer, _sel_privateFrameworksPath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get sharedFrameworksPath { - final _ret = _objc_msgSend_44(this.pointer, _sel_sharedFrameworksPath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get sharedSupportPath { - final _ret = _objc_msgSend_44(this.pointer, _sel_sharedSupportPath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get builtInPlugInsPath { - final _ret = _objc_msgSend_44(this.pointer, _sel_builtInPlugInsPath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - static NSURL? URLForResource_withExtension_subdirectory_inBundleWithURL_( - NSString? name, NSString? ext, NSString? subpath, NSURL bundleURL) { - final _ret = _objc_msgSend_698( - _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 - : NSURL._(_ret, retain: true, release: true); - } - - static NSArray? URLsForResourcesWithExtension_subdirectory_inBundleWithURL_( - NSString? ext, NSString? subpath, NSURL bundleURL) { - final _ret = _objc_msgSend_699( - _class_NSBundle, - _sel_URLsForResourcesWithExtension_subdirectory_inBundleWithURL_, - ext?.pointer ?? ffi.nullptr, - subpath?.pointer ?? ffi.nullptr, - bundleURL.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSURL? URLForResource_withExtension_(NSString? name, NSString? ext) { - final _ret = _objc_msgSend_700( - this.pointer, - _sel_URLForResource_withExtension_, - name?.pointer ?? ffi.nullptr, - ext?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? URLForResource_withExtension_subdirectory_( - NSString? name, NSString? ext, NSString? subpath) { - final _ret = _objc_msgSend_701( - this.pointer, - _sel_URLForResource_withExtension_subdirectory_, - name?.pointer ?? ffi.nullptr, - ext?.pointer ?? ffi.nullptr, - subpath?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSURL? URLForResource_withExtension_subdirectory_localization_(NSString? name, - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _objc_msgSend_702( - 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 - : NSURL._(_ret, retain: true, release: true); - } - - NSArray? URLsForResourcesWithExtension_subdirectory_( - NSString? ext, NSString? subpath) { - final _ret = _objc_msgSend_703( - this.pointer, - _sel_URLsForResourcesWithExtension_subdirectory_, - ext?.pointer ?? ffi.nullptr, - subpath?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSArray? URLsForResourcesWithExtension_subdirectory_localization_( - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _objc_msgSend_704( - this.pointer, - _sel_URLsForResourcesWithExtension_subdirectory_localization_, - ext?.pointer ?? ffi.nullptr, - subpath?.pointer ?? ffi.nullptr, - localizationName?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - static NSString? pathForResource_ofType_inDirectory_( - NSString? name, NSString? ext, NSString bundlePath) { - final _ret = _objc_msgSend_705( - _class_NSBundle, - _sel_pathForResource_ofType_inDirectory_, - name?.pointer ?? ffi.nullptr, - ext?.pointer ?? ffi.nullptr, - bundlePath.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - static NSArray pathsForResourcesOfType_inDirectory_( - NSString? ext, NSString bundlePath) { - final _ret = _objc_msgSend_706( - _class_NSBundle, - _sel_pathsForResourcesOfType_inDirectory_, - ext?.pointer ?? ffi.nullptr, - bundlePath.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSString? pathForResource_ofType_(NSString? name, NSString? ext) { - final _ret = _objc_msgSend_707(this.pointer, _sel_pathForResource_ofType_, - name?.pointer ?? ffi.nullptr, ext?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? pathForResource_ofType_inDirectory_forLocalization_(NSString? name, - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _objc_msgSend_708( - this.pointer, - _sel_pathForResource_ofType_inDirectory_forLocalization_, - name?.pointer ?? ffi.nullptr, - ext?.pointer ?? ffi.nullptr, - subpath?.pointer ?? ffi.nullptr, - localizationName?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSArray pathsForResourcesOfType_inDirectory_forLocalization_( - NSString? ext, NSString? subpath, NSString? localizationName) { - final _ret = _objc_msgSend_709( - this.pointer, - _sel_pathsForResourcesOfType_inDirectory_forLocalization_, - ext?.pointer ?? ffi.nullptr, - subpath?.pointer ?? ffi.nullptr, - localizationName?.pointer ?? ffi.nullptr); - return NSArray._(_ret, retain: true, release: true); - } - - NSString localizedStringForKey_value_table_( - NSString key, NSString? value, NSString? tableName) { - final _ret = _objc_msgSend_710( - this.pointer, - _sel_localizedStringForKey_value_table_, - key.pointer, - value?.pointer ?? ffi.nullptr, - tableName?.pointer ?? ffi.nullptr); - return NSString._(_ret, retain: true, release: true); - } - - NSAttributedString localizedAttributedStringForKey_value_table_( - NSString key, NSString? value, NSString? tableName) { - final _ret = _objc_msgSend_736( - this.pointer, - _sel_localizedAttributedStringForKey_value_table_, - key.pointer, - value?.pointer ?? ffi.nullptr, - tableName?.pointer ?? ffi.nullptr); - return NSAttributedString._(_ret, retain: true, release: true); - } - - NSString? get bundleIdentifier { - final _ret = _objc_msgSend_44(this.pointer, _sel_bundleIdentifier); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSDictionary? get infoDictionary { - final _ret = _objc_msgSend_390(this.pointer, _sel_infoDictionary); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSDictionary? get localizedInfoDictionary { - final _ret = _objc_msgSend_390(this.pointer, _sel_localizedInfoDictionary); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSObject? objectForInfoDictionaryKey_(NSString key) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_objectForInfoDictionaryKey_, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? classNamed_(NSString className) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_classNamed_, className.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject? get principalClass { - final _ret = _objc_msgSend_17(this.pointer, _sel_principalClass); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSArray get preferredLocalizations { - final _ret = _objc_msgSend_85(this.pointer, _sel_preferredLocalizations); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get localizations { - final _ret = _objc_msgSend_85(this.pointer, _sel_localizations); - return NSArray._(_ret, retain: true, release: true); - } - - NSString? get developmentLocalization { - final _ret = _objc_msgSend_44(this.pointer, _sel_developmentLocalization); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - static NSArray preferredLocalizationsFromArray_(NSArray localizationsArray) { - final _ret = _objc_msgSend_68(_class_NSBundle, - _sel_preferredLocalizationsFromArray_, localizationsArray.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - static NSArray preferredLocalizationsFromArray_forPreferences_( - NSArray localizationsArray, NSArray? preferencesArray) { - final _ret = _objc_msgSend_737( - _class_NSBundle, - _sel_preferredLocalizationsFromArray_forPreferences_, - localizationsArray.pointer, - preferencesArray?.pointer ?? ffi.nullptr); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray? get executableArchitectures { - final _ret = _objc_msgSend_84(this.pointer, _sel_executableArchitectures); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - void setPreservationPriority_forTags_(double priority, NSSet tags) { - _objc_msgSend_738(this.pointer, _sel_setPreservationPriority_forTags_, - priority, tags.pointer); - } - - double preservationPriorityForTag_(NSString tag) { - return objc.useMsgSendVariants - ? _objc_msgSend_308Fpret( - this.pointer, _sel_preservationPriorityForTag_, tag.pointer) - : _objc_msgSend_308( - this.pointer, _sel_preservationPriorityForTag_, tag.pointer); - } - - @override - NSBundle init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSBundle._(_ret, retain: true, release: true); - } - - static NSBundle new1() { - final _ret = _objc_msgSend_2(_class_NSBundle, _sel_new); - return NSBundle._(_ret, retain: false, release: true); - } - - static NSBundle allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSBundle, _sel_allocWithZone_, zone); - return NSBundle._(_ret, retain: false, release: true); - } - - static NSBundle alloc() { - final _ret = _objc_msgSend_2(_class_NSBundle, _sel_alloc); - return NSBundle._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSBundle, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSBundle, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSBundle, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSBundle, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSBundle, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSBundle, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSBundle, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSBundle, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSBundle, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSBundle = objc.getClass("NSBundle"); -late final _sel_mainBundle = objc.registerName("mainBundle"); -final _objc_msgSend_695 = 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:"); -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:"); -final _objc_msgSend_696 = 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_697 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_allBundles = objc.registerName("allBundles"); -late final _sel_allFrameworks = objc.registerName("allFrameworks"); -late final _sel_isLoaded = objc.registerName("isLoaded"); -late final _sel_unload = objc.registerName("unload"); -late final _sel_preflightAndReturnError_ = - objc.registerName("preflightAndReturnError:"); -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_698 = 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_699 = 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_700 = 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_701 = 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_702 = 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_703 = 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_704 = 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_705 = 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_706 = 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_707 = 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_708 = 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_709 = 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_710 = 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)>(); - -class NSAttributedString extends NSObject { - NSAttributedString._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSAttributedString] that points to the same underlying object as [other]. - static NSAttributedString castFrom(T other) { - return NSAttributedString._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSAttributedString] that wraps the given raw object pointer. - static NSAttributedString castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSAttributedString._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSAttributedString]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSAttributedString); - } - - NSString get string { - final _ret = _objc_msgSend_21(this.pointer, _sel_string); - return NSString._(_ret, retain: true, release: true); - } - - NSDictionary attributesAtIndex_effectiveRange_( - int location, ffi.Pointer<_NSRange> range) { - final _ret = _objc_msgSend_711( - this.pointer, _sel_attributesAtIndex_effectiveRange_, location, range); - return NSDictionary._(_ret, retain: true, release: true); - } - - int get length { - return _objc_msgSend_10(this.pointer, _sel_length); - } - - NSObject? attribute_atIndex_effectiveRange_( - NSString attrName, int location, ffi.Pointer<_NSRange> range) { - final _ret = _objc_msgSend_712( - this.pointer, - _sel_attribute_atIndex_effectiveRange_, - attrName.pointer, - location, - range); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSAttributedString attributedSubstringFromRange_(_NSRange range) { - final _ret = _objc_msgSend_713( - this.pointer, _sel_attributedSubstringFromRange_, range); - return NSAttributedString._(_ret, retain: true, release: true); - } - - NSDictionary attributesAtIndex_longestEffectiveRange_inRange_( - int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { - final _ret = _objc_msgSend_714( - this.pointer, - _sel_attributesAtIndex_longestEffectiveRange_inRange_, - location, - range, - rangeLimit); - return NSDictionary._(_ret, retain: true, release: true); - } - - NSObject? attribute_atIndex_longestEffectiveRange_inRange_(NSString attrName, - int location, ffi.Pointer<_NSRange> range, _NSRange rangeLimit) { - final _ret = _objc_msgSend_715( - this.pointer, - _sel_attribute_atIndex_longestEffectiveRange_inRange_, - attrName.pointer, - location, - range, - rangeLimit); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - bool isEqualToAttributedString_(NSAttributedString other) { - return _objc_msgSend_716( - this.pointer, _sel_isEqualToAttributedString_, other.pointer); - } - - NSAttributedString initWithString_(NSString str) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithString_, str.pointer); - return NSAttributedString._(_ret, retain: true, release: true); - } - - NSAttributedString initWithString_attributes_( - NSString str, NSDictionary? attrs) { - final _ret = _objc_msgSend_717( - this.pointer, - _sel_initWithString_attributes_, - str.pointer, - attrs?.pointer ?? ffi.nullptr); - return NSAttributedString._(_ret, retain: true, release: true); - } - - NSAttributedString initWithAttributedString_(NSAttributedString attrStr) { - final _ret = _objc_msgSend_718( - this.pointer, _sel_initWithAttributedString_, attrStr.pointer); - return NSAttributedString._(_ret, retain: true, release: true); - } - - void enumerateAttributesInRange_options_usingBlock_(_NSRange enumerationRange, - int opts, ObjCBlock_ffiVoid_NSDictionary_NSRange_bool block) { - _objc_msgSend_719( - this.pointer, - _sel_enumerateAttributesInRange_options_usingBlock_, - enumerationRange, - opts, - block.pointer); - } - - void enumerateAttribute_inRange_options_usingBlock_( - NSString attrName, - _NSRange enumerationRange, - int opts, - ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool block) { - _objc_msgSend_720( - this.pointer, - _sel_enumerateAttribute_inRange_options_usingBlock_, - attrName.pointer, - enumerationRange, - opts, - block.pointer); - } - - NSAttributedString? - initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( - NSURL markdownFile, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _objc_msgSend_725( - this.pointer, - _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, - markdownFile.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSAttributedString._(_ret, retain: true, release: true); - } - - NSAttributedString? initWithMarkdown_options_baseURL_error_( - NSData markdown, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _objc_msgSend_726( - this.pointer, - _sel_initWithMarkdown_options_baseURL_error_, - markdown.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSAttributedString._(_ret, retain: true, release: true); - } - - NSAttributedString? initWithMarkdownString_options_baseURL_error_( - NSString markdownString, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _objc_msgSend_727( - this.pointer, - _sel_initWithMarkdownString_options_baseURL_error_, - markdownString.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSAttributedString._(_ret, retain: true, release: true); - } - - NSAttributedString initWithFormat_options_locale_( - NSAttributedString format, int options, NSLocale? locale) { - final _ret = _objc_msgSend_728( - this.pointer, - _sel_initWithFormat_options_locale_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr); - return NSAttributedString._(_ret, retain: true, release: true); - } - - NSAttributedString initWithFormat_options_locale_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _objc_msgSend_729( - this.pointer, - _sel_initWithFormat_options_locale_arguments_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr, - arguments); - return NSAttributedString._(_ret, retain: true, release: true); - } - - static NSAttributedString localizedAttributedStringWithFormat_( - NSAttributedString format) { - final _ret = _objc_msgSend_718(_class_NSAttributedString, - _sel_localizedAttributedStringWithFormat_, format.pointer); - return NSAttributedString._(_ret, retain: true, release: true); - } - - static NSAttributedString localizedAttributedStringWithFormat_options_( - NSAttributedString format, int options) { - final _ret = _objc_msgSend_730( - _class_NSAttributedString, - _sel_localizedAttributedStringWithFormat_options_, - format.pointer, - options); - return NSAttributedString._(_ret, retain: true, release: true); - } - - NSAttributedString initWithFormat_options_locale_context_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context) { - final _ret = _objc_msgSend_731( - this.pointer, - _sel_initWithFormat_options_locale_context_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr, - context.pointer); - return NSAttributedString._(_ret, retain: true, release: true); - } - - NSAttributedString initWithFormat_options_locale_context_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _objc_msgSend_732( - this.pointer, - _sel_initWithFormat_options_locale_context_arguments_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr, - context.pointer, - arguments); - return NSAttributedString._(_ret, retain: true, release: true); - } - - static NSAttributedString localizedAttributedStringWithFormat_context_( - NSAttributedString format, NSDictionary context) { - final _ret = _objc_msgSend_733( - _class_NSAttributedString, - _sel_localizedAttributedStringWithFormat_context_, - format.pointer, - context.pointer); - return NSAttributedString._(_ret, retain: true, release: true); - } - - static NSAttributedString - localizedAttributedStringWithFormat_options_context_( - NSAttributedString format, int options, NSDictionary context) { - final _ret = _objc_msgSend_734( - _class_NSAttributedString, - _sel_localizedAttributedStringWithFormat_options_context_, - format.pointer, - options, - context.pointer); - return NSAttributedString._(_ret, retain: true, release: true); - } - - NSAttributedString attributedStringByInflectingString() { - final _ret = _objc_msgSend_735( - this.pointer, _sel_attributedStringByInflectingString); - return NSAttributedString._(_ret, retain: true, release: true); - } - - @override - NSAttributedString init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSAttributedString._(_ret, retain: true, release: true); - } - - static NSAttributedString new1() { - final _ret = _objc_msgSend_2(_class_NSAttributedString, _sel_new); - return NSAttributedString._(_ret, retain: false, release: true); - } - - static NSAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSAttributedString, _sel_allocWithZone_, zone); - return NSAttributedString._(_ret, retain: false, release: true); - } - - static NSAttributedString alloc() { - final _ret = _objc_msgSend_2(_class_NSAttributedString, _sel_alloc); - return NSAttributedString._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSAttributedString, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSAttributedString, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSAttributedString, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSAttributedString, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSAttributedString, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSAttributedString, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSAttributedString, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSAttributedString, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSAttributedString, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSAttributedString = objc.getClass("NSAttributedString"); -late final _sel_attributesAtIndex_effectiveRange_ = - objc.registerName("attributesAtIndex:effectiveRange:"); -final _objc_msgSend_711 = 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_attribute_atIndex_effectiveRange_ = - objc.registerName("attribute:atIndex:effectiveRange:"); -final _objc_msgSend_712 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_NSRange>)>(); -late final _sel_attributedSubstringFromRange_ = - objc.registerName("attributedSubstringFromRange:"); -final _objc_msgSend_713 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, _NSRange)>(); -late final _sel_attributesAtIndex_longestEffectiveRange_inRange_ = - objc.registerName("attributesAtIndex:longestEffectiveRange:inRange:"); -final _objc_msgSend_714 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer<_NSRange>, - _NSRange)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer<_NSRange>, - _NSRange)>(); -late final _sel_attribute_atIndex_longestEffectiveRange_inRange_ = - objc.registerName("attribute:atIndex:longestEffectiveRange:inRange:"); -final _objc_msgSend_715 = 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_716 = 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_attributes_ = - objc.registerName("initWithString:attributes:"); -final _objc_msgSend_717 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_initWithAttributedString_ = - objc.registerName("initWithAttributedString:"); -final _objc_msgSend_718 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSAttributedStringEnumerationOptions { - static const int NSAttributedStringEnumerationReverse = 2; - static const int - NSAttributedStringEnumerationLongestEffectiveRangeNotRequired = 1048576; -} - -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); -final _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( - void Function( - ffi.Pointer, _NSRange, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_NSDictionary_NSRange_bool extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSDictionary_NSRange_bool._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSDictionary_NSRange_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSDictionary_NSRange_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.fromFunctionPointer( - ffi.Pointer< - ffi - .NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - _NSRange arg1, ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.fromFunction( - void Function(NSDictionary, _NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(NSDictionary._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSDictionary_NSRange_bool.listener( - void Function(NSDictionary, _NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(NSDictionary._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSDictionary arg0, _NSRange arg1, ffi.Pointer arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>()(pointer, arg0.pointer, arg1, arg2); -} - -late final _sel_enumerateAttributesInRange_options_usingBlock_ = - objc.registerName("enumerateAttributesInRange:options:usingBlock:"); -final _objc_msgSend_719 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - 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); -final _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( - void Function( - ffi.Pointer, _NSRange, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - _NSRange arg1, ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool.fromFunction( - void Function(NSObject?, _NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSObject._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool.listener( - void Function(NSObject?, _NSRange, ffi.Pointer) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_objcObjCObject_NSRange_bool_registerClosure( - (ffi.Pointer arg0, _NSRange arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSObject._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSObject? arg0, _NSRange arg1, ffi.Pointer arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - _NSRange arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2); -} - -late final _sel_enumerateAttribute_inRange_options_usingBlock_ = - objc.registerName("enumerateAttribute:inRange:options:usingBlock:"); -final _objc_msgSend_720 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange, - int, - ffi.Pointer)>(); - -class NSAttributedStringMarkdownParsingOptions extends NSObject { - NSAttributedStringMarkdownParsingOptions._( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSAttributedStringMarkdownParsingOptions] that points to the same underlying object as [other]. - static NSAttributedStringMarkdownParsingOptions - castFrom(T other) { - return NSAttributedStringMarkdownParsingOptions._(other.pointer, - retain: true, release: true); - } - - /// Returns a [NSAttributedStringMarkdownParsingOptions] that wraps the given raw object pointer. - static NSAttributedStringMarkdownParsingOptions castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSAttributedStringMarkdownParsingOptions._(other, - retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSAttributedStringMarkdownParsingOptions]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, - _class_NSAttributedStringMarkdownParsingOptions); - } - - @override - NSAttributedStringMarkdownParsingOptions init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSAttributedStringMarkdownParsingOptions._(_ret, - retain: true, release: true); - } - - bool get allowsExtendedAttributes { - return _objc_msgSend_12(this.pointer, _sel_allowsExtendedAttributes); - } - - set allowsExtendedAttributes(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAllowsExtendedAttributes_, value); - } - - int get interpretedSyntax { - return _objc_msgSend_721(this.pointer, _sel_interpretedSyntax); - } - - set interpretedSyntax(int value) { - return _objc_msgSend_722(this.pointer, _sel_setInterpretedSyntax_, value); - } - - int get failurePolicy { - return _objc_msgSend_723(this.pointer, _sel_failurePolicy); - } - - set failurePolicy(int value) { - return _objc_msgSend_724(this.pointer, _sel_setFailurePolicy_, value); - } - - NSString? get languageCode { - final _ret = _objc_msgSend_44(this.pointer, _sel_languageCode); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set languageCode(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setLanguageCode_, value?.pointer ?? ffi.nullptr); - } - - bool get appliesSourcePositionAttributes { - return _objc_msgSend_12(this.pointer, _sel_appliesSourcePositionAttributes); - } - - set appliesSourcePositionAttributes(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAppliesSourcePositionAttributes_, value); - } - - static NSAttributedStringMarkdownParsingOptions new1() { - final _ret = _objc_msgSend_2( - _class_NSAttributedStringMarkdownParsingOptions, _sel_new); - return NSAttributedStringMarkdownParsingOptions._(_ret, - retain: false, release: true); - } - - static NSAttributedStringMarkdownParsingOptions allocWithZone_( - ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSAttributedStringMarkdownParsingOptions, - _sel_allocWithZone_, - zone); - return NSAttributedStringMarkdownParsingOptions._(_ret, - retain: false, release: true); - } - - static NSAttributedStringMarkdownParsingOptions alloc() { - final _ret = _objc_msgSend_2( - _class_NSAttributedStringMarkdownParsingOptions, _sel_alloc); - return NSAttributedStringMarkdownParsingOptions._(_ret, - retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSAttributedStringMarkdownParsingOptions, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSAttributedStringMarkdownParsingOptions, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12(_class_NSAttributedStringMarkdownParsingOptions, - _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSAttributedStringMarkdownParsingOptions, - _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63( - _class_NSAttributedStringMarkdownParsingOptions, - _sel_keyPathsForValuesAffectingValueForKey_, - key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSAttributedStringMarkdownParsingOptions, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSAttributedStringMarkdownParsingOptions, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSAttributedStringMarkdownParsingOptions, - _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSAttributedStringMarkdownParsingOptions, - _sel_classForKeyedUnarchiver); - return NSObject._(_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:"); - -abstract class NSAttributedStringMarkdownInterpretedSyntax { - static const int NSAttributedStringMarkdownInterpretedSyntaxFull = 0; - static const int NSAttributedStringMarkdownInterpretedSyntaxInlineOnly = 1; - static const int - NSAttributedStringMarkdownInterpretedSyntaxInlineOnlyPreservingWhitespace = - 2; -} - -late final _sel_interpretedSyntax = objc.registerName("interpretedSyntax"); -final _objc_msgSend_721 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setInterpretedSyntax_ = - objc.registerName("setInterpretedSyntax:"); -final _objc_msgSend_722 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); - -abstract class NSAttributedStringMarkdownParsingFailurePolicy { - static const int NSAttributedStringMarkdownParsingFailureReturnError = 0; - static const int - NSAttributedStringMarkdownParsingFailureReturnPartiallyParsedIfPossible = - 1; -} - -late final _sel_failurePolicy = objc.registerName("failurePolicy"); -final _objc_msgSend_723 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setFailurePolicy_ = objc.registerName("setFailurePolicy:"); -final _objc_msgSend_724 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -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_725 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); -late final _sel_initWithMarkdown_options_baseURL_error_ = - objc.registerName("initWithMarkdown:options:baseURL:error:"); -final _objc_msgSend_726 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); -late final _sel_initWithMarkdownString_options_baseURL_error_ = - objc.registerName("initWithMarkdownString:options:baseURL:error:"); -final _objc_msgSend_727 = 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>)>(); - -abstract class NSAttributedStringFormattingOptions { - static const int - NSAttributedStringFormattingInsertArgumentAttributesWithoutMerging = 1; - static const int NSAttributedStringFormattingApplyReplacementIndexAttribute = - 2; -} - -late final _sel_initWithFormat_options_locale_ = - objc.registerName("initWithFormat:options:locale:"); -final _objc_msgSend_728 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_initWithFormat_options_locale_arguments_ = - objc.registerName("initWithFormat:options:locale:arguments:"); -final _objc_msgSend_729 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); -late final _sel_localizedAttributedStringWithFormat_ = - objc.registerName("localizedAttributedStringWithFormat:"); -late final _sel_localizedAttributedStringWithFormat_options_ = - objc.registerName("localizedAttributedStringWithFormat:options:"); -final _objc_msgSend_730 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .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_731 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_initWithFormat_options_locale_context_arguments_ = - objc.registerName("initWithFormat:options:locale:context:arguments:"); -final _objc_msgSend_732 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); -late final _sel_localizedAttributedStringWithFormat_context_ = - objc.registerName("localizedAttributedStringWithFormat:context:"); -final _objc_msgSend_733 = 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_734 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); -late final _sel_attributedStringByInflectingString = - objc.registerName("attributedStringByInflectingString"); -final _objc_msgSend_735 = 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_736 = 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"); -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:"); -final _objc_msgSend_737 = 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"); -late final _sel_setPreservationPriority_forTags_ = - objc.registerName("setPreservationPriority:forTags:"); -final _objc_msgSend_738 = 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:"); - -class NSMutableAttributedString extends NSAttributedString { - NSMutableAttributedString._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSMutableAttributedString] that points to the same underlying object as [other]. - static NSMutableAttributedString castFrom( - T other) { - return NSMutableAttributedString._(other.pointer, - retain: true, release: true); - } - - /// Returns a [NSMutableAttributedString] that wraps the given raw object pointer. - static NSMutableAttributedString castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSMutableAttributedString._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSMutableAttributedString]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableAttributedString); - } - - void replaceCharactersInRange_withString_(_NSRange range, NSString str) { - _objc_msgSend_689(this.pointer, _sel_replaceCharactersInRange_withString_, - range, str.pointer); - } - - void setAttributes_range_(NSDictionary? attrs, _NSRange range) { - _objc_msgSend_739(this.pointer, _sel_setAttributes_range_, - attrs?.pointer ?? ffi.nullptr, range); - } - - NSMutableString get mutableString { - final _ret = _objc_msgSend_740(this.pointer, _sel_mutableString); - return NSMutableString._(_ret, retain: true, release: true); - } - - void addAttribute_value_range_( - NSString name, NSObject value, _NSRange range) { - _objc_msgSend_741(this.pointer, _sel_addAttribute_value_range_, - name.pointer, value.pointer, range); - } - - void addAttributes_range_(NSDictionary attrs, _NSRange range) { - _objc_msgSend_742( - this.pointer, _sel_addAttributes_range_, attrs.pointer, range); - } - - void removeAttribute_range_(NSString name, _NSRange range) { - _objc_msgSend_743( - this.pointer, _sel_removeAttribute_range_, name.pointer, range); - } - - void replaceCharactersInRange_withAttributedString_( - _NSRange range, NSAttributedString attrString) { - _objc_msgSend_744( - this.pointer, - _sel_replaceCharactersInRange_withAttributedString_, - range, - attrString.pointer); - } - - void insertAttributedString_atIndex_(NSAttributedString attrString, int loc) { - _objc_msgSend_745(this.pointer, _sel_insertAttributedString_atIndex_, - attrString.pointer, loc); - } - - void appendAttributedString_(NSAttributedString attrString) { - _objc_msgSend_746( - this.pointer, _sel_appendAttributedString_, attrString.pointer); - } - - void deleteCharactersInRange_(_NSRange range) { - _objc_msgSend_476(this.pointer, _sel_deleteCharactersInRange_, range); - } - - void setAttributedString_(NSAttributedString attrString) { - _objc_msgSend_746( - this.pointer, _sel_setAttributedString_, attrString.pointer); - } - - void beginEditing() { - _objc_msgSend_1(this.pointer, _sel_beginEditing); - } - - void endEditing() { - _objc_msgSend_1(this.pointer, _sel_endEditing); - } - - void appendLocalizedFormat_(NSAttributedString format) { - _objc_msgSend_746( - this.pointer, _sel_appendLocalizedFormat_, format.pointer); - } - - @override - NSMutableAttributedString initWithString_(NSString str) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithString_, str.pointer); - return NSMutableAttributedString._(_ret, retain: true, release: true); - } - - @override - NSMutableAttributedString initWithString_attributes_( - NSString str, NSDictionary? attrs) { - final _ret = _objc_msgSend_717( - this.pointer, - _sel_initWithString_attributes_, - str.pointer, - attrs?.pointer ?? ffi.nullptr); - return NSMutableAttributedString._(_ret, retain: true, release: true); - } - - @override - NSMutableAttributedString initWithAttributedString_( - NSAttributedString attrStr) { - final _ret = _objc_msgSend_718( - this.pointer, _sel_initWithAttributedString_, attrStr.pointer); - return NSMutableAttributedString._(_ret, retain: true, release: true); - } - - @override - NSMutableAttributedString? - initWithContentsOfMarkdownFileAtURL_options_baseURL_error_( - NSURL markdownFile, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _objc_msgSend_725( - this.pointer, - _sel_initWithContentsOfMarkdownFileAtURL_options_baseURL_error_, - markdownFile.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSMutableAttributedString._(_ret, retain: true, release: true); - } - - @override - NSMutableAttributedString? initWithMarkdown_options_baseURL_error_( - NSData markdown, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _objc_msgSend_726( - this.pointer, - _sel_initWithMarkdown_options_baseURL_error_, - markdown.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSMutableAttributedString._(_ret, retain: true, release: true); - } - - @override - NSMutableAttributedString? initWithMarkdownString_options_baseURL_error_( - NSString markdownString, - NSAttributedStringMarkdownParsingOptions? options, - NSURL? baseURL, - ffi.Pointer> error) { - final _ret = _objc_msgSend_727( - this.pointer, - _sel_initWithMarkdownString_options_baseURL_error_, - markdownString.pointer, - options?.pointer ?? ffi.nullptr, - baseURL?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSMutableAttributedString._(_ret, retain: true, release: true); - } - - @override - NSMutableAttributedString initWithFormat_options_locale_( - NSAttributedString format, int options, NSLocale? locale) { - final _ret = _objc_msgSend_728( - this.pointer, - _sel_initWithFormat_options_locale_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr); - return NSMutableAttributedString._(_ret, retain: true, release: true); - } - - @override - NSMutableAttributedString initWithFormat_options_locale_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _objc_msgSend_729( - this.pointer, - _sel_initWithFormat_options_locale_arguments_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr, - arguments); - return NSMutableAttributedString._(_ret, retain: true, release: true); - } - - static NSMutableAttributedString localizedAttributedStringWithFormat_( - NSAttributedString format) { - final _ret = _objc_msgSend_718(_class_NSMutableAttributedString, - _sel_localizedAttributedStringWithFormat_, format.pointer); - return NSMutableAttributedString._(_ret, retain: true, release: true); - } - - static NSMutableAttributedString localizedAttributedStringWithFormat_options_( - NSAttributedString format, int options) { - final _ret = _objc_msgSend_730( - _class_NSMutableAttributedString, - _sel_localizedAttributedStringWithFormat_options_, - format.pointer, - options); - return NSMutableAttributedString._(_ret, retain: true, release: true); - } - - @override - NSMutableAttributedString initWithFormat_options_locale_context_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context) { - final _ret = _objc_msgSend_731( - this.pointer, - _sel_initWithFormat_options_locale_context_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr, - context.pointer); - return NSMutableAttributedString._(_ret, retain: true, release: true); - } - - @override - NSMutableAttributedString initWithFormat_options_locale_context_arguments_( - NSAttributedString format, - int options, - NSLocale? locale, - NSDictionary context, - ffi.Pointer<__va_list_tag> arguments) { - final _ret = _objc_msgSend_732( - this.pointer, - _sel_initWithFormat_options_locale_context_arguments_, - format.pointer, - options, - locale?.pointer ?? ffi.nullptr, - context.pointer, - arguments); - return NSMutableAttributedString._(_ret, retain: true, release: true); - } - - static NSMutableAttributedString localizedAttributedStringWithFormat_context_( - NSAttributedString format, NSDictionary context) { - final _ret = _objc_msgSend_733( - _class_NSMutableAttributedString, - _sel_localizedAttributedStringWithFormat_context_, - format.pointer, - context.pointer); - return NSMutableAttributedString._(_ret, retain: true, release: true); - } - - static NSMutableAttributedString - localizedAttributedStringWithFormat_options_context_( - NSAttributedString format, int options, NSDictionary context) { - final _ret = _objc_msgSend_734( - _class_NSMutableAttributedString, - _sel_localizedAttributedStringWithFormat_options_context_, - format.pointer, - options, - context.pointer); - return NSMutableAttributedString._(_ret, retain: true, release: true); - } - - @override - NSMutableAttributedString init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableAttributedString._(_ret, retain: true, release: true); - } - - static NSMutableAttributedString new1() { - final _ret = _objc_msgSend_2(_class_NSMutableAttributedString, _sel_new); - return NSMutableAttributedString._(_ret, retain: false, release: true); - } - - static NSMutableAttributedString allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSMutableAttributedString, _sel_allocWithZone_, zone); - return NSMutableAttributedString._(_ret, retain: false, release: true); - } - - static NSMutableAttributedString alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableAttributedString, _sel_alloc); - return NSMutableAttributedString._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableAttributedString, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableAttributedString, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableAttributedString, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSMutableAttributedString, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableAttributedString, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableAttributedString, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableAttributedString, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableAttributedString, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSMutableAttributedString, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSMutableAttributedString = - objc.getClass("NSMutableAttributedString"); -late final _sel_setAttributes_range_ = - objc.registerName("setAttributes:range:"); -final _objc_msgSend_739 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_mutableString = objc.registerName("mutableString"); -final _objc_msgSend_740 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_addAttribute_value_range_ = - objc.registerName("addAttribute:value:range:"); -final _objc_msgSend_741 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_addAttributes_range_ = - objc.registerName("addAttributes:range:"); -final _objc_msgSend_742 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_removeAttribute_range_ = - objc.registerName("removeAttribute:range:"); -final _objc_msgSend_743 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -late final _sel_replaceCharactersInRange_withAttributedString_ = - objc.registerName("replaceCharactersInRange:withAttributedString:"); -final _objc_msgSend_744 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_insertAttributedString_atIndex_ = - objc.registerName("insertAttributedString:atIndex:"); -final _objc_msgSend_745 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_appendAttributedString_ = - objc.registerName("appendAttributedString:"); -final _objc_msgSend_746 = 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_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:"); - -class NSDateFormatter extends NSFormatter { - NSDateFormatter._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSDateFormatter] that points to the same underlying object as [other]. - static NSDateFormatter castFrom(T other) { - return NSDateFormatter._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSDateFormatter] that wraps the given raw object pointer. - static NSDateFormatter castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDateFormatter._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSDateFormatter]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSDateFormatter); - } - - int get formattingContext { - return _objc_msgSend_752(this.pointer, _sel_formattingContext); - } - - set formattingContext(int value) { - return _objc_msgSend_753(this.pointer, _sel_setFormattingContext_, value); - } - - bool getObjectValue_forString_range_error_( - ffi.Pointer> obj, - NSString string, - ffi.Pointer<_NSRange> rangep, - ffi.Pointer> error) { - return _objc_msgSend_754( - this.pointer, - _sel_getObjectValue_forString_range_error_, - obj, - string.pointer, - rangep, - error); - } - - NSString stringFromDate_(NSDate date) { - final _ret = - _objc_msgSend_755(this.pointer, _sel_stringFromDate_, date.pointer); - return NSString._(_ret, retain: true, release: true); - } - - NSDate? dateFromString_(NSString string) { - final _ret = - _objc_msgSend_564(this.pointer, _sel_dateFromString_, string.pointer); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - static NSString localizedStringFromDate_dateStyle_timeStyle_( - NSDate date, int dstyle, int tstyle) { - final _ret = _objc_msgSend_756( - _class_NSDateFormatter, - _sel_localizedStringFromDate_dateStyle_timeStyle_, - date.pointer, - dstyle, - tstyle); - return NSString._(_ret, retain: true, release: true); - } - - static NSString? dateFormatFromTemplate_options_locale_( - NSString tmplate, int opts, NSLocale? locale) { - final _ret = _objc_msgSend_757( - _class_NSDateFormatter, - _sel_dateFormatFromTemplate_options_locale_, - tmplate.pointer, - opts, - locale?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - static int getDefaultFormatterBehavior() { - return _objc_msgSend_758( - _class_NSDateFormatter, _sel_defaultFormatterBehavior); - } - - static void setDefaultFormatterBehavior(int value) { - return _objc_msgSend_759( - _class_NSDateFormatter, _sel_setDefaultFormatterBehavior_, value); - } - - void setLocalizedDateFormatFromTemplate_(NSString dateFormatTemplate) { - _objc_msgSend_247(this.pointer, _sel_setLocalizedDateFormatFromTemplate_, - dateFormatTemplate.pointer); - } - - NSString get dateFormat { - final _ret = _objc_msgSend_21(this.pointer, _sel_dateFormat); - return NSString._(_ret, retain: true, release: true); - } - - set dateFormat(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setDateFormat_, value.pointer); - } - - int get dateStyle { - return _objc_msgSend_760(this.pointer, _sel_dateStyle); - } - - set dateStyle(int value) { - return _objc_msgSend_761(this.pointer, _sel_setDateStyle_, value); - } - - int get timeStyle { - return _objc_msgSend_760(this.pointer, _sel_timeStyle); - } - - set timeStyle(int value) { - return _objc_msgSend_761(this.pointer, _sel_setTimeStyle_, value); - } - - NSLocale get locale { - final _ret = _objc_msgSend_197(this.pointer, _sel_locale); - return NSLocale._(_ret, retain: true, release: true); - } - - set locale(NSLocale value) { - return _objc_msgSend_762(this.pointer, _sel_setLocale_, value.pointer); - } - - bool get generatesCalendarDates { - return _objc_msgSend_12(this.pointer, _sel_generatesCalendarDates); - } - - set generatesCalendarDates(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setGeneratesCalendarDates_, value); - } - - int get formatterBehavior { - return _objc_msgSend_758(this.pointer, _sel_formatterBehavior); - } - - set formatterBehavior(int value) { - return _objc_msgSend_759(this.pointer, _sel_setFormatterBehavior_, value); - } - - NSTimeZone get timeZone { - final _ret = _objc_msgSend_179(this.pointer, _sel_timeZone); - return NSTimeZone._(_ret, retain: true, release: true); - } - - set timeZone(NSTimeZone value) { - return _objc_msgSend_180(this.pointer, _sel_setTimeZone_, value.pointer); - } - - NSCalendar get calendar { - final _ret = _objc_msgSend_763(this.pointer, _sel_calendar); - return NSCalendar._(_ret, retain: true, release: true); - } - - set calendar(NSCalendar value) { - return _objc_msgSend_799(this.pointer, _sel_setCalendar_, value.pointer); - } - - bool get lenient { - return _objc_msgSend_12(this.pointer, _sel_isLenient); - } - - set lenient(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setLenient_, value); - } - - NSDate? get twoDigitStartDate { - final _ret = _objc_msgSend_183(this.pointer, _sel_twoDigitStartDate); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - set twoDigitStartDate(NSDate? value) { - return _objc_msgSend_800(this.pointer, _sel_setTwoDigitStartDate_, - value?.pointer ?? ffi.nullptr); - } - - NSDate? get defaultDate { - final _ret = _objc_msgSend_183(this.pointer, _sel_defaultDate); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - set defaultDate(NSDate? value) { - return _objc_msgSend_800( - this.pointer, _sel_setDefaultDate_, value?.pointer ?? ffi.nullptr); - } - - NSArray get eraSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_eraSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set eraSymbols(NSArray value) { - return _objc_msgSend_801(this.pointer, _sel_setEraSymbols_, value.pointer); - } - - NSArray get monthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_monthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set monthSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setMonthSymbols_, value.pointer); - } - - NSArray get shortMonthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_shortMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set shortMonthSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setShortMonthSymbols_, value.pointer); - } - - NSArray get weekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_weekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set weekdaySymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setWeekdaySymbols_, value.pointer); - } - - NSArray get shortWeekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_shortWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set shortWeekdaySymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setShortWeekdaySymbols_, value.pointer); - } - - NSString get AMSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_AMSymbol); - return NSString._(_ret, retain: true, release: true); - } - - set AMSymbol(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setAMSymbol_, value.pointer); - } - - NSString get PMSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_PMSymbol); - return NSString._(_ret, retain: true, release: true); - } - - set PMSymbol(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setPMSymbol_, value.pointer); - } - - NSArray get longEraSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_longEraSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set longEraSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setLongEraSymbols_, value.pointer); - } - - NSArray get veryShortMonthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_veryShortMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set veryShortMonthSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setVeryShortMonthSymbols_, value.pointer); - } - - NSArray get standaloneMonthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_standaloneMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set standaloneMonthSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setStandaloneMonthSymbols_, value.pointer); - } - - NSArray get shortStandaloneMonthSymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_shortStandaloneMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set shortStandaloneMonthSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setShortStandaloneMonthSymbols_, value.pointer); - } - - NSArray get veryShortStandaloneMonthSymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_veryShortStandaloneMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set veryShortStandaloneMonthSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setVeryShortStandaloneMonthSymbols_, value.pointer); - } - - NSArray get veryShortWeekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_veryShortWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set veryShortWeekdaySymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setVeryShortWeekdaySymbols_, value.pointer); - } - - NSArray get standaloneWeekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_standaloneWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set standaloneWeekdaySymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setStandaloneWeekdaySymbols_, value.pointer); - } - - NSArray get shortStandaloneWeekdaySymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_shortStandaloneWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set shortStandaloneWeekdaySymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setShortStandaloneWeekdaySymbols_, value.pointer); - } - - NSArray get veryShortStandaloneWeekdaySymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_veryShortStandaloneWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set veryShortStandaloneWeekdaySymbols(NSArray value) { - return _objc_msgSend_801(this.pointer, - _sel_setVeryShortStandaloneWeekdaySymbols_, value.pointer); - } - - NSArray get quarterSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_quarterSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set quarterSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setQuarterSymbols_, value.pointer); - } - - NSArray get shortQuarterSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_shortQuarterSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set shortQuarterSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setShortQuarterSymbols_, value.pointer); - } - - NSArray get standaloneQuarterSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_standaloneQuarterSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set standaloneQuarterSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setStandaloneQuarterSymbols_, value.pointer); - } - - NSArray get shortStandaloneQuarterSymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_shortStandaloneQuarterSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - set shortStandaloneQuarterSymbols(NSArray value) { - return _objc_msgSend_801( - this.pointer, _sel_setShortStandaloneQuarterSymbols_, value.pointer); - } - - NSDate? get gregorianStartDate { - final _ret = _objc_msgSend_183(this.pointer, _sel_gregorianStartDate); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - set gregorianStartDate(NSDate? value) { - return _objc_msgSend_800(this.pointer, _sel_setGregorianStartDate_, - value?.pointer ?? ffi.nullptr); - } - - bool get doesRelativeDateFormatting { - return _objc_msgSend_12(this.pointer, _sel_doesRelativeDateFormatting); - } - - set doesRelativeDateFormatting(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setDoesRelativeDateFormatting_, value); - } - - NSObject initWithDateFormat_allowNaturalLanguage_( - NSString format, bool flag) { - final _ret = _objc_msgSend_30(this.pointer, - _sel_initWithDateFormat_allowNaturalLanguage_, format.pointer, flag); - return NSObject._(_ret, retain: true, release: true); - } - - bool allowsNaturalLanguage() { - return _objc_msgSend_12(this.pointer, _sel_allowsNaturalLanguage); - } - - @override - NSDateFormatter init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSDateFormatter._(_ret, retain: true, release: true); - } - - static NSDateFormatter new1() { - final _ret = _objc_msgSend_2(_class_NSDateFormatter, _sel_new); - return NSDateFormatter._(_ret, retain: false, release: true); - } - - static NSDateFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSDateFormatter, _sel_allocWithZone_, zone); - return NSDateFormatter._(_ret, retain: false, release: true); - } - - static NSDateFormatter alloc() { - final _ret = _objc_msgSend_2(_class_NSDateFormatter, _sel_alloc); - return NSDateFormatter._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSDateFormatter, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSDateFormatter, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSDateFormatter, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSDateFormatter, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSDateFormatter, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSDateFormatter, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSDateFormatter, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSDateFormatter, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSDateFormatter, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSDateFormatter = objc.getClass("NSDateFormatter"); - -class NSFormatter extends NSObject { - NSFormatter._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSFormatter] that points to the same underlying object as [other]. - static NSFormatter castFrom(T other) { - return NSFormatter._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSFormatter] that wraps the given raw object pointer. - static NSFormatter castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFormatter._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSFormatter]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSFormatter); - } - - NSString? stringForObjectValue_(NSObject? obj) { - final _ret = _objc_msgSend_747( - this.pointer, _sel_stringForObjectValue_, obj?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSAttributedString? attributedStringForObjectValue_withDefaultAttributes_( - NSObject obj, NSDictionary? attrs) { - final _ret = _objc_msgSend_748( - this.pointer, - _sel_attributedStringForObjectValue_withDefaultAttributes_, - obj.pointer, - attrs?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSAttributedString._(_ret, retain: true, release: true); - } - - NSString? editingStringForObjectValue_(NSObject obj) { - final _ret = _objc_msgSend_526( - this.pointer, _sel_editingStringForObjectValue_, obj.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - bool getObjectValue_forString_errorDescription_( - ffi.Pointer> obj, - NSString string, - ffi.Pointer> error) { - return _objc_msgSend_749( - this.pointer, - _sel_getObjectValue_forString_errorDescription_, - obj, - string.pointer, - error); - } - - bool isPartialStringValid_newEditingString_errorDescription_( - NSString partialString, - ffi.Pointer> newString, - ffi.Pointer> error) { - return _objc_msgSend_750( - this.pointer, - _sel_isPartialStringValid_newEditingString_errorDescription_, - partialString.pointer, - newString, - error); - } - - bool - isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_( - ffi.Pointer> partialStringPtr, - ffi.Pointer<_NSRange> proposedSelRangePtr, - NSString origString, - _NSRange origSelRange, - ffi.Pointer> error) { - return _objc_msgSend_751( - this.pointer, - _sel_isPartialStringValid_proposedSelectedRange_originalString_originalSelectedRange_errorDescription_, - partialStringPtr, - proposedSelRangePtr, - origString.pointer, - origSelRange, - error); - } - - @override - NSFormatter init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSFormatter._(_ret, retain: true, release: true); - } - - static NSFormatter new1() { - final _ret = _objc_msgSend_2(_class_NSFormatter, _sel_new); - return NSFormatter._(_ret, retain: false, release: true); - } - - static NSFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSFormatter, _sel_allocWithZone_, zone); - return NSFormatter._(_ret, retain: false, release: true); - } - - static NSFormatter alloc() { - final _ret = _objc_msgSend_2(_class_NSFormatter, _sel_alloc); - return NSFormatter._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSFormatter, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSFormatter, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSFormatter, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSFormatter, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSFormatter, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSFormatter, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSFormatter, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSFormatter, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSFormatter, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSFormatter = objc.getClass("NSFormatter"); -late final _sel_stringForObjectValue_ = - objc.registerName("stringForObjectValue:"); -final _objc_msgSend_747 = 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_748 = 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_editingStringForObjectValue_ = - objc.registerName("editingStringForObjectValue:"); -late final _sel_getObjectValue_forString_errorDescription_ = - objc.registerName("getObjectValue:forString:errorDescription:"); -final _objc_msgSend_749 = 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_750 = 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_751 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer<_NSRange>, - ffi.Pointer, - _NSRange, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer<_NSRange>, - ffi.Pointer, - _NSRange, - ffi.Pointer>)>(); - -abstract class NSFormattingContext { - static const int NSFormattingContextUnknown = 0; - static const int NSFormattingContextDynamic = 1; - static const int NSFormattingContextStandalone = 2; - static const int NSFormattingContextListItem = 3; - static const int NSFormattingContextBeginningOfSentence = 4; - static const int NSFormattingContextMiddleOfSentence = 5; -} - -late final _sel_formattingContext = objc.registerName("formattingContext"); -final _objc_msgSend_752 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setFormattingContext_ = - objc.registerName("setFormattingContext:"); -final _objc_msgSend_753 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_getObjectValue_forString_range_error_ = - objc.registerName("getObjectValue:forString:range:error:"); -final _objc_msgSend_754 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer<_NSRange>, - ffi.Pointer>)>>() - .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_755 = 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_dateFromString_ = objc.registerName("dateFromString:"); - -abstract class NSDateFormatterStyle { - static const int NSDateFormatterNoStyle = 0; - static const int NSDateFormatterShortStyle = 1; - static const int NSDateFormatterMediumStyle = 2; - static const int NSDateFormatterLongStyle = 3; - static const int NSDateFormatterFullStyle = 4; -} - -late final _sel_localizedStringFromDate_dateStyle_timeStyle_ = - objc.registerName("localizedStringFromDate:dateStyle:timeStyle:"); -final _objc_msgSend_756 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Int32)>>() - .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_757 = 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)>(); - -abstract class NSDateFormatterBehavior { - static const int NSDateFormatterBehaviorDefault = 0; - static const int NSDateFormatterBehavior10_0 = 1000; - static const int NSDateFormatterBehavior10_4 = 1040; -} - -late final _sel_defaultFormatterBehavior = - objc.registerName("defaultFormatterBehavior"); -final _objc_msgSend_758 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDefaultFormatterBehavior_ = - objc.registerName("setDefaultFormatterBehavior:"); -final _objc_msgSend_759 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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_760 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDateStyle_ = objc.registerName("setDateStyle:"); -final _objc_msgSend_761 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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:"); -final _objc_msgSend_762 = 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:"); - -class NSCalendar extends NSObject { - NSCalendar._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSCalendar] that points to the same underlying object as [other]. - static NSCalendar castFrom(T other) { - return NSCalendar._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSCalendar] that wraps the given raw object pointer. - static NSCalendar castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCalendar._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSCalendar]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSCalendar); - } - - static NSCalendar getCurrentCalendar() { - final _ret = _objc_msgSend_763(_class_NSCalendar, _sel_currentCalendar); - return NSCalendar._(_ret, retain: true, release: true); - } - - static NSCalendar getAutoupdatingCurrentCalendar() { - final _ret = - _objc_msgSend_763(_class_NSCalendar, _sel_autoupdatingCurrentCalendar); - return NSCalendar._(_ret, retain: true, release: true); - } - - static NSCalendar? calendarWithIdentifier_( - NSString calendarIdentifierConstant) { - final _ret = _objc_msgSend_764(_class_NSCalendar, - _sel_calendarWithIdentifier_, calendarIdentifierConstant.pointer); - return _ret.address == 0 - ? null - : NSCalendar._(_ret, retain: true, release: true); - } - - @override - NSCalendar init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSCalendar._(_ret, retain: true, release: true); - } - - NSObject? initWithCalendarIdentifier_(NSString ident) { - final _ret = _objc_msgSend_38( - this.pointer, _sel_initWithCalendarIdentifier_, ident.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSString get calendarIdentifier { - final _ret = _objc_msgSend_21(this.pointer, _sel_calendarIdentifier); - return NSString._(_ret, retain: true, release: true); - } - - NSLocale? get locale { - final _ret = _objc_msgSend_765(this.pointer, _sel_locale); - return _ret.address == 0 - ? null - : NSLocale._(_ret, retain: true, release: true); - } - - set locale(NSLocale? value) { - return _objc_msgSend_766( - this.pointer, _sel_setLocale_, value?.pointer ?? ffi.nullptr); - } - - NSTimeZone get timeZone { - final _ret = _objc_msgSend_179(this.pointer, _sel_timeZone); - return NSTimeZone._(_ret, retain: true, release: true); - } - - set timeZone(NSTimeZone value) { - return _objc_msgSend_180(this.pointer, _sel_setTimeZone_, value.pointer); - } - - int get firstWeekday { - return _objc_msgSend_10(this.pointer, _sel_firstWeekday); - } - - set firstWeekday(int value) { - return _objc_msgSend_516(this.pointer, _sel_setFirstWeekday_, value); - } - - int get minimumDaysInFirstWeek { - return _objc_msgSend_10(this.pointer, _sel_minimumDaysInFirstWeek); - } - - set minimumDaysInFirstWeek(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setMinimumDaysInFirstWeek_, value); - } - - NSArray get eraSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_eraSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get longEraSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_longEraSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get monthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_monthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get shortMonthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_shortMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get veryShortMonthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_veryShortMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get standaloneMonthSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_standaloneMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get shortStandaloneMonthSymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_shortStandaloneMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get veryShortStandaloneMonthSymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_veryShortStandaloneMonthSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get weekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_weekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get shortWeekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_shortWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get veryShortWeekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_veryShortWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get standaloneWeekdaySymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_standaloneWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get shortStandaloneWeekdaySymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_shortStandaloneWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get veryShortStandaloneWeekdaySymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_veryShortStandaloneWeekdaySymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get quarterSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_quarterSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get shortQuarterSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_shortQuarterSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get standaloneQuarterSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_standaloneQuarterSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get shortStandaloneQuarterSymbols { - final _ret = - _objc_msgSend_85(this.pointer, _sel_shortStandaloneQuarterSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - NSString get AMSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_AMSymbol); - return NSString._(_ret, retain: true, release: true); - } - - NSString get PMSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_PMSymbol); - return NSString._(_ret, retain: true, release: true); - } - - void minimumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { - objc.useMsgSendVariants - ? _objc_msgSend_767Stret( - stret, this.pointer, _sel_minimumRangeOfUnit_, unit) - : stret.ref = - _objc_msgSend_767(this.pointer, _sel_minimumRangeOfUnit_, unit); - } - - void maximumRangeOfUnit_(ffi.Pointer<_NSRange> stret, int unit) { - objc.useMsgSendVariants - ? _objc_msgSend_767Stret( - stret, this.pointer, _sel_maximumRangeOfUnit_, unit) - : stret.ref = - _objc_msgSend_767(this.pointer, _sel_maximumRangeOfUnit_, unit); - } - - void rangeOfUnit_inUnit_forDate_( - ffi.Pointer<_NSRange> stret, int smaller, int larger, NSDate date) { - objc.useMsgSendVariants - ? _objc_msgSend_768Stret(stret, this.pointer, - _sel_rangeOfUnit_inUnit_forDate_, smaller, larger, date.pointer) - : stret.ref = _objc_msgSend_768(this.pointer, - _sel_rangeOfUnit_inUnit_forDate_, smaller, larger, date.pointer); - } - - int ordinalityOfUnit_inUnit_forDate_(int smaller, int larger, NSDate date) { - return _objc_msgSend_769(this.pointer, - _sel_ordinalityOfUnit_inUnit_forDate_, smaller, larger, date.pointer); - } - - bool rangeOfUnit_startDate_interval_forDate_( - int unit, - ffi.Pointer> datep, - ffi.Pointer tip, - NSDate date) { - return _objc_msgSend_770( - this.pointer, - _sel_rangeOfUnit_startDate_interval_forDate_, - unit, - datep, - tip, - date.pointer); - } - - NSDate? dateFromComponents_(NSDateComponents comps) { - final _ret = _objc_msgSend_778( - this.pointer, _sel_dateFromComponents_, comps.pointer); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - NSDateComponents components_fromDate_(int unitFlags, NSDate date) { - final _ret = _objc_msgSend_779( - this.pointer, _sel_components_fromDate_, unitFlags, date.pointer); - return NSDateComponents._(_ret, retain: true, release: true); - } - - NSDate? dateByAddingComponents_toDate_options_( - NSDateComponents comps, NSDate date, int opts) { - final _ret = _objc_msgSend_780( - this.pointer, - _sel_dateByAddingComponents_toDate_options_, - comps.pointer, - date.pointer, - opts); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - NSDateComponents components_fromDate_toDate_options_( - int unitFlags, NSDate startingDate, NSDate resultDate, int opts) { - final _ret = _objc_msgSend_781( - this.pointer, - _sel_components_fromDate_toDate_options_, - unitFlags, - startingDate.pointer, - resultDate.pointer, - opts); - return NSDateComponents._(_ret, retain: true, release: true); - } - - void getEra_year_month_day_fromDate_( - ffi.Pointer eraValuePointer, - ffi.Pointer yearValuePointer, - ffi.Pointer monthValuePointer, - ffi.Pointer dayValuePointer, - NSDate date) { - _objc_msgSend_782( - this.pointer, - _sel_getEra_year_month_day_fromDate_, - eraValuePointer, - yearValuePointer, - monthValuePointer, - dayValuePointer, - date.pointer); - } - - void getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_( - ffi.Pointer eraValuePointer, - ffi.Pointer yearValuePointer, - ffi.Pointer weekValuePointer, - ffi.Pointer weekdayValuePointer, - NSDate date) { - _objc_msgSend_782( - this.pointer, - _sel_getEra_yearForWeekOfYear_weekOfYear_weekday_fromDate_, - eraValuePointer, - yearValuePointer, - weekValuePointer, - weekdayValuePointer, - date.pointer); - } - - void getHour_minute_second_nanosecond_fromDate_( - ffi.Pointer hourValuePointer, - ffi.Pointer minuteValuePointer, - ffi.Pointer secondValuePointer, - ffi.Pointer nanosecondValuePointer, - NSDate date) { - _objc_msgSend_782( - this.pointer, - _sel_getHour_minute_second_nanosecond_fromDate_, - hourValuePointer, - minuteValuePointer, - secondValuePointer, - nanosecondValuePointer, - date.pointer); - } - - int component_fromDate_(int unit, NSDate date) { - return _objc_msgSend_783( - this.pointer, _sel_component_fromDate_, unit, date.pointer); - } - - 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_784( - this.pointer, - _sel_dateWithEra_year_month_day_hour_minute_second_nanosecond_, - eraValue, - yearValue, - monthValue, - dayValue, - hourValue, - minuteValue, - secondValue, - nanosecondValue); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - 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_784( - this.pointer, - _sel_dateWithEra_yearForWeekOfYear_weekOfYear_weekday_hour_minute_second_nanosecond_, - eraValue, - yearValue, - weekValue, - weekdayValue, - hourValue, - minuteValue, - secondValue, - nanosecondValue); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - NSDate startOfDayForDate_(NSDate date) { - final _ret = - _objc_msgSend_168(this.pointer, _sel_startOfDayForDate_, date.pointer); - return NSDate._(_ret, retain: true, release: true); - } - - NSDateComponents componentsInTimeZone_fromDate_( - NSTimeZone timezone, NSDate date) { - final _ret = _objc_msgSend_785(this.pointer, - _sel_componentsInTimeZone_fromDate_, timezone.pointer, date.pointer); - return NSDateComponents._(_ret, retain: true, release: true); - } - - int compareDate_toDate_toUnitGranularity_( - NSDate date1, NSDate date2, int unit) { - return _objc_msgSend_786( - this.pointer, - _sel_compareDate_toDate_toUnitGranularity_, - date1.pointer, - date2.pointer, - unit); - } - - bool isDate_equalToDate_toUnitGranularity_( - NSDate date1, NSDate date2, int unit) { - return _objc_msgSend_787( - this.pointer, - _sel_isDate_equalToDate_toUnitGranularity_, - date1.pointer, - date2.pointer, - unit); - } - - bool isDate_inSameDayAsDate_(NSDate date1, NSDate date2) { - return _objc_msgSend_788(this.pointer, _sel_isDate_inSameDayAsDate_, - date1.pointer, date2.pointer); - } - - bool isDateInToday_(NSDate date) { - return _objc_msgSend_170(this.pointer, _sel_isDateInToday_, date.pointer); - } - - bool isDateInYesterday_(NSDate date) { - return _objc_msgSend_170( - this.pointer, _sel_isDateInYesterday_, date.pointer); - } - - bool isDateInTomorrow_(NSDate date) { - return _objc_msgSend_170( - this.pointer, _sel_isDateInTomorrow_, date.pointer); - } - - bool isDateInWeekend_(NSDate date) { - return _objc_msgSend_170(this.pointer, _sel_isDateInWeekend_, date.pointer); - } - - bool rangeOfWeekendStartDate_interval_containingDate_( - ffi.Pointer> datep, - ffi.Pointer tip, - NSDate date) { - return _objc_msgSend_789( - this.pointer, - _sel_rangeOfWeekendStartDate_interval_containingDate_, - datep, - tip, - date.pointer); - } - - bool nextWeekendStartDate_interval_options_afterDate_( - ffi.Pointer> datep, - ffi.Pointer tip, - int options, - NSDate date) { - return _objc_msgSend_790( - this.pointer, - _sel_nextWeekendStartDate_interval_options_afterDate_, - datep, - tip, - options, - date.pointer); - } - - NSDateComponents components_fromDateComponents_toDateComponents_options_( - int unitFlags, - NSDateComponents startingDateComp, - NSDateComponents resultDateComp, - int options) { - final _ret = _objc_msgSend_791( - this.pointer, - _sel_components_fromDateComponents_toDateComponents_options_, - unitFlags, - startingDateComp.pointer, - resultDateComp.pointer, - options); - return NSDateComponents._(_ret, retain: true, release: true); - } - - NSDate? dateByAddingUnit_value_toDate_options_( - int unit, int value, NSDate date, int options) { - final _ret = _objc_msgSend_792( - this.pointer, - _sel_dateByAddingUnit_value_toDate_options_, - unit, - value, - date.pointer, - options); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - void enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_( - NSDate start, - NSDateComponents comps, - int opts, - ObjCBlock_ffiVoid_NSDate_bool_bool block) { - _objc_msgSend_793( - this.pointer, - _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_, - start.pointer, - comps.pointer, - opts, - block.pointer); - } - - NSDate? nextDateAfterDate_matchingComponents_options_( - NSDate date, NSDateComponents comps, int options) { - final _ret = _objc_msgSend_794( - this.pointer, - _sel_nextDateAfterDate_matchingComponents_options_, - date.pointer, - comps.pointer, - options); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - NSDate? nextDateAfterDate_matchingUnit_value_options_( - NSDate date, int unit, int value, int options) { - final _ret = _objc_msgSend_795( - this.pointer, - _sel_nextDateAfterDate_matchingUnit_value_options_, - date.pointer, - unit, - value, - options); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - NSDate? nextDateAfterDate_matchingHour_minute_second_options_(NSDate date, - int hourValue, int minuteValue, int secondValue, int options) { - final _ret = _objc_msgSend_796( - this.pointer, - _sel_nextDateAfterDate_matchingHour_minute_second_options_, - date.pointer, - hourValue, - minuteValue, - secondValue, - options); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - NSDate? dateBySettingUnit_value_ofDate_options_( - int unit, int v, NSDate date, int opts) { - final _ret = _objc_msgSend_792( - this.pointer, - _sel_dateBySettingUnit_value_ofDate_options_, - unit, - v, - date.pointer, - opts); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - NSDate? dateBySettingHour_minute_second_ofDate_options_( - int h, int m, int s, NSDate date, int opts) { - final _ret = _objc_msgSend_797( - this.pointer, - _sel_dateBySettingHour_minute_second_ofDate_options_, - h, - m, - s, - date.pointer, - opts); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - bool date_matchesComponents_(NSDate date, NSDateComponents components) { - return _objc_msgSend_798(this.pointer, _sel_date_matchesComponents_, - date.pointer, components.pointer); - } - - static NSCalendar new1() { - final _ret = _objc_msgSend_2(_class_NSCalendar, _sel_new); - return NSCalendar._(_ret, retain: false, release: true); - } - - static NSCalendar allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSCalendar, _sel_allocWithZone_, zone); - return NSCalendar._(_ret, retain: false, release: true); - } - - static NSCalendar alloc() { - final _ret = _objc_msgSend_2(_class_NSCalendar, _sel_alloc); - return NSCalendar._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSCalendar, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSCalendar, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSCalendar, _sel_accessInstanceVariablesDirectly); - } + 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_297 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_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); +final _ObjCBlock_bool_NSURL_NSError_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_bool_NSURL_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_bool_NSURL_NSError_registerClosure( + bool Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_bool_NSURL_NSError_closureRegistryIndex; + _ObjCBlock_bool_NSURL_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSCalendar, _sel_useStoredAccessor); - } +bool _ObjCBlock_bool_NSURL_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_NSURL_NSError_closureRegistry[block.ref.target.address]!( + arg0, arg1); - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSCalendar, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } +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); - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSCalendar, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + /// 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); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSCalendar, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.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_bool_NSURL_NSError.fromFunctionPointer( + ffi.Pointer arg0, ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _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; - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSCalendar, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_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. + ObjCBlock_bool_NSURL_NSError.fromFunction(bool Function(objc.NSURL, objc.NSError) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_NSURL_NSError_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_NSURL_NSError_registerClosure( + (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; - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSCalendar, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } + 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 _class_NSCalendar = objc.getClass("NSCalendar"); -late final _sel_currentCalendar = objc.registerName("currentCalendar"); -final _objc_msgSend_763 = objc.msgSendPointer +late final _sel_enumeratorAtURL_includingPropertiesForKeys_options_errorHandler_ = + objc.registerName( + "enumeratorAtURL:includingPropertiesForKeys:options:errorHandler:"); +final _objc_msgSend_298 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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_764 = objc.msgSendPointer + 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_299 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -37624,579 +13240,741 @@ final _objc_msgSend_764 = objc.msgSendPointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithCalendarIdentifier_ = - objc.registerName("initWithCalendarIdentifier:"); -final _objc_msgSend_765 = objc.msgSendPointer +late final _sel_createFileAtPath_contents_attributes_ = + objc.registerName("createFileAtPath:contents:attributes:"); +final _objc_msgSend_300 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_766 = objc.msgSendPointer + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_fileSystemRepresentationWithPath_ = + objc.registerName("fileSystemRepresentationWithPath:"); +final _objc_msgSend_301 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_firstWeekday = objc.registerName("firstWeekday"); -late final _sel_setFirstWeekday_ = objc.registerName("setFirstWeekday:"); -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"); +late final _sel_stringWithFileSystemRepresentation_length_ = + objc.registerName("stringWithFileSystemRepresentation:length:"); +final _objc_msgSend_302 = 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)>(); -abstract class NSCalendarUnit { - static const int NSCalendarUnitEra = 2; - static const int NSCalendarUnitYear = 4; - static const int NSCalendarUnitMonth = 8; - static const int NSCalendarUnitDay = 16; - static const int NSCalendarUnitHour = 32; - static const int NSCalendarUnitMinute = 64; - static const int NSCalendarUnitSecond = 128; - static const int NSCalendarUnitWeekday = 512; - static const int NSCalendarUnitWeekdayOrdinal = 1024; - static const int NSCalendarUnitQuarter = 2048; - static const int NSCalendarUnitWeekOfMonth = 4096; - static const int NSCalendarUnitWeekOfYear = 8192; - static const int NSCalendarUnitYearForWeekOfYear = 16384; - static const int NSCalendarUnitNanosecond = 32768; - static const int NSCalendarUnitCalendar = 1048576; - static const int NSCalendarUnitTimeZone = 2097152; - static const int NSEraCalendarUnit = 2; - static const int NSYearCalendarUnit = 4; - static const int NSMonthCalendarUnit = 8; - static const int NSDayCalendarUnit = 16; - static const int NSHourCalendarUnit = 32; - static const int NSMinuteCalendarUnit = 64; - static const int NSSecondCalendarUnit = 128; - static const int NSWeekCalendarUnit = 256; - static const int NSWeekdayCalendarUnit = 512; - static const int NSWeekdayOrdinalCalendarUnit = 1024; - static const int NSQuarterCalendarUnit = 2048; - static const int NSWeekOfMonthCalendarUnit = 4096; - static const int NSWeekOfYearCalendarUnit = 8192; - static const int NSYearForWeekOfYearCalendarUnit = 16384; - static const int NSCalendarCalendarUnit = 1048576; - static const int NSTimeZoneCalendarUnit = 2097152; +abstract class NSFileManagerItemReplacementOptions { + static const int NSFileManagerItemReplacementUsingNewMetadataOnly = 1; + static const int NSFileManagerItemReplacementWithoutDeletingBackupItem = 2; } -late final _sel_minimumRangeOfUnit_ = objc.registerName("minimumRangeOfUnit:"); -final _objc_msgSend_767 = objc.msgSendPointer +late final _sel_replaceItemAtURL_withItemAtURL_backupItemName_options_resultingItemURL_error_ = + objc.registerName( + "replaceItemAtURL:withItemAtURL:backupItemName:options:resultingItemURL:error:"); +final _objc_msgSend_303 = objc.msgSendPointer .cast< ffi.NativeFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>, + ffi.Pointer>)>>() .asFunction< - _NSRange Function(ffi.Pointer, - ffi.Pointer, int)>(); -final _objc_msgSend_767Stret = objc.msgSendStretPointer + 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_304 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Int32)>>() + ffi.Bool, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() .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_768 = objc.msgSendPointer + bool Function( + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_isUbiquitousItemAtURL_ = + objc.registerName("isUbiquitousItemAtURL:"); +final _objc_msgSend_305 = objc.msgSendPointer .cast< ffi.NativeFunction< - _NSRange Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Int32, ffi.Pointer)>>() .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer)>(); -final _objc_msgSend_768Stret = objc.msgSendStretPointer + 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_306 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Int32, 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_769 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_URLForPublishingUbiquitousItemAtURL_expirationDate_error_ = objc + .registerName("URLForPublishingUbiquitousItemAtURL:expirationDate:error:"); +final _objc_msgSend_307 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Int32, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() .asFunction< - int Function( + ffi.Pointer 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_770 = objc.msgSendPointer + 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); +final _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureRegistry[ + block.ref.target.address]!(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.newBlock( + _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.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( + (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._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_NSError_registerClosure( + (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.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_308 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer>, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - bool Function( + void Function( ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer>, - 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:"); -class NSDateComponents extends NSObject { - NSDateComponents._(ffi.Pointer pointer, +class NSHTTPCookieStorage extends objc.NSObject { + NSHTTPCookieStorage._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSDateComponents] that points to the same underlying object as [other]. - static NSDateComponents castFrom(T other) { - return NSDateComponents._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSHTTPCookieStorage] that points to the same underlying object as [other]. + NSHTTPCookieStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSDateComponents] that wraps the given raw object pointer. - static NSDateComponents castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSDateComponents._(other, retain: retain, release: release); - } + /// 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 [NSDateComponents]. + /// Returns whether [obj] is an instance of [NSHTTPCookieStorage]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSDateComponents); + obj.pointer, _sel_isKindOfClass_, _class_NSHTTPCookieStorage); } - NSCalendar? get calendar { - final _ret = _objc_msgSend_771(this.pointer, _sel_calendar); - return _ret.address == 0 - ? null - : NSCalendar._(_ret, retain: true, release: true); + static NSHTTPCookieStorage getSharedHTTPCookieStorage() { + final _ret = _objc_msgSend_309( + _class_NSHTTPCookieStorage, _sel_sharedHTTPCookieStorage); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - set calendar(NSCalendar? value) { - return _objc_msgSend_772( - this.pointer, _sel_setCalendar_, value?.pointer ?? ffi.nullptr); + static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( + objc.NSString identifier) { + final _ret = _objc_msgSend_310( + _class_NSHTTPCookieStorage, + _sel_sharedCookieStorageForGroupContainerIdentifier_, + identifier.pointer); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - NSTimeZone? get timeZone { - final _ret = _objc_msgSend_773(this.pointer, _sel_timeZone); + objc.NSArray? get cookies { + final _ret = _objc_msgSend_69(this.pointer, _sel_cookies); return _ret.address == 0 ? null - : NSTimeZone._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set timeZone(NSTimeZone? value) { - return _objc_msgSend_774( - this.pointer, _sel_setTimeZone_, value?.pointer ?? ffi.nullptr); + void setCookie_(NSHTTPCookie cookie) { + _objc_msgSend_315(this.pointer, _sel_setCookie_, cookie.pointer); } - int get era { - return _objc_msgSend_83(this.pointer, _sel_era); + void deleteCookie_(NSHTTPCookie cookie) { + _objc_msgSend_315(this.pointer, _sel_deleteCookie_, cookie.pointer); } - set era(int value) { - return _objc_msgSend_635(this.pointer, _sel_setEra_, value); + void removeCookiesSinceDate_(objc.NSDate date) { + _objc_msgSend_246(this.pointer, _sel_removeCookiesSinceDate_, date.pointer); } - int get year { - return _objc_msgSend_83(this.pointer, _sel_year); + objc.NSArray? cookiesForURL_(objc.NSURL URL) { + final _ret = + _objc_msgSend_316(this.pointer, _sel_cookiesForURL_, URL.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set year(int value) { - return _objc_msgSend_635(this.pointer, _sel_setYear_, value); + void setCookies_forURL_mainDocumentURL_( + objc.NSArray cookies, objc.NSURL? URL, objc.NSURL? mainDocumentURL) { + _objc_msgSend_317( + this.pointer, + _sel_setCookies_forURL_mainDocumentURL_, + cookies.pointer, + URL?.pointer ?? ffi.nullptr, + mainDocumentURL?.pointer ?? ffi.nullptr); } - int get month { - return _objc_msgSend_83(this.pointer, _sel_month); + int get cookieAcceptPolicy { + return _objc_msgSend_318(this.pointer, _sel_cookieAcceptPolicy); } - set month(int value) { - return _objc_msgSend_635(this.pointer, _sel_setMonth_, value); + set cookieAcceptPolicy(int value) { + return _objc_msgSend_319(this.pointer, _sel_setCookieAcceptPolicy_, value); } - int get day { - return _objc_msgSend_83(this.pointer, _sel_day); + objc.NSArray sortedCookiesUsingDescriptors_(objc.NSArray sortOrder) { + final _ret = _objc_msgSend_67( + this.pointer, _sel_sortedCookiesUsingDescriptors_, sortOrder.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set day(int value) { - return _objc_msgSend_635(this.pointer, _sel_setDay_, value); + void storeCookies_forTask_(objc.NSArray cookies, NSURLSessionTask task) { + _objc_msgSend_353(this.pointer, _sel_storeCookies_forTask_, cookies.pointer, + task.pointer); } - int get hour { - return _objc_msgSend_83(this.pointer, _sel_hour); + void getCookiesForTask_completionHandler_( + NSURLSessionTask task, ObjCBlock_ffiVoid_NSArray completionHandler) { + _objc_msgSend_354(this.pointer, _sel_getCookiesForTask_completionHandler_, + task.pointer, completionHandler.pointer); } - set hour(int value) { - return _objc_msgSend_635(this.pointer, _sel_setHour_, value); + @override + NSHTTPCookieStorage init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - int get minute { - return _objc_msgSend_83(this.pointer, _sel_minute); + static NSHTTPCookieStorage new1() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookieStorage, _sel_new); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); } - set minute(int value) { - return _objc_msgSend_635(this.pointer, _sel_setMinute_, value); + static NSHTTPCookieStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSHTTPCookieStorage, _sel_allocWithZone_, zone); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); } - int get second { - return _objc_msgSend_83(this.pointer, _sel_second); + static NSHTTPCookieStorage alloc() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookieStorage, _sel_alloc); + return NSHTTPCookieStorage.castFromPointer(_ret, + retain: false, release: true); } - set second(int value) { - return _objc_msgSend_635(this.pointer, _sel_setSecond_, value); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSHTTPCookieStorage, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - int get nanosecond { - return _objc_msgSend_83(this.pointer, _sel_nanosecond); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSHTTPCookieStorage, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set nanosecond(int value) { - return _objc_msgSend_635(this.pointer, _sel_setNanosecond_, value); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSHTTPCookieStorage, _sel_accessInstanceVariablesDirectly); } - int get weekday { - return _objc_msgSend_83(this.pointer, _sel_weekday); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSHTTPCookieStorage, _sel_useStoredAccessor); } - set weekday(int value) { - return _objc_msgSend_635(this.pointer, _sel_setWeekday_, value); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSHTTPCookieStorage, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - int get weekdayOrdinal { - return _objc_msgSend_83(this.pointer, _sel_weekdayOrdinal); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSHTTPCookieStorage, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set weekdayOrdinal(int value) { - return _objc_msgSend_635(this.pointer, _sel_setWeekdayOrdinal_, value); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSHTTPCookieStorage, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - int get quarter { - return _objc_msgSend_83(this.pointer, _sel_quarter); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSHTTPCookieStorage, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set quarter(int value) { - return _objc_msgSend_635(this.pointer, _sel_setQuarter_, value); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSHTTPCookieStorage, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - int get weekOfMonth { - return _objc_msgSend_83(this.pointer, _sel_weekOfMonth); +late final _class_NSHTTPCookieStorage = objc.getClass("NSHTTPCookieStorage"); +late final _sel_sharedHTTPCookieStorage = + objc.registerName("sharedHTTPCookieStorage"); +final _objc_msgSend_309 = 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_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_cookies = objc.registerName("cookies"); + +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); } - set weekOfMonth(int value) { - return _objc_msgSend_635(this.pointer, _sel_setWeekOfMonth_, value); + NSHTTPCookie? initWithProperties_(objc.NSDictionary properties) { + final _ret = _objc_msgSend_311( + this.pointer, _sel_initWithProperties_, properties.pointer); + return _ret.address == 0 + ? null + : NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } - int get weekOfYear { - return _objc_msgSend_83(this.pointer, _sel_weekOfYear); + static NSHTTPCookie? cookieWithProperties_(objc.NSDictionary properties) { + final _ret = _objc_msgSend_312( + _class_NSHTTPCookie, _sel_cookieWithProperties_, properties.pointer); + return _ret.address == 0 + ? null + : NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } - set weekOfYear(int value) { - return _objc_msgSend_635(this.pointer, _sel_setWeekOfYear_, value); + static objc.NSDictionary requestHeaderFieldsWithCookies_( + objc.NSArray cookies) { + final _ret = _objc_msgSend_313(_class_NSHTTPCookie, + _sel_requestHeaderFieldsWithCookies_, cookies.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - int get yearForWeekOfYear { - return _objc_msgSend_83(this.pointer, _sel_yearForWeekOfYear); + static objc.NSArray cookiesWithResponseHeaderFields_forURL_( + objc.NSDictionary headerFields, objc.NSURL URL) { + final _ret = _objc_msgSend_314( + _class_NSHTTPCookie, + _sel_cookiesWithResponseHeaderFields_forURL_, + headerFields.pointer, + URL.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set yearForWeekOfYear(int value) { - return _objc_msgSend_635(this.pointer, _sel_setYearForWeekOfYear_, value); + objc.NSDictionary? get properties { + final _ret = _objc_msgSend_65(this.pointer, _sel_properties); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - bool get leapMonth { - return _objc_msgSend_12(this.pointer, _sel_isLeapMonth); + int get version { + return _objc_msgSend_29(this.pointer, _sel_version); } - set leapMonth(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setLeapMonth_, value); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString get value { + final _ret = _objc_msgSend_12(this.pointer, _sel_value); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSDate? get date { - final _ret = _objc_msgSend_183(this.pointer, _sel_date); + objc.NSDate? get expiresDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_expiresDate); return _ret.address == 0 ? null - : NSDate._(_ret, retain: true, release: true); + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - int week() { - return _objc_msgSend_83(this.pointer, _sel_week); + bool get sessionOnly { + return _objc_msgSend_7(this.pointer, _sel_isSessionOnly); } - void setWeek_(int v) { - _objc_msgSend_423(this.pointer, _sel_setWeek_, v); + objc.NSString get domain { + final _ret = _objc_msgSend_12(this.pointer, _sel_domain); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void setValue_forComponent_(int value, int unit) { - _objc_msgSend_775(this.pointer, _sel_setValue_forComponent_, value, unit); + objc.NSString get path { + final _ret = _objc_msgSend_12(this.pointer, _sel_path); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int valueForComponent_(int unit) { - return _objc_msgSend_776(this.pointer, _sel_valueForComponent_, unit); + bool get secure { + return _objc_msgSend_7(this.pointer, _sel_isSecure); } - bool get validDate { - return _objc_msgSend_12(this.pointer, _sel_isValidDate); + bool get HTTPOnly { + return _objc_msgSend_7(this.pointer, _sel_isHTTPOnly); } - bool isValidDateInCalendar_(NSCalendar calendar) { - return _objc_msgSend_777( - this.pointer, _sel_isValidDateInCalendar_, calendar.pointer); + objc.NSString? get comment { + final _ret = _objc_msgSend_13(this.pointer, _sel_comment); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSURL? get commentURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_commentURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray? get portList { + final _ret = _objc_msgSend_69(this.pointer, _sel_portList); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString? get sameSitePolicy { + final _ret = _objc_msgSend_13(this.pointer, _sel_sameSitePolicy); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } @override - NSDateComponents init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSDateComponents._(_ret, retain: true, release: true); + NSHTTPCookie init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSHTTPCookie.castFromPointer(_ret, retain: true, release: true); } - static NSDateComponents new1() { - final _ret = _objc_msgSend_2(_class_NSDateComponents, _sel_new); - return NSDateComponents._(_ret, retain: false, release: true); + static NSHTTPCookie new1() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookie, _sel_new); + return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } - static NSDateComponents allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSHTTPCookie allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSDateComponents, _sel_allocWithZone_, zone); - return NSDateComponents._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSHTTPCookie, _sel_allocWithZone_, zone); + return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } - static NSDateComponents alloc() { - final _ret = _objc_msgSend_2(_class_NSDateComponents, _sel_alloc); - return NSDateComponents._(_ret, retain: false, release: true); + static NSHTTPCookie alloc() { + final _ret = _objc_msgSend_40(_class_NSHTTPCookie, _sel_alloc); + return NSHTTPCookie.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSDateComponents, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSHTTPCookie, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSDateComponents, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSHTTPCookie, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSDateComponents, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSHTTPCookie, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSDateComponents, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSHTTPCookie, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSDateComponents, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSHTTPCookie, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSDateComponents, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSHTTPCookie, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSDateComponents, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSHTTPCookie, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSDateComponents, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSHTTPCookie, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSDateComponents, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSHTTPCookie, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSDateComponents = objc.getClass("NSDateComponents"); -late final _sel_calendar = objc.registerName("calendar"); -final _objc_msgSend_771 = 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_772 = 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_773 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_774 = 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:"); -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_week = objc.registerName("week"); -late final _sel_setWeek_ = objc.registerName("setWeek:"); -late final _sel_setValue_forComponent_ = - objc.registerName("setValue:forComponent:"); -final _objc_msgSend_775 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Long, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int, int)>(); -late final _sel_valueForComponent_ = objc.registerName("valueForComponent:"); -final _objc_msgSend_776 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Long Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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_777 = objc.msgSendPointer +late final _class_NSHTTPCookie = objc.getClass("NSHTTPCookie"); +late final _sel_initWithProperties_ = objc.registerName("initWithProperties:"); +final _objc_msgSend_311 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - bool Function(ffi.Pointer, + instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_dateFromComponents_ = objc.registerName("dateFromComponents:"); -final _objc_msgSend_778 = objc.msgSendPointer +late final _sel_cookieWithProperties_ = + objc.registerName("cookieWithProperties:"); +final _objc_msgSend_312 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -38206,148 +13984,21 @@ final _objc_msgSend_778 = objc.msgSendPointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_components_fromDate_ = - objc.registerName("components:fromDate:"); -final _objc_msgSend_779 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>(); - -abstract class NSCalendarOptions { - static const int NSCalendarWrapComponents = 1; - static const int NSCalendarMatchStrictly = 2; - static const int NSCalendarSearchBackwards = 4; - static const int NSCalendarMatchPreviousTimePreservingSmallerUnits = 256; - static const int NSCalendarMatchNextTimePreservingSmallerUnits = 512; - static const int NSCalendarMatchNextTime = 1024; - static const int NSCalendarMatchFirst = 4096; - static const int NSCalendarMatchLast = 8192; -} - -late final _sel_dateByAddingComponents_toDate_options_ = - objc.registerName("dateByAddingComponents:toDate:options:"); -final _objc_msgSend_780 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .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_781 = objc.msgSendPointer +late final _sel_requestHeaderFieldsWithCookies_ = + objc.registerName("requestHeaderFieldsWithCookies:"); +final _objc_msgSend_313 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .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_782 = 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_783 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Long Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, 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_784 = 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:"); -final _objc_msgSend_785 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cookiesWithResponseHeaderFields_forURL_ = + objc.registerName("cookiesWithResponseHeaderFields:forURL:"); +final _objc_msgSend_314 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -38361,3041 +14012,4011 @@ final _objc_msgSend_785 = objc.msgSendPointer ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_compareDate_toDate_toUnitGranularity_ = - objc.registerName("compareDate:toDate:toUnitGranularity:"); -final _objc_msgSend_786 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .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_787 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_isDate_inSameDayAsDate_ = - objc.registerName("isDate:inSameDayAsDate:"); -final _objc_msgSend_788 = 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_789 = objc.msgSendPointer +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_315 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void 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_790 = objc.msgSendPointer + 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_316 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer>, - ffi.Pointer, - ffi.Int32, 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_791 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCookies_forURL_mainDocumentURL_ = + objc.registerName("setCookies:forURL:mainDocumentURL:"); +final _objc_msgSend_317 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, ffi.Pointer, ffi.Pointer, - ffi.Int32)>>() + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void 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_792 = objc.msgSendPointer + ffi.Pointer)>(); + +abstract class NSHTTPCookieAcceptPolicy { + static const int NSHTTPCookieAcceptPolicyAlways = 0; + static const int NSHTTPCookieAcceptPolicyNever = 1; + static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; +} + +late final _sel_cookieAcceptPolicy = objc.registerName("cookieAcceptPolicy"); +final _objc_msgSend_318 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Long, - ffi.Pointer, - ffi.Int32)>>() + ffi.Int32 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) => - 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); -final _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry = , bool, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( - void Function(ffi.Pointer, bool, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCookieAcceptPolicy_ = + objc.registerName("setCookieAcceptPolicy:"); +final _objc_msgSend_319 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_sortedCookiesUsingDescriptors_ = + objc.registerName("sortedCookiesUsingDescriptors:"); + +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); + } + + int get taskIdentifier { + return _objc_msgSend_29(this.pointer, _sel_taskIdentifier); + } + + NSURLRequest? get originalRequest { + final _ret = _objc_msgSend_343(this.pointer, _sel_originalRequest); + return _ret.address == 0 + ? null + : NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + NSURLRequest? get currentRequest { + final _ret = _objc_msgSend_343(this.pointer, _sel_currentRequest); + return _ret.address == 0 + ? null + : NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + NSURLResponse? get response { + final _ret = _objc_msgSend_346(this.pointer, _sel_response); + return _ret.address == 0 + ? null + : NSURLResponse.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); + } + + objc.NSProgress get progress { + final _ret = _objc_msgSend_347(this.pointer, _sel_progress); + return objc.NSProgress.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSDate? get earliestBeginDate { + final _ret = _objc_msgSend_116(this.pointer, _sel_earliestBeginDate); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); + } + + set earliestBeginDate(objc.NSDate? value) { + return _objc_msgSend_162(this.pointer, _sel_setEarliestBeginDate_, + value?.pointer ?? ffi.nullptr); + } + + int get countOfBytesClientExpectsToSend { + return _objc_msgSend_348( + this.pointer, _sel_countOfBytesClientExpectsToSend); + } + + set countOfBytesClientExpectsToSend(int value) { + return _objc_msgSend_349( + this.pointer, _sel_setCountOfBytesClientExpectsToSend_, value); + } + + int get countOfBytesClientExpectsToReceive { + return _objc_msgSend_348( + this.pointer, _sel_countOfBytesClientExpectsToReceive); + } + + set countOfBytesClientExpectsToReceive(int value) { + return _objc_msgSend_349( + this.pointer, _sel_setCountOfBytesClientExpectsToReceive_, value); + } + + int get countOfBytesSent { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesSent); + } + + int get countOfBytesReceived { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesReceived); + } + + int get countOfBytesExpectedToSend { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesExpectedToSend); + } + + int get countOfBytesExpectedToReceive { + return _objc_msgSend_348(this.pointer, _sel_countOfBytesExpectedToReceive); + } + + objc.NSString? get taskDescription { + final _ret = _objc_msgSend_13(this.pointer, _sel_taskDescription); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set taskDescription(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setTaskDescription_, value?.pointer ?? ffi.nullptr); + } + + void cancel() { + _objc_msgSend_82(this.pointer, _sel_cancel); + } + + int get state { + return _objc_msgSend_350(this.pointer, _sel_state); + } + + objc.NSError? get error { + final _ret = _objc_msgSend_328(this.pointer, _sel_error); + return _ret.address == 0 + ? null + : objc.NSError.castFromPointer(_ret, retain: true, release: true); + } + + void suspend() { + _objc_msgSend_82(this.pointer, _sel_suspend); + } + + void resume() { + _objc_msgSend_82(this.pointer, _sel_resume); + } + + double get priority { + return objc.useMsgSendVariants + ? _objc_msgSend_351Fpret(this.pointer, _sel_priority) + : _objc_msgSend_351(this.pointer, _sel_priority); + } + + set priority(double value) { + return _objc_msgSend_352(this.pointer, _sel_setPriority_, value); + } + + bool get prefersIncrementalDelivery { + return _objc_msgSend_7(this.pointer, _sel_prefersIncrementalDelivery); + } + + set prefersIncrementalDelivery(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setPrefersIncrementalDelivery_, value); + } + + @override + NSURLSessionTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); + } + + static NSURLSessionTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionTask, _sel_new); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLSessionTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLSessionTask, _sel_allocWithZone_, zone); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLSessionTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionTask, _sel_alloc); + return NSURLSessionTask.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionTask, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLSessionTask, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLSessionTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } } -void _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); +late final _class_NSURLSessionTask = objc.getClass("NSURLSessionTask"); +late final _sel_taskIdentifier = objc.registerName("taskIdentifier"); -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); +class NSURLRequest extends objc.NSObject { + NSURLRequest._(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_NSDate_bool_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSDate_bool_bool._(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); } - /// 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.newBlock( - _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 NSURLRequest requestWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_320( + _class_NSURLRequest, _sel_requestWithURL_, URL.pointer); + return NSURLRequest.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. - ObjCBlock_ffiVoid_NSDate_bool_bool.fromFunction( - void Function(NSDate?, bool, ffi.Pointer) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDate_bool_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSDate._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.Pointer? _dartFuncTrampoline; + static bool getSupportsSecureCoding() { + return _objc_msgSend_7(_class_NSURLRequest, _sel_supportsSecureCoding); + } - /// 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_NSDate_bool_bool.listener( - void Function(NSDate?, bool, ffi.Pointer) fn) - : this._(objc.newBlock( - (_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(), - _ObjCBlock_ffiVoid_NSDate_bool_bool_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSDate._(arg0, retain: true, release: true), arg1, arg2)))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + _class_NSURLRequest, + _sel_requestWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } - void call(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); + NSURLRequest initWithURL_(objc.NSURL URL) { + final _ret = + _objc_msgSend_320(this.pointer, _sel_initWithURL_, URL.pointer); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + NSURLRequest initWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + this.pointer, + _sel_initWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + int get cachePolicy { + return _objc_msgSend_322(this.pointer, _sel_cachePolicy); + } + + double get timeoutInterval { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutInterval) + : _objc_msgSend_115(this.pointer, _sel_timeoutInterval); + } + + objc.NSURL? get mainDocumentURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_mainDocumentURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + int get networkServiceType { + return _objc_msgSend_323(this.pointer, _sel_networkServiceType); + } + + bool get allowsCellularAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsCellularAccess); + } + + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsExpensiveNetworkAccess); + } + + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsConstrainedNetworkAccess); + } + + bool get assumesHTTP3Capable { + return _objc_msgSend_7(this.pointer, _sel_assumesHTTP3Capable); + } + + int get attribution { + return _objc_msgSend_324(this.pointer, _sel_attribution); + } + + bool get requiresDNSSECValidation { + return _objc_msgSend_7(this.pointer, _sel_requiresDNSSECValidation); + } + + objc.NSString? get HTTPMethod { + final _ret = _objc_msgSend_13(this.pointer, _sel_HTTPMethod); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSDictionary? get allHTTPHeaderFields { + final _ret = _objc_msgSend_65(this.pointer, _sel_allHTTPHeaderFields); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString? valueForHTTPHeaderField_(objc.NSString field) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_valueForHTTPHeaderField_, field.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSData? get HTTPBody { + final _ret = _objc_msgSend_325(this.pointer, _sel_HTTPBody); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSInputStream? get HTTPBodyStream { + final _ret = _objc_msgSend_342(this.pointer, _sel_HTTPBodyStream); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); + } + + bool get HTTPShouldHandleCookies { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldHandleCookies); + } + + bool get HTTPShouldUsePipelining { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldUsePipelining); + } + + @override + NSURLRequest init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + static NSURLRequest new1() { + final _ret = _objc_msgSend_40(_class_NSURLRequest, _sel_new); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLRequest, _sel_allocWithZone_, zone); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLRequest alloc() { + final _ret = _objc_msgSend_40(_class_NSURLRequest, _sel_alloc); + return NSURLRequest.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLRequest, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLRequest, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLRequest, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLRequest, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLRequest, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLRequest, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLRequest, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLRequest, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } } -late final _sel_enumerateDatesStartingAfterDate_matchingComponents_options_usingBlock_ = - objc.registerName( - "enumerateDatesStartingAfterDate:matchingComponents:options:usingBlock:"); -final _objc_msgSend_793 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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:"); -final _objc_msgSend_794 = objc.msgSendPointer +late final _class_NSURLRequest = objc.getClass("NSURLRequest"); +late final _sel_requestWithURL_ = objc.registerName("requestWithURL:"); +final _objc_msgSend_320 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() + ffi.Pointer)>>() .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_795 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_supportsSecureCoding = + objc.registerName("supportsSecureCoding"); + +abstract class NSURLRequestCachePolicy { + static const int NSURLRequestUseProtocolCachePolicy = 0; + static const int NSURLRequestReloadIgnoringLocalCacheData = 1; + static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; + static const int NSURLRequestReloadIgnoringCacheData = 1; + static const int NSURLRequestReturnCacheDataElseLoad = 2; + static const int NSURLRequestReturnCacheDataDontLoad = 3; + static const int NSURLRequestReloadRevalidatingCacheData = 5; +} + +late final _sel_requestWithURL_cachePolicy_timeoutInterval_ = + objc.registerName("requestWithURL:cachePolicy:timeoutInterval:"); +final _objc_msgSend_321 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Int32, - ffi.Long, - ffi.Int32)>>() - .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_796 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Int32)>>() + ffi.Double)>>() .asFunction< - ffi.Pointer Function( + instancetype 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_797 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Long, - ffi.Long, - ffi.Pointer, - ffi.Int32)>>() - .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_798 = objc.msgSendPointer + 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_322 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -final _objc_msgSend_799 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_timeoutInterval = objc.registerName("timeoutInterval"); +late final _sel_mainDocumentURL = objc.registerName("mainDocumentURL"); + +abstract class NSURLRequestNetworkServiceType { + static const int NSURLNetworkServiceTypeDefault = 0; + static const int NSURLNetworkServiceTypeVoIP = 1; + static const int NSURLNetworkServiceTypeVideo = 2; + static const int NSURLNetworkServiceTypeBackground = 3; + static const int NSURLNetworkServiceTypeVoice = 4; + static const int NSURLNetworkServiceTypeResponsiveData = 6; + static const int NSURLNetworkServiceTypeAVStreaming = 8; + static const int NSURLNetworkServiceTypeResponsiveAV = 9; + static const int NSURLNetworkServiceTypeCallSignaling = 11; +} + +late final _sel_networkServiceType = objc.registerName("networkServiceType"); +final _objc_msgSend_323 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32 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_800 = 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"); + +abstract class NSURLRequestAttribution { + static const int NSURLRequestAttributionDeveloper = 0; + static const int NSURLRequestAttributionUser = 1; +} + +late final _sel_attribution = objc.registerName("attribution"); +final _objc_msgSend_324 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() .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_801 = objc.msgSendPointer + 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_325 = 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_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:"); -late final _sel_allowsNaturalLanguage = - objc.registerName("allowsNaturalLanguage"); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); -class NSNumberFormatter extends NSFormatter { - NSNumberFormatter._(ffi.Pointer pointer, +class NSInputStream extends NSStream { + NSInputStream._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSInputStream] that points to the same underlying object as [other]. + NSInputStream.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSInputStream] that wraps the given raw object pointer. + NSInputStream.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSInputStream]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSInputStream); + } + + int read_maxLength_(ffi.Pointer buffer, int len) { + return _objc_msgSend_329(this.pointer, _sel_read_maxLength_, buffer, len); + } + + bool getBuffer_length_(ffi.Pointer> buffer, + ffi.Pointer len) { + return _objc_msgSend_339(this.pointer, _sel_getBuffer_length_, buffer, len); + } + + bool get hasBytesAvailable { + return _objc_msgSend_7(this.pointer, _sel_hasBytesAvailable); + } + + NSInputStream initWithData_(objc.NSData data) { + final _ret = + _objc_msgSend_340(this.pointer, _sel_initWithData_, data.pointer); + return NSInputStream.castFromPointer(_ret, retain: true, release: true); + } + + NSInputStream? initWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_3(this.pointer, _sel_initWithURL_, url.pointer); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); + } + + NSInputStream? initWithFileAtPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithFileAtPath_, path.pointer); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); + } + + static NSInputStream? inputStreamWithData_(objc.NSData data) { + final _ret = _objc_msgSend_341( + _class_NSInputStream, _sel_inputStreamWithData_, data.pointer); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); + } + + static NSInputStream? inputStreamWithFileAtPath_(objc.NSString path) { + final _ret = _objc_msgSend_2( + _class_NSInputStream, _sel_inputStreamWithFileAtPath_, path.pointer); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); + } + + static NSInputStream? inputStreamWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_3( + _class_NSInputStream, _sel_inputStreamWithURL_, url.pointer); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); + } + + static void getStreamsToHostWithName_port_inputStream_outputStream_( + objc.NSString hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_333( + _class_NSInputStream, + _sel_getStreamsToHostWithName_port_inputStream_outputStream_, + hostname.pointer, + port, + inputStream, + outputStream); + } + + static void getStreamsToHost_port_inputStream_outputStream_( + NSHost host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_337( + _class_NSInputStream, + _sel_getStreamsToHost_port_inputStream_outputStream_, + host.pointer, + port, + inputStream, + outputStream); + } + + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_338( + _class_NSInputStream, + _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, + bufferSize, + inputStream, + outputStream); + } + + @override + NSInputStream init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSInputStream.castFromPointer(_ret, retain: true, release: true); + } + + static NSInputStream new1() { + final _ret = _objc_msgSend_40(_class_NSInputStream, _sel_new); + return NSInputStream.castFromPointer(_ret, retain: false, release: true); + } + + static NSInputStream allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSInputStream, _sel_allocWithZone_, zone); + return NSInputStream.castFromPointer(_ret, retain: false, release: true); + } + + static NSInputStream alloc() { + final _ret = _objc_msgSend_40(_class_NSInputStream, _sel_alloc); + return NSInputStream.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSInputStream, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSInputStream, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSInputStream, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSInputStream, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSInputStream, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSInputStream, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSInputStream, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSInputStream, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSInputStream, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSInputStream = objc.getClass("NSInputStream"); + +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}) - : super._(pointer, retain: retain, release: release); + : 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); + } + + void open() { + _objc_msgSend_82(this.pointer, _sel_open); + } + + void close() { + _objc_msgSend_82(this.pointer, _sel_close); + } + + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); + } + + objc.NSObject? propertyForKey_(objc.NSString key) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_propertyForKey_, key.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool setProperty_forKey_(objc.NSObject? property, objc.NSString key) { + return _objc_msgSend_326(this.pointer, _sel_setProperty_forKey_, + property?.pointer ?? ffi.nullptr, key.pointer); + } + + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); + } + + void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_removeFromRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); + } + + int get streamStatus { + return _objc_msgSend_327(this.pointer, _sel_streamStatus); + } + + objc.NSError? get streamError { + final _ret = _objc_msgSend_328(this.pointer, _sel_streamError); + return _ret.address == 0 + ? null + : objc.NSError.castFromPointer(_ret, retain: true, release: true); + } + + static void getStreamsToHostWithName_port_inputStream_outputStream_( + objc.NSString hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_333( + _class_NSStream, + _sel_getStreamsToHostWithName_port_inputStream_outputStream_, + hostname.pointer, + port, + inputStream, + outputStream); + } + + static void getStreamsToHost_port_inputStream_outputStream_( + NSHost host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_337( + _class_NSStream, + _sel_getStreamsToHost_port_inputStream_outputStream_, + host.pointer, + port, + inputStream, + outputStream); + } + + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_338( + _class_NSStream, + _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, + bufferSize, + inputStream, + outputStream); + } + + @override + NSStream init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSStream.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a [NSNumberFormatter] that points to the same underlying object as [other]. - static NSNumberFormatter castFrom(T other) { - return NSNumberFormatter._(other.pointer, retain: true, release: true); + static NSStream new1() { + final _ret = _objc_msgSend_40(_class_NSStream, _sel_new); + return NSStream.castFromPointer(_ret, retain: false, release: true); + } + + static NSStream allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSStream, _sel_allocWithZone_, zone); + return NSStream.castFromPointer(_ret, retain: false, release: true); + } + + static NSStream alloc() { + final _ret = _objc_msgSend_40(_class_NSStream, _sel_alloc); + return NSStream.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSStream, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - /// Returns a [NSNumberFormatter] that wraps the given raw object pointer. - static NSNumberFormatter castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNumberFormatter._(other, retain: retain, release: release); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSStream, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - /// Returns whether [obj] is an instance of [NSNumberFormatter]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSNumberFormatter); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSStream, _sel_accessInstanceVariablesDirectly); } - int get formattingContext { - return _objc_msgSend_752(this.pointer, _sel_formattingContext); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSStream, _sel_useStoredAccessor); } - set formattingContext(int value) { - return _objc_msgSend_753(this.pointer, _sel_setFormattingContext_, value); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSStream, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - bool getObjectValue_forString_range_error_( - ffi.Pointer> obj, - NSString string, - ffi.Pointer<_NSRange> rangep, - ffi.Pointer> error) { - return _objc_msgSend_754( - this.pointer, - _sel_getObjectValue_forString_range_error_, - obj, - string.pointer, - rangep, - error); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSStream, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSString? stringFromNumber_(NSNumber number) { - final _ret = - _objc_msgSend_802(this.pointer, _sel_stringFromNumber_, number.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSStream, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSNumber? numberFromString_(NSString string) { + static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = - _objc_msgSend_803(this.pointer, _sel_numberFromString_, string.pointer); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); + _objc_msgSend_6(_class_NSStream, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSString localizedStringFromNumber_numberStyle_( - NSNumber num, int nstyle) { - final _ret = _objc_msgSend_804(_class_NSNumberFormatter, - _sel_localizedStringFromNumber_numberStyle_, num.pointer, nstyle); - return NSString._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSStream, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - static int defaultFormatterBehavior() { - return _objc_msgSend_805( - _class_NSNumberFormatter, _sel_defaultFormatterBehavior); - } +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_326 = 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)>(); - static void setDefaultFormatterBehavior_(int behavior) { - _objc_msgSend_806( - _class_NSNumberFormatter, _sel_setDefaultFormatterBehavior_, behavior); - } +abstract class NSStreamStatus { + static const int NSStreamStatusNotOpen = 0; + static const int NSStreamStatusOpening = 1; + static const int NSStreamStatusOpen = 2; + static const int NSStreamStatusReading = 3; + static const int NSStreamStatusWriting = 4; + static const int NSStreamStatusAtEnd = 5; + static const int NSStreamStatusClosed = 6; + static const int NSStreamStatusError = 7; +} - int get numberStyle { - return _objc_msgSend_807(this.pointer, _sel_numberStyle); - } +late final _sel_streamStatus = objc.registerName("streamStatus"); +final _objc_msgSend_327 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_streamError = objc.registerName("streamError"); +final _objc_msgSend_328 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); - set numberStyle(int value) { - return _objc_msgSend_808(this.pointer, _sel_setNumberStyle_, value); - } +class NSOutputStream extends NSStream { + NSOutputStream._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSLocale get locale { - final _ret = _objc_msgSend_197(this.pointer, _sel_locale); - return NSLocale._(_ret, retain: true, release: true); - } + /// Constructs a [NSOutputStream] that points to the same underlying object as [other]. + NSOutputStream.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - set locale(NSLocale value) { - return _objc_msgSend_762(this.pointer, _sel_setLocale_, value.pointer); - } + /// 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); - bool get generatesDecimalNumbers { - return _objc_msgSend_12(this.pointer, _sel_generatesDecimalNumbers); + /// Returns whether [obj] is an instance of [NSOutputStream]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSOutputStream); } - set generatesDecimalNumbers(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setGeneratesDecimalNumbers_, value); + int write_maxLength_(ffi.Pointer buffer, int len) { + return _objc_msgSend_329(this.pointer, _sel_write_maxLength_, buffer, len); } - int get formatterBehavior { - return _objc_msgSend_805(this.pointer, _sel_formatterBehavior); + bool get hasSpaceAvailable { + return _objc_msgSend_7(this.pointer, _sel_hasSpaceAvailable); } - set formatterBehavior(int value) { - return _objc_msgSend_809(this.pointer, _sel_setFormatterBehavior_, value); + NSOutputStream initToMemory() { + final _ret = _objc_msgSend_40(this.pointer, _sel_initToMemory); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - NSString get negativeFormat { - final _ret = _objc_msgSend_21(this.pointer, _sel_negativeFormat); - return NSString._(_ret, retain: true, release: true); + NSOutputStream initToBuffer_capacity_( + ffi.Pointer buffer, int capacity) { + final _ret = _objc_msgSend_330( + this.pointer, _sel_initToBuffer_capacity_, buffer, capacity); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - set negativeFormat(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setNegativeFormat_, value.pointer); + NSOutputStream? initWithURL_append_(objc.NSURL url, bool shouldAppend) { + final _ret = _objc_msgSend_331( + this.pointer, _sel_initWithURL_append_, url.pointer, shouldAppend); + return _ret.address == 0 + ? null + : NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get textAttributesForNegativeValues { - final _ret = - _objc_msgSend_390(this.pointer, _sel_textAttributesForNegativeValues); + NSOutputStream? initToFileAtPath_append_( + objc.NSString path, bool shouldAppend) { + final _ret = _objc_msgSend_332(this.pointer, _sel_initToFileAtPath_append_, + path.pointer, shouldAppend); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - set textAttributesForNegativeValues(NSDictionary? value) { - return _objc_msgSend_634( - this.pointer, - _sel_setTextAttributesForNegativeValues_, - value?.pointer ?? ffi.nullptr); + static NSOutputStream outputStreamToMemory() { + final _ret = + _objc_msgSend_40(_class_NSOutputStream, _sel_outputStreamToMemory); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - NSString get positiveFormat { - final _ret = _objc_msgSend_21(this.pointer, _sel_positiveFormat); - return NSString._(_ret, retain: true, release: true); + static NSOutputStream outputStreamToBuffer_capacity_( + ffi.Pointer buffer, int capacity) { + final _ret = _objc_msgSend_330(_class_NSOutputStream, + _sel_outputStreamToBuffer_capacity_, buffer, capacity); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - set positiveFormat(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setPositiveFormat_, value.pointer); + static NSOutputStream outputStreamToFileAtPath_append_( + objc.NSString path, bool shouldAppend) { + final _ret = _objc_msgSend_164(_class_NSOutputStream, + _sel_outputStreamToFileAtPath_append_, path.pointer, shouldAppend); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get textAttributesForPositiveValues { - final _ret = - _objc_msgSend_390(this.pointer, _sel_textAttributesForPositiveValues); + static NSOutputStream? outputStreamWithURL_append_( + objc.NSURL url, bool shouldAppend) { + final _ret = _objc_msgSend_331(_class_NSOutputStream, + _sel_outputStreamWithURL_append_, url.pointer, shouldAppend); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - set textAttributesForPositiveValues(NSDictionary? value) { - return _objc_msgSend_634( - this.pointer, - _sel_setTextAttributesForPositiveValues_, - value?.pointer ?? ffi.nullptr); + static void getStreamsToHostWithName_port_inputStream_outputStream_( + objc.NSString hostname, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_333( + _class_NSOutputStream, + _sel_getStreamsToHostWithName_port_inputStream_outputStream_, + hostname.pointer, + port, + inputStream, + outputStream); } - bool get allowsFloats { - return _objc_msgSend_12(this.pointer, _sel_allowsFloats); + static void getStreamsToHost_port_inputStream_outputStream_( + NSHost host, + int port, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_337( + _class_NSOutputStream, + _sel_getStreamsToHost_port_inputStream_outputStream_, + host.pointer, + port, + inputStream, + outputStream); } - set allowsFloats(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setAllowsFloats_, value); + static void getBoundStreamsWithBufferSize_inputStream_outputStream_( + int bufferSize, + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + _objc_msgSend_338( + _class_NSOutputStream, + _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, + bufferSize, + inputStream, + outputStream); } - NSString get decimalSeparator { - final _ret = _objc_msgSend_21(this.pointer, _sel_decimalSeparator); - return NSString._(_ret, retain: true, release: true); + @override + NSOutputStream init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOutputStream.castFromPointer(_ret, retain: true, release: true); } - set decimalSeparator(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setDecimalSeparator_, value.pointer); + static NSOutputStream new1() { + final _ret = _objc_msgSend_40(_class_NSOutputStream, _sel_new); + return NSOutputStream.castFromPointer(_ret, retain: false, release: true); } - bool get alwaysShowsDecimalSeparator { - return _objc_msgSend_12(this.pointer, _sel_alwaysShowsDecimalSeparator); + static NSOutputStream allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSOutputStream, _sel_allocWithZone_, zone); + return NSOutputStream.castFromPointer(_ret, retain: false, release: true); } - set alwaysShowsDecimalSeparator(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAlwaysShowsDecimalSeparator_, value); + static NSOutputStream alloc() { + final _ret = _objc_msgSend_40(_class_NSOutputStream, _sel_alloc); + return NSOutputStream.castFromPointer(_ret, retain: false, release: true); } - NSString get currencyDecimalSeparator { - final _ret = _objc_msgSend_21(this.pointer, _sel_currencyDecimalSeparator); - return NSString._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOutputStream, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - set currencyDecimalSeparator(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setCurrencyDecimalSeparator_, value.pointer); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOutputStream, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - bool get usesGroupingSeparator { - return _objc_msgSend_12(this.pointer, _sel_usesGroupingSeparator); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSOutputStream, _sel_accessInstanceVariablesDirectly); } - set usesGroupingSeparator(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setUsesGroupingSeparator_, value); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSOutputStream, _sel_useStoredAccessor); } - NSString get groupingSeparator { - final _ret = _objc_msgSend_21(this.pointer, _sel_groupingSeparator); - return NSString._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOutputStream, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set groupingSeparator(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setGroupingSeparator_, value.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOutputStream, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSString? get zeroSymbol { - final _ret = _objc_msgSend_44(this.pointer, _sel_zeroSymbol); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOutputStream, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - set zeroSymbol(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setZeroSymbol_, value?.pointer ?? ffi.nullptr); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOutputStream, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get textAttributesForZero { - final _ret = _objc_msgSend_390(this.pointer, _sel_textAttributesForZero); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSOutputStream, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - set textAttributesForZero(NSDictionary? value) { - return _objc_msgSend_634(this.pointer, _sel_setTextAttributesForZero_, - value?.pointer ?? ffi.nullptr); - } +late final _class_NSOutputStream = objc.getClass("NSOutputStream"); +late final _sel_write_maxLength_ = objc.registerName("write:maxLength:"); +final _objc_msgSend_329 = 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_hasSpaceAvailable = objc.registerName("hasSpaceAvailable"); +late final _sel_initToMemory = objc.registerName("initToMemory"); +late final _sel_initToBuffer_capacity_ = + objc.registerName("initToBuffer:capacity:"); +final _objc_msgSend_330 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_initWithURL_append_ = objc.registerName("initWithURL:append:"); +final _objc_msgSend_331 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initToFileAtPath_append_ = + objc.registerName("initToFileAtPath:append:"); +final _objc_msgSend_332 = 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_333 = 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>)>(); - NSString get nilSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_nilSymbol); - return NSString._(_ret, retain: true, release: true); - } +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.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); - set nilSymbol(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setNilSymbol_, value.pointer); + /// Returns whether [obj] is an instance of [NSHost]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSHost); } - NSDictionary? get textAttributesForNil { - final _ret = _objc_msgSend_390(this.pointer, _sel_textAttributesForNil); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + static NSHost currentHost() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_currentHost); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - set textAttributesForNil(NSDictionary? value) { - return _objc_msgSend_634(this.pointer, _sel_setTextAttributesForNil_, - value?.pointer ?? ffi.nullptr); + static NSHost hostWithName_(objc.NSString? name) { + final _ret = _objc_msgSend_334( + _class_NSHost, _sel_hostWithName_, name?.pointer ?? ffi.nullptr); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - NSString get notANumberSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_notANumberSymbol); - return NSString._(_ret, retain: true, release: true); + static NSHost hostWithAddress_(objc.NSString address) { + final _ret = + _objc_msgSend_35(_class_NSHost, _sel_hostWithAddress_, address.pointer); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - set notANumberSymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setNotANumberSymbol_, value.pointer); + bool isEqualToHost_(NSHost aHost) { + return _objc_msgSend_335(this.pointer, _sel_isEqualToHost_, aHost.pointer); } - NSDictionary? get textAttributesForNotANumber { - final _ret = - _objc_msgSend_390(this.pointer, _sel_textAttributesForNotANumber); + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set textAttributesForNotANumber(NSDictionary? value) { - return _objc_msgSend_634(this.pointer, _sel_setTextAttributesForNotANumber_, - value?.pointer ?? ffi.nullptr); + objc.NSArray get names { + final _ret = _objc_msgSend_6(this.pointer, _sel_names); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get positiveInfinitySymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_positiveInfinitySymbol); - return NSString._(_ret, retain: true, release: true); + objc.NSString? get address { + final _ret = _objc_msgSend_13(this.pointer, _sel_address); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set positiveInfinitySymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setPositiveInfinitySymbol_, value.pointer); + objc.NSArray get addresses { + final _ret = _objc_msgSend_6(this.pointer, _sel_addresses); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get textAttributesForPositiveInfinity { - final _ret = - _objc_msgSend_390(this.pointer, _sel_textAttributesForPositiveInfinity); + objc.NSString? get localizedName { + final _ret = _objc_msgSend_13(this.pointer, _sel_localizedName); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set textAttributesForPositiveInfinity(NSDictionary? value) { - return _objc_msgSend_634( - this.pointer, - _sel_setTextAttributesForPositiveInfinity_, - value?.pointer ?? ffi.nullptr); + static void setHostCacheEnabled_(bool flag) { + _objc_msgSend_336(_class_NSHost, _sel_setHostCacheEnabled_, flag); } - NSString get negativeInfinitySymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_negativeInfinitySymbol); - return NSString._(_ret, retain: true, release: true); + static bool isHostCacheEnabled() { + return _objc_msgSend_7(_class_NSHost, _sel_isHostCacheEnabled); } - set negativeInfinitySymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setNegativeInfinitySymbol_, value.pointer); + static void flushHostCache() { + _objc_msgSend_82(_class_NSHost, _sel_flushHostCache); } - NSDictionary? get textAttributesForNegativeInfinity { - final _ret = - _objc_msgSend_390(this.pointer, _sel_textAttributesForNegativeInfinity); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + @override + NSHost init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSHost.castFromPointer(_ret, retain: true, release: true); } - set textAttributesForNegativeInfinity(NSDictionary? value) { - return _objc_msgSend_634( - this.pointer, - _sel_setTextAttributesForNegativeInfinity_, - value?.pointer ?? ffi.nullptr); + static NSHost new1() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_new); + return NSHost.castFromPointer(_ret, retain: false, release: true); } - NSString get positivePrefix { - final _ret = _objc_msgSend_21(this.pointer, _sel_positivePrefix); - return NSString._(_ret, retain: true, release: true); + static NSHost allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSHost, _sel_allocWithZone_, zone); + return NSHost.castFromPointer(_ret, retain: false, release: true); } - set positivePrefix(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setPositivePrefix_, value.pointer); + static NSHost alloc() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_alloc); + return NSHost.castFromPointer(_ret, retain: false, release: true); } - NSString get positiveSuffix { - final _ret = _objc_msgSend_21(this.pointer, _sel_positiveSuffix); - return NSString._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSHost, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - set positiveSuffix(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setPositiveSuffix_, value.pointer); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSHost, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSString get negativePrefix { - final _ret = _objc_msgSend_21(this.pointer, _sel_negativePrefix); - return NSString._(_ret, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSHost, _sel_accessInstanceVariablesDirectly); } - set negativePrefix(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setNegativePrefix_, value.pointer); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSHost, _sel_useStoredAccessor); } - NSString get negativeSuffix { - final _ret = _objc_msgSend_21(this.pointer, _sel_negativeSuffix); - return NSString._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSHost, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set negativeSuffix(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setNegativeSuffix_, value.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51( + _class_NSHost, _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSHost, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSString get currencyCode { - final _ret = _objc_msgSend_21(this.pointer, _sel_currencyCode); - return NSString._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSHost, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set currencyCode(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setCurrencyCode_, value.pointer); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSHost, _sel_classForKeyedUnarchiver); + return objc.NSObject.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:"); +final _objc_msgSend_334 = 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_335 = 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_336 = 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_337 = 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_338 = 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_read_maxLength_ = objc.registerName("read:maxLength:"); +late final _sel_getBuffer_length_ = objc.registerName("getBuffer:length:"); +final _objc_msgSend_339 = 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_340 = 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_341 = 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:"); +late final _sel_HTTPBodyStream = objc.registerName("HTTPBodyStream"); +final _objc_msgSend_342 = 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_343 = 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"); - NSString get currencySymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_currencySymbol); - return NSString._(_ret, retain: true, release: true); - } +class NSURLResponse extends objc.NSObject { + NSURLResponse._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - set currencySymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setCurrencySymbol_, value.pointer); - } + /// Constructs a [NSURLResponse] that points to the same underlying object as [other]. + NSURLResponse.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSString get internationalCurrencySymbol { - final _ret = - _objc_msgSend_21(this.pointer, _sel_internationalCurrencySymbol); - return NSString._(_ret, 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); - set internationalCurrencySymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setInternationalCurrencySymbol_, value.pointer); + /// Returns whether [obj] is an instance of [NSURLResponse]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLResponse); } - NSString get percentSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_percentSymbol); - return NSString._(_ret, retain: true, release: true); + NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( + objc.NSURL URL, + objc.NSString? MIMEType, + int length, + objc.NSString? name) { + final _ret = _objc_msgSend_344( + 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); } - set percentSymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setPercentSymbol_, value.pointer); + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSString get perMillSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_perMillSymbol); - return NSString._(_ret, retain: true, release: true); + objc.NSString? get MIMEType { + final _ret = _objc_msgSend_13(this.pointer, _sel_MIMEType); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set perMillSymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setPerMillSymbol_, value.pointer); + int get expectedContentLength { + return _objc_msgSend_345(this.pointer, _sel_expectedContentLength); } - NSString get minusSign { - final _ret = _objc_msgSend_21(this.pointer, _sel_minusSign); - return NSString._(_ret, retain: true, release: true); + objc.NSString? get textEncodingName { + final _ret = _objc_msgSend_13(this.pointer, _sel_textEncodingName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set minusSign(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setMinusSign_, value.pointer); + objc.NSString? get suggestedFilename { + final _ret = _objc_msgSend_13(this.pointer, _sel_suggestedFilename); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString get plusSign { - final _ret = _objc_msgSend_21(this.pointer, _sel_plusSign); - return NSString._(_ret, retain: true, release: true); + @override + NSURLResponse init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); } - set plusSign(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setPlusSign_, value.pointer); + static NSURLResponse new1() { + final _ret = _objc_msgSend_40(_class_NSURLResponse, _sel_new); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - NSString get exponentSymbol { - final _ret = _objc_msgSend_21(this.pointer, _sel_exponentSymbol); - return NSString._(_ret, retain: true, release: true); + static NSURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLResponse, _sel_allocWithZone_, zone); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - set exponentSymbol(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setExponentSymbol_, value.pointer); + static NSURLResponse alloc() { + final _ret = _objc_msgSend_40(_class_NSURLResponse, _sel_alloc); + return NSURLResponse.castFromPointer(_ret, retain: false, release: true); } - int get groupingSize { - return _objc_msgSend_10(this.pointer, _sel_groupingSize); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - set groupingSize(int value) { - return _objc_msgSend_516(this.pointer, _sel_setGroupingSize_, value); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - int get secondaryGroupingSize { - return _objc_msgSend_10(this.pointer, _sel_secondaryGroupingSize); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLResponse, _sel_accessInstanceVariablesDirectly); } - set secondaryGroupingSize(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setSecondaryGroupingSize_, value); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLResponse, _sel_useStoredAccessor); } - NSNumber? get multiplier { - final _ret = _objc_msgSend_215(this.pointer, _sel_multiplier); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLResponse, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set multiplier(NSNumber? value) { - return _objc_msgSend_670( - this.pointer, _sel_setMultiplier_, value?.pointer ?? ffi.nullptr); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLResponse, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - int get formatWidth { - return _objc_msgSend_10(this.pointer, _sel_formatWidth); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLResponse, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - set formatWidth(int value) { - return _objc_msgSend_516(this.pointer, _sel_setFormatWidth_, value); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLResponse, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString get paddingCharacter { - final _ret = _objc_msgSend_21(this.pointer, _sel_paddingCharacter); - return NSString._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLResponse, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - set paddingCharacter(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setPaddingCharacter_, value.pointer); - } +late final _class_NSURLResponse = objc.getClass("NSURLResponse"); +late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_ = + objc.registerName( + "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); +final _objc_msgSend_344 = 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_345 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_textEncodingName = objc.registerName("textEncodingName"); +late final _sel_suggestedFilename = objc.registerName("suggestedFilename"); +late final _sel_response = objc.registerName("response"); +final _objc_msgSend_346 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_progress = objc.registerName("progress"); +final _objc_msgSend_347 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .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"); +final _objc_msgSend_348 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int64 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCountOfBytesClientExpectsToSend_ = + objc.registerName("setCountOfBytesClientExpectsToSend:"); +final _objc_msgSend_349 = 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_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:"); +late final _sel_cancel = objc.registerName("cancel"); - int get paddingPosition { - return _objc_msgSend_810(this.pointer, _sel_paddingPosition); - } +abstract class NSURLSessionTaskState { + static const int NSURLSessionTaskStateRunning = 0; + static const int NSURLSessionTaskStateSuspended = 1; + static const int NSURLSessionTaskStateCanceling = 2; + static const int NSURLSessionTaskStateCompleted = 3; +} - set paddingPosition(int value) { - return _objc_msgSend_811(this.pointer, _sel_setPaddingPosition_, value); - } +late final _sel_state = objc.registerName("state"); +final _objc_msgSend_350 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 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_resume = objc.registerName("resume"); +late final _sel_priority = objc.registerName("priority"); +final _objc_msgSend_351 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_351Fpret = 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_352 = 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:"); +late final _sel_storeCookies_forTask_ = + objc.registerName("storeCookies:forTask:"); +final _objc_msgSend_353 = 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); +final _ObjCBlock_ffiVoid_NSArray_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSArray_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSArray_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - int get roundingMode { - return _objc_msgSend_812(this.pointer, _sel_roundingMode); - } +void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSArray_closureRegistry[block.ref.target.address]!(arg0); - set roundingMode(int value) { - return _objc_msgSend_813(this.pointer, _sel_setRoundingMode_, value); - } +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); - NSNumber get roundingIncrement { - final _ret = _objc_msgSend_814(this.pointer, _sel_roundingIncrement); - return NSNumber._(_ret, retain: true, release: true); + /// 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); } - set roundingIncrement(NSNumber value) { - return _objc_msgSend_815( - this.pointer, _sel_setRoundingIncrement_, value.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_NSArray.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - int get minimumIntegerDigits { - return _objc_msgSend_10(this.pointer, _sel_minimumIntegerDigits); - } + /// 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.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSArray.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - set minimumIntegerDigits(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setMinimumIntegerDigits_, 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. + ObjCBlock_ffiVoid_NSArray.listener(void Function(objc.NSArray?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSArray.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - int get maximumIntegerDigits { - return _objc_msgSend_10(this.pointer, _sel_maximumIntegerDigits); - } + 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); +} - set maximumIntegerDigits(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setMaximumIntegerDigits_, value); - } +late final _sel_getCookiesForTask_completionHandler_ = + objc.registerName("getCookiesForTask:completionHandler:"); +final _objc_msgSend_354 = 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)>(); - int get minimumFractionDigits { - return _objc_msgSend_10(this.pointer, _sel_minimumFractionDigits); - } +class NSIndexPath extends objc.NSObject { + NSIndexPath._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - set minimumFractionDigits(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setMinimumFractionDigits_, value); - } + /// Constructs a [NSIndexPath] that points to the same underlying object as [other]. + NSIndexPath.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - int get maximumFractionDigits { - return _objc_msgSend_10(this.pointer, _sel_maximumFractionDigits); - } + /// 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); - set maximumFractionDigits(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setMaximumFractionDigits_, value); + /// Returns whether [obj] is an instance of [NSIndexPath]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSIndexPath); } - NSNumber? get minimum { - final _ret = _objc_msgSend_215(this.pointer, _sel_minimum); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); + static NSIndexPath indexPathWithIndex_(int index) { + final _ret = + _objc_msgSend_355(_class_NSIndexPath, _sel_indexPathWithIndex_, index); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - set minimum(NSNumber? value) { - return _objc_msgSend_670( - this.pointer, _sel_setMinimum_, value?.pointer ?? ffi.nullptr); + static NSIndexPath indexPathWithIndexes_length_( + ffi.Pointer indexes, int length) { + final _ret = _objc_msgSend_356( + _class_NSIndexPath, _sel_indexPathWithIndexes_length_, indexes, length); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - NSNumber? get maximum { - final _ret = _objc_msgSend_215(this.pointer, _sel_maximum); - return _ret.address == 0 - ? null - : NSNumber._(_ret, retain: true, release: true); + NSIndexPath initWithIndexes_length_( + ffi.Pointer indexes, int length) { + final _ret = _objc_msgSend_356( + this.pointer, _sel_initWithIndexes_length_, indexes, length); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - set maximum(NSNumber? value) { - return _objc_msgSend_670( - this.pointer, _sel_setMaximum_, value?.pointer ?? ffi.nullptr); + NSIndexPath initWithIndex_(int index) { + final _ret = _objc_msgSend_355(this.pointer, _sel_initWithIndex_, index); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - NSString get currencyGroupingSeparator { - final _ret = _objc_msgSend_21(this.pointer, _sel_currencyGroupingSeparator); - return NSString._(_ret, retain: true, release: true); + NSIndexPath indexPathByAddingIndex_(int index) { + final _ret = + _objc_msgSend_357(this.pointer, _sel_indexPathByAddingIndex_, index); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - set currencyGroupingSeparator(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setCurrencyGroupingSeparator_, value.pointer); + NSIndexPath indexPathByRemovingLastIndex() { + final _ret = + _objc_msgSend_358(this.pointer, _sel_indexPathByRemovingLastIndex); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - bool get lenient { - return _objc_msgSend_12(this.pointer, _sel_isLenient); + int indexAtPosition_(int position) { + return _objc_msgSend_359(this.pointer, _sel_indexAtPosition_, position); } - set lenient(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setLenient_, value); + int get length { + return _objc_msgSend_29(this.pointer, _sel_length); } - bool get usesSignificantDigits { - return _objc_msgSend_12(this.pointer, _sel_usesSignificantDigits); + void getIndexes_range_( + ffi.Pointer indexes, _NSRange positionRange) { + _objc_msgSend_360( + this.pointer, _sel_getIndexes_range_, indexes, positionRange); } - set usesSignificantDigits(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setUsesSignificantDigits_, value); + int compare_(NSIndexPath otherObject) { + return _objc_msgSend_361(this.pointer, _sel_compare_, otherObject.pointer); } - int get minimumSignificantDigits { - return _objc_msgSend_10(this.pointer, _sel_minimumSignificantDigits); + void getIndexes_(ffi.Pointer indexes) { + _objc_msgSend_362(this.pointer, _sel_getIndexes_, indexes); } - set minimumSignificantDigits(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setMinimumSignificantDigits_, value); + @override + NSIndexPath init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSIndexPath.castFromPointer(_ret, retain: true, release: true); } - int get maximumSignificantDigits { - return _objc_msgSend_10(this.pointer, _sel_maximumSignificantDigits); + static NSIndexPath new1() { + final _ret = _objc_msgSend_40(_class_NSIndexPath, _sel_new); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } - set maximumSignificantDigits(int value) { - return _objc_msgSend_516( - this.pointer, _sel_setMaximumSignificantDigits_, value); + static NSIndexPath allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSIndexPath, _sel_allocWithZone_, zone); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } - bool get partialStringValidationEnabled { - return _objc_msgSend_12( - this.pointer, _sel_isPartialStringValidationEnabled); + static NSIndexPath alloc() { + final _ret = _objc_msgSend_40(_class_NSIndexPath, _sel_alloc); + return NSIndexPath.castFromPointer(_ret, retain: false, release: true); } - set partialStringValidationEnabled(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setPartialStringValidationEnabled_, value); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSIndexPath, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - bool get hasThousandSeparators { - return _objc_msgSend_12(this.pointer, _sel_hasThousandSeparators); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSIndexPath, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - set hasThousandSeparators(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setHasThousandSeparators_, value); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSIndexPath, _sel_accessInstanceVariablesDirectly); } - NSString get thousandSeparator { - final _ret = _objc_msgSend_21(this.pointer, _sel_thousandSeparator); - return NSString._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSIndexPath, _sel_useStoredAccessor); } - set thousandSeparator(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setThousandSeparator_, value.pointer); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSIndexPath, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - bool get localizesFormat { - return _objc_msgSend_12(this.pointer, _sel_localizesFormat); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSIndexPath, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - set localizesFormat(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setLocalizesFormat_, value); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSIndexPath, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSString get format { - final _ret = _objc_msgSend_21(this.pointer, _sel_format); - return NSString._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSIndexPath, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set format(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setFormat_, value.pointer); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSIndexPath, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSAttributedString get attributedStringForZero { - final _ret = _objc_msgSend_735(this.pointer, _sel_attributedStringForZero); - return NSAttributedString._(_ret, retain: true, release: true); - } +late final _class_NSIndexPath = objc.getClass("NSIndexPath"); +late final _sel_indexPathWithIndex_ = objc.registerName("indexPathWithIndex:"); +final _objc_msgSend_355 = 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_356 = 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_357 = 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_358 = 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_359 = 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_360 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_compare_ = objc.registerName("compare:"); +final _objc_msgSend_361 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 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_362 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - set attributedStringForZero(NSAttributedString value) { - return _objc_msgSend_816( - this.pointer, _sel_setAttributedStringForZero_, value.pointer); - } +class NSInflectionRule extends objc.NSObject { + NSInflectionRule._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSAttributedString get attributedStringForNil { - final _ret = _objc_msgSend_735(this.pointer, _sel_attributedStringForNil); - return NSAttributedString._(_ret, retain: true, release: true); - } + /// Constructs a [NSInflectionRule] that points to the same underlying object as [other]. + NSInflectionRule.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - set attributedStringForNil(NSAttributedString value) { - return _objc_msgSend_816( - this.pointer, _sel_setAttributedStringForNil_, value.pointer); - } + /// 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); - NSAttributedString get attributedStringForNotANumber { - final _ret = - _objc_msgSend_735(this.pointer, _sel_attributedStringForNotANumber); - return NSAttributedString._(_ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSInflectionRule]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSInflectionRule); } - set attributedStringForNotANumber(NSAttributedString value) { - return _objc_msgSend_816( - this.pointer, _sel_setAttributedStringForNotANumber_, value.pointer); + @override + objc.NSObject init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSDecimalNumberHandler get roundingBehavior { - final _ret = _objc_msgSend_817(this.pointer, _sel_roundingBehavior); - return NSDecimalNumberHandler._(_ret, retain: true, release: true); + static NSInflectionRule getAutomaticRule() { + final _ret = _objc_msgSend_363(_class_NSInflectionRule, _sel_automaticRule); + return NSInflectionRule.castFromPointer(_ret, retain: true, release: true); } - set roundingBehavior(NSDecimalNumberHandler value) { - return _objc_msgSend_819( - this.pointer, _sel_setRoundingBehavior_, value.pointer); + static bool canInflectLanguage_(objc.NSString language) { + return _objc_msgSend_51( + _class_NSInflectionRule, _sel_canInflectLanguage_, language.pointer); } - @override - NSNumberFormatter init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSNumberFormatter._(_ret, retain: true, release: true); + static bool getCanInflectPreferredLocalization() { + return _objc_msgSend_7( + _class_NSInflectionRule, _sel_canInflectPreferredLocalization); } - static NSNumberFormatter new1() { - final _ret = _objc_msgSend_2(_class_NSNumberFormatter, _sel_new); - return NSNumberFormatter._(_ret, retain: false, release: true); + static NSInflectionRule new1() { + final _ret = _objc_msgSend_40(_class_NSInflectionRule, _sel_new); + return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } - static NSNumberFormatter allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSInflectionRule allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSNumberFormatter, _sel_allocWithZone_, zone); - return NSNumberFormatter._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSInflectionRule, _sel_allocWithZone_, zone); + return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } - static NSNumberFormatter alloc() { - final _ret = _objc_msgSend_2(_class_NSNumberFormatter, _sel_alloc); - return NSNumberFormatter._(_ret, retain: false, release: true); + static NSInflectionRule alloc() { + final _ret = _objc_msgSend_40(_class_NSInflectionRule, _sel_alloc); + return NSInflectionRule.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSNumberFormatter, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSInflectionRule, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSNumberFormatter, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSInflectionRule, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSNumberFormatter, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSInflectionRule, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSNumberFormatter, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSInflectionRule, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSNumberFormatter, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSInflectionRule, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSNumberFormatter, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSInflectionRule, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSNumberFormatter, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSInflectionRule, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSNumberFormatter, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSInflectionRule, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSNumberFormatter, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSInflectionRule, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSNumberFormatter = objc.getClass("NSNumberFormatter"); -late final _sel_stringFromNumber_ = objc.registerName("stringFromNumber:"); -final _objc_msgSend_802 = 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_803 = objc.msgSendPointer +late final _class_NSInflectionRule = objc.getClass("NSInflectionRule"); +late final _sel_automaticRule = objc.registerName("automaticRule"); +final _objc_msgSend_363 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_canInflectLanguage_ = objc.registerName("canInflectLanguage:"); +late final _sel_canInflectPreferredLocalization = + objc.registerName("canInflectPreferredLocalization"); -abstract class NSNumberFormatterStyle { - static const int NSNumberFormatterNoStyle = 0; - static const int NSNumberFormatterDecimalStyle = 1; - static const int NSNumberFormatterCurrencyStyle = 2; - static const int NSNumberFormatterPercentStyle = 3; - static const int NSNumberFormatterScientificStyle = 4; - static const int NSNumberFormatterSpellOutStyle = 5; - static const int NSNumberFormatterOrdinalStyle = 6; - static const int NSNumberFormatterCurrencyISOCodeStyle = 8; - static const int NSNumberFormatterCurrencyPluralStyle = 9; - static const int NSNumberFormatterCurrencyAccountingStyle = 10; -} +class NSOrderedSet extends objc.NSObject { + NSOrderedSet._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -late final _sel_localizedStringFromNumber_numberStyle_ = - objc.registerName("localizedStringFromNumber:numberStyle:"); -final _objc_msgSend_804 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int)>(); + /// Constructs a [NSOrderedSet] that points to the same underlying object as [other]. + NSOrderedSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); -abstract class NSNumberFormatterBehavior { - static const int NSNumberFormatterBehaviorDefault = 0; - static const int NSNumberFormatterBehavior10_0 = 1000; - static const int NSNumberFormatterBehavior10_4 = 1040; -} + /// Constructs a [NSOrderedSet] that wraps the given raw object pointer. + NSOrderedSet.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); -final _objc_msgSend_805 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_806 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_numberStyle = objc.registerName("numberStyle"); -final _objc_msgSend_807 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setNumberStyle_ = objc.registerName("setNumberStyle:"); -final _objc_msgSend_808 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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_809 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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:"); -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_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_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_setCurrencyCode_ = objc.registerName("setCurrencyCode:"); -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:"); + /// Returns whether [obj] is an instance of [NSOrderedSet]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSOrderedSet); + } -abstract class NSNumberFormatterPadPosition { - static const int NSNumberFormatterPadBeforePrefix = 0; - static const int NSNumberFormatterPadAfterPrefix = 1; - static const int NSNumberFormatterPadBeforeSuffix = 2; - static const int NSNumberFormatterPadAfterSuffix = 3; -} + int get count { + return _objc_msgSend_29(this.pointer, _sel_count); + } -late final _sel_paddingPosition = objc.registerName("paddingPosition"); -final _objc_msgSend_810 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setPaddingPosition_ = objc.registerName("setPaddingPosition:"); -final _objc_msgSend_811 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); + objc.NSObject objectAtIndex_(int idx) { + final _ret = _objc_msgSend_355(this.pointer, _sel_objectAtIndex_, idx); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } -abstract class NSNumberFormatterRoundingMode { - static const int NSNumberFormatterRoundCeiling = 0; - static const int NSNumberFormatterRoundFloor = 1; - static const int NSNumberFormatterRoundDown = 2; - static const int NSNumberFormatterRoundUp = 3; - static const int NSNumberFormatterRoundHalfEven = 4; - static const int NSNumberFormatterRoundHalfDown = 5; - static const int NSNumberFormatterRoundHalfUp = 6; -} + int indexOfObject_(objc.NSObject object) { + return _objc_msgSend_364(this.pointer, _sel_indexOfObject_, object.pointer); + } -late final _sel_roundingMode = objc.registerName("roundingMode"); -final _objc_msgSend_812 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setRoundingMode_ = objc.registerName("setRoundingMode:"); -final _objc_msgSend_813 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_roundingIncrement = objc.registerName("roundingIncrement"); -final _objc_msgSend_814 = 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_815 = 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_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_816 = 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_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:"); + @override + NSOrderedSet init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); + } -class NSDecimalNumberHandler extends NSObject { - NSDecimalNumberHandler._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + NSOrderedSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a [NSDecimalNumberHandler] that points to the same underlying object as [other]. - static NSDecimalNumberHandler castFrom( - T other) { - return NSDecimalNumberHandler._(other.pointer, retain: true, release: true); + NSOrderedSet? initWithCoder_(objc.NSCoder coder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSDecimalNumberHandler] that wraps the given raw object pointer. - static NSDecimalNumberHandler castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSDecimalNumberHandler._(other, retain: retain, release: release); + void getObjects_range_( + ffi.Pointer> objects, _NSRange range) { + _objc_msgSend_366(this.pointer, _sel_getObjects_range_, objects, range); } - /// Returns whether [obj] is an instance of [NSDecimalNumberHandler]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSDecimalNumberHandler); + objc.NSArray objectsAtIndexes_(objc.NSIndexSet indexes) { + final _ret = _objc_msgSend_367( + this.pointer, _sel_objectsAtIndexes_, indexes.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSDecimalNumberHandler getDefaultDecimalNumberHandler() { - final _ret = _objc_msgSend_817( - _class_NSDecimalNumberHandler, _sel_defaultDecimalNumberHandler); - return NSDecimalNumberHandler._(_ret, retain: true, release: true); + objc.NSObject? get firstObject { + final _ret = _objc_msgSend_66(this.pointer, _sel_firstObject); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSDecimalNumberHandler - initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( - int roundingMode, - int scale, - bool exact, - bool overflow, - bool underflow, - bool divideByZero) { - final _ret = _objc_msgSend_818( - this.pointer, - _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, - roundingMode, - scale, - exact, - overflow, - underflow, - divideByZero); - return NSDecimalNumberHandler._(_ret, retain: true, release: true); + objc.NSObject? get lastObject { + final _ret = _objc_msgSend_66(this.pointer, _sel_lastObject); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSDecimalNumberHandler - decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_( - int roundingMode, - int scale, - bool exact, - bool overflow, - bool underflow, - bool divideByZero) { - final _ret = _objc_msgSend_818( - _class_NSDecimalNumberHandler, - _sel_decimalNumberHandlerWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_, - roundingMode, - scale, - exact, - overflow, - underflow, - divideByZero); - return NSDecimalNumberHandler._(_ret, retain: true, release: true); + bool isEqualToOrderedSet_(NSOrderedSet other) { + return _objc_msgSend_368( + this.pointer, _sel_isEqualToOrderedSet_, other.pointer); + } + + bool containsObject_(objc.NSObject object) { + return _objc_msgSend_0(this.pointer, _sel_containsObject_, object.pointer); + } + + bool intersectsOrderedSet_(NSOrderedSet other) { + return _objc_msgSend_368( + this.pointer, _sel_intersectsOrderedSet_, other.pointer); + } + + bool intersectsSet_(objc.NSSet set) { + return _objc_msgSend_369(this.pointer, _sel_intersectsSet_, set.pointer); + } + + bool isSubsetOfOrderedSet_(NSOrderedSet other) { + return _objc_msgSend_368( + this.pointer, _sel_isSubsetOfOrderedSet_, other.pointer); + } + + bool isSubsetOfSet_(objc.NSSet set) { + return _objc_msgSend_369(this.pointer, _sel_isSubsetOfSet_, set.pointer); + } + + objc.NSObject objectAtIndexedSubscript_(int idx) { + final _ret = + _objc_msgSend_355(this.pointer, _sel_objectAtIndexedSubscript_, idx); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - @override - NSDecimalNumberHandler init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSDecimalNumberHandler._(_ret, retain: true, release: true); + objc.NSEnumerator objectEnumerator() { + final _ret = _objc_msgSend_370(this.pointer, _sel_objectEnumerator); + return objc.NSEnumerator.castFromPointer(_ret, retain: true, release: true); } - static NSDecimalNumberHandler new1() { - final _ret = _objc_msgSend_2(_class_NSDecimalNumberHandler, _sel_new); - return NSDecimalNumberHandler._(_ret, retain: false, release: true); + objc.NSEnumerator reverseObjectEnumerator() { + final _ret = _objc_msgSend_370(this.pointer, _sel_reverseObjectEnumerator); + return objc.NSEnumerator.castFromPointer(_ret, retain: true, release: true); } - static NSDecimalNumberHandler allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSDecimalNumberHandler, _sel_allocWithZone_, zone); - return NSDecimalNumberHandler._(_ret, retain: false, release: true); + NSOrderedSet get reversedOrderedSet { + final _ret = _objc_msgSend_371(this.pointer, _sel_reversedOrderedSet); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSDecimalNumberHandler alloc() { - final _ret = _objc_msgSend_2(_class_NSDecimalNumberHandler, _sel_alloc); - return NSDecimalNumberHandler._(_ret, retain: false, release: true); + objc.NSArray get array { + final _ret = _objc_msgSend_6(this.pointer, _sel_array); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSDecimalNumberHandler, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + objc.NSSet get set1 { + final _ret = _objc_msgSend_372(this.pointer, _sel_set); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSDecimalNumberHandler, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + void enumerateObjectsUsingBlock_( + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_373( + this.pointer, _sel_enumerateObjectsUsingBlock_, block.pointer); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSDecimalNumberHandler, _sel_accessInstanceVariablesDirectly); + void enumerateObjectsWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_374(this.pointer, + _sel_enumerateObjectsWithOptions_usingBlock_, opts, block.pointer); } - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSDecimalNumberHandler, _sel_useStoredAccessor); + void enumerateObjectsAtIndexes_options_usingBlock_(objc.NSIndexSet s, + int opts, ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_375( + this.pointer, + _sel_enumerateObjectsAtIndexes_options_usingBlock_, + s.pointer, + opts, + block.pointer); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSDecimalNumberHandler, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + int indexOfObjectPassingTest_( + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_376( + this.pointer, _sel_indexOfObjectPassingTest_, predicate.pointer); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSDecimalNumberHandler, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + int indexOfObjectWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_377(this.pointer, + _sel_indexOfObjectWithOptions_passingTest_, opts, predicate.pointer); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSDecimalNumberHandler, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + int indexOfObjectAtIndexes_options_passingTest_(objc.NSIndexSet s, int opts, + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_378( + this.pointer, + _sel_indexOfObjectAtIndexes_options_passingTest_, + s.pointer, + opts, + predicate.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSDecimalNumberHandler, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + objc.NSIndexSet indexesOfObjectsPassingTest_( + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_379( + this.pointer, _sel_indexesOfObjectsPassingTest_, predicate.pointer); + return objc.NSIndexSet.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSDecimalNumberHandler, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + objc.NSIndexSet indexesOfObjectsWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_380(this.pointer, + _sel_indexesOfObjectsWithOptions_passingTest_, opts, predicate.pointer); + return objc.NSIndexSet.castFromPointer(_ret, retain: true, release: true); } -} -late final _class_NSDecimalNumberHandler = - objc.getClass("NSDecimalNumberHandler"); -late final _sel_defaultDecimalNumberHandler = - objc.registerName("defaultDecimalNumberHandler"); -final _objc_msgSend_817 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); + objc.NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_( + objc.NSIndexSet s, + int opts, + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_381( + this.pointer, + _sel_indexesOfObjectsAtIndexes_options_passingTest_, + s.pointer, + opts, + predicate.pointer); + return objc.NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } -abstract class NSRoundingMode { - static const int NSRoundPlain = 0; - static const int NSRoundDown = 1; - static const int NSRoundUp = 2; - static const int NSRoundBankers = 3; -} + int indexOfObject_inSortedRange_options_usingComparator_( + objc.NSObject object, + _NSRange range, + int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmp) { + return _objc_msgSend_382( + this.pointer, + _sel_indexOfObject_inSortedRange_options_usingComparator_, + object.pointer, + range, + opts, + cmp.pointer); + } -late final _sel_initWithRoundingMode_scale_raiseOnExactness_raiseOnOverflow_raiseOnUnderflow_raiseOnDivideByZero_ = - objc.registerName( - "initWithRoundingMode:scale:raiseOnExactness:raiseOnOverflow:raiseOnUnderflow:raiseOnDivideByZero:"); -final _objc_msgSend_818 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_819 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + objc.NSArray sortedArrayUsingComparator_( + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_383( + this.pointer, _sel_sortedArrayUsingComparator_, cmptr.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } -class NSScanner extends NSObject { - NSScanner._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + objc.NSArray sortedArrayWithOptions_usingComparator_(int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_384(this.pointer, + _sel_sortedArrayWithOptions_usingComparator_, opts, cmptr.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a [NSScanner] that points to the same underlying object as [other]. - static NSScanner castFrom(T other) { - return NSScanner._(other.pointer, retain: true, release: true); + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSScanner] that wraps the given raw object pointer. - static NSScanner castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSScanner._(other, retain: retain, release: release); + objc.NSString descriptionWithLocale_(objc.NSObject? locale) { + final _ret = _objc_msgSend_385(this.pointer, _sel_descriptionWithLocale_, + locale?.pointer ?? ffi.nullptr); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSScanner]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSScanner); + objc.NSString descriptionWithLocale_indent_( + objc.NSObject? locale, int level) { + final _ret = _objc_msgSend_386( + this.pointer, + _sel_descriptionWithLocale_indent_, + locale?.pointer ?? ffi.nullptr, + level); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString get string { - final _ret = _objc_msgSend_21(this.pointer, _sel_string); - return NSString._(_ret, retain: true, release: true); + static NSOrderedSet orderedSet() { + final _ret = _objc_msgSend_40(_class_NSOrderedSet, _sel_orderedSet); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - int get scanLocation { - return _objc_msgSend_10(this.pointer, _sel_scanLocation); + static NSOrderedSet orderedSetWithObject_(objc.NSObject object) { + final _ret = _objc_msgSend_387( + _class_NSOrderedSet, _sel_orderedSetWithObject_, object.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - set scanLocation(int value) { - return _objc_msgSend_516(this.pointer, _sel_setScanLocation_, value); + static NSOrderedSet orderedSetWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365( + _class_NSOrderedSet, _sel_orderedSetWithObjects_count_, objects, cnt); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - NSCharacterSet? get charactersToBeSkipped { - final _ret = _objc_msgSend_820(this.pointer, _sel_charactersToBeSkipped); - return _ret.address == 0 - ? null - : NSCharacterSet._(_ret, retain: true, release: true); + static NSOrderedSet orderedSetWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387( + _class_NSOrderedSet, _sel_orderedSetWithObjects_, firstObj.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - set charactersToBeSkipped(NSCharacterSet? value) { - return _objc_msgSend_821(this.pointer, _sel_setCharactersToBeSkipped_, - value?.pointer ?? ffi.nullptr); + static NSOrderedSet orderedSetWithOrderedSet_(NSOrderedSet set) { + final _ret = _objc_msgSend_388( + _class_NSOrderedSet, _sel_orderedSetWithOrderedSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - bool get caseSensitive { - return _objc_msgSend_12(this.pointer, _sel_caseSensitive); + static NSOrderedSet orderedSetWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389( + _class_NSOrderedSet, + _sel_orderedSetWithOrderedSet_range_copyItems_, + set.pointer, + range, + flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - set caseSensitive(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setCaseSensitive_, value); + static NSOrderedSet orderedSetWithArray_(objc.NSArray array) { + final _ret = _objc_msgSend_390( + _class_NSOrderedSet, _sel_orderedSetWithArray_, array.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - NSObject? get locale { - final _ret = _objc_msgSend_17(this.pointer, _sel_locale); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + static NSOrderedSet orderedSetWithArray_range_copyItems_( + objc.NSArray array, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(_class_NSOrderedSet, + _sel_orderedSetWithArray_range_copyItems_, array.pointer, range, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - set locale(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setLocale_, value?.pointer ?? ffi.nullptr); + static NSOrderedSet orderedSetWithSet_(objc.NSSet set) { + final _ret = _objc_msgSend_392( + _class_NSOrderedSet, _sel_orderedSetWithSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - NSScanner initWithString_(NSString string) { + static NSOrderedSet orderedSetWithSet_copyItems_(objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393(_class_NSOrderedSet, + _sel_orderedSetWithSet_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); + } + + NSOrderedSet initWithObject_(objc.NSObject object) { final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithString_, string.pointer); - return NSScanner._(_ret, retain: true, release: true); + _objc_msgSend_387(this.pointer, _sel_initWithObject_, object.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - bool scanInt_(ffi.Pointer result) { - return _objc_msgSend_822(this.pointer, _sel_scanInt_, result); + NSOrderedSet initWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - bool scanInteger_(ffi.Pointer result) { - return _objc_msgSend_823(this.pointer, _sel_scanInteger_, result); + NSOrderedSet initWithOrderedSet_(NSOrderedSet set) { + final _ret = + _objc_msgSend_388(this.pointer, _sel_initWithOrderedSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - bool scanLongLong_(ffi.Pointer result) { - return _objc_msgSend_824(this.pointer, _sel_scanLongLong_, result); + NSOrderedSet initWithOrderedSet_copyItems_(NSOrderedSet set, bool flag) { + final _ret = _objc_msgSend_394( + this.pointer, _sel_initWithOrderedSet_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - bool scanUnsignedLongLong_(ffi.Pointer result) { - return _objc_msgSend_825(this.pointer, _sel_scanUnsignedLongLong_, result); + NSOrderedSet initWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389(this.pointer, + _sel_initWithOrderedSet_range_copyItems_, set.pointer, range, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - bool scanFloat_(ffi.Pointer result) { - return _objc_msgSend_826(this.pointer, _sel_scanFloat_, result); + NSOrderedSet initWithArray_(objc.NSArray array) { + final _ret = + _objc_msgSend_390(this.pointer, _sel_initWithArray_, array.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - bool scanDouble_(ffi.Pointer result) { - return _objc_msgSend_827(this.pointer, _sel_scanDouble_, result); + NSOrderedSet initWithArray_copyItems_(objc.NSArray set, bool flag) { + final _ret = _objc_msgSend_395( + this.pointer, _sel_initWithArray_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - bool scanHexInt_(ffi.Pointer result) { - return _objc_msgSend_828(this.pointer, _sel_scanHexInt_, result); + NSOrderedSet initWithArray_range_copyItems_( + objc.NSArray set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(this.pointer, + _sel_initWithArray_range_copyItems_, set.pointer, range, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - bool scanHexLongLong_(ffi.Pointer result) { - return _objc_msgSend_825(this.pointer, _sel_scanHexLongLong_, result); + NSOrderedSet initWithSet_(objc.NSSet set) { + final _ret = + _objc_msgSend_392(this.pointer, _sel_initWithSet_, set.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - bool scanHexFloat_(ffi.Pointer result) { - return _objc_msgSend_826(this.pointer, _sel_scanHexFloat_, result); + NSOrderedSet initWithSet_copyItems_(objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393( + this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - bool scanHexDouble_(ffi.Pointer result) { - return _objc_msgSend_827(this.pointer, _sel_scanHexDouble_, result); + objc.NSObject differenceFromOrderedSet_withOptions_usingEquivalenceTest_( + NSOrderedSet other, + int options, + ObjCBlock_bool_objcObjCObject_objcObjCObject block) { + final _ret = _objc_msgSend_396( + this.pointer, + _sel_differenceFromOrderedSet_withOptions_usingEquivalenceTest_, + other.pointer, + options, + block.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool scanString_intoString_( - NSString string, ffi.Pointer> result) { - return _objc_msgSend_829( - this.pointer, _sel_scanString_intoString_, string.pointer, result); + objc.NSObject differenceFromOrderedSet_withOptions_( + NSOrderedSet other, int options) { + final _ret = _objc_msgSend_397(this.pointer, + _sel_differenceFromOrderedSet_withOptions_, other.pointer, options); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool scanCharactersFromSet_intoString_( - NSCharacterSet set, ffi.Pointer> result) { - return _objc_msgSend_830(this.pointer, - _sel_scanCharactersFromSet_intoString_, set.pointer, result); + objc.NSObject differenceFromOrderedSet_(NSOrderedSet other) { + final _ret = _objc_msgSend_388( + this.pointer, _sel_differenceFromOrderedSet_, other.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool scanUpToString_intoString_( - NSString string, ffi.Pointer> result) { - return _objc_msgSend_829( - this.pointer, _sel_scanUpToString_intoString_, string.pointer, result); + NSOrderedSet? orderedSetByApplyingDifference_(objc.NSObject difference) { + final _ret = _objc_msgSend_398( + this.pointer, _sel_orderedSetByApplyingDifference_, difference.pointer); + return _ret.address == 0 + ? null + : NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - bool scanUpToCharactersFromSet_intoString_( - NSCharacterSet set, ffi.Pointer> result) { - return _objc_msgSend_830(this.pointer, - _sel_scanUpToCharactersFromSet_intoString_, set.pointer, result); + objc.NSObject valueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_35(this.pointer, _sel_valueForKey_, key.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool get atEnd { - return _objc_msgSend_12(this.pointer, _sel_isAtEnd); + void setValue_forKey_(objc.NSObject? value, objc.NSString key) { + _objc_msgSend_399(this.pointer, _sel_setValue_forKey_, + value?.pointer ?? ffi.nullptr, key.pointer); } - static NSScanner scannerWithString_(NSString string) { - final _ret = _objc_msgSend_31( - _class_NSScanner, _sel_scannerWithString_, string.pointer); - return NSScanner._(_ret, retain: true, release: true); + void addObserver_forKeyPath_options_context_(objc.NSObject observer, + objc.NSString keyPath, int options, ffi.Pointer context) { + _objc_msgSend_400( + this.pointer, + _sel_addObserver_forKeyPath_options_context_, + observer.pointer, + keyPath.pointer, + options, + context); } - static NSObject localizedScannerWithString_(NSString string) { - final _ret = _objc_msgSend_31( - _class_NSScanner, _sel_localizedScannerWithString_, string.pointer); - return NSObject._(_ret, retain: true, release: true); + void removeObserver_forKeyPath_context_(objc.NSObject observer, + objc.NSString keyPath, ffi.Pointer context) { + _objc_msgSend_401(this.pointer, _sel_removeObserver_forKeyPath_context_, + observer.pointer, keyPath.pointer, context); } - bool scanDecimal_(ffi.Pointer dcm) { - return _objc_msgSend_831(this.pointer, _sel_scanDecimal_, dcm); + void removeObserver_forKeyPath_( + objc.NSObject observer, objc.NSString keyPath) { + _objc_msgSend_402(this.pointer, _sel_removeObserver_forKeyPath_, + observer.pointer, keyPath.pointer); } - @override - NSScanner init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSScanner._(_ret, retain: true, release: true); + objc.NSArray sortedArrayUsingDescriptors_(objc.NSArray sortDescriptors) { + final _ret = _objc_msgSend_67(this.pointer, + _sel_sortedArrayUsingDescriptors_, sortDescriptors.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSScanner new1() { - final _ret = _objc_msgSend_2(_class_NSScanner, _sel_new); - return NSScanner._(_ret, retain: false, release: true); + NSOrderedSet filteredOrderedSetUsingPredicate_(NSPredicate p) { + final _ret = _objc_msgSend_412( + this.pointer, _sel_filteredOrderedSetUsingPredicate_, p.pointer); + return NSOrderedSet.castFromPointer(_ret, retain: true, release: true); } - static NSScanner allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSScanner, _sel_allocWithZone_, zone); - return NSScanner._(_ret, retain: false, release: true); + static NSOrderedSet new1() { + final _ret = _objc_msgSend_40(_class_NSOrderedSet, _sel_new); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } - static NSScanner alloc() { - final _ret = _objc_msgSend_2(_class_NSScanner, _sel_alloc); - return NSScanner._(_ret, retain: false, release: true); + static NSOrderedSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSOrderedSet, _sel_allocWithZone_, zone); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSOrderedSet alloc() { + final _ret = _objc_msgSend_40(_class_NSOrderedSet, _sel_alloc); + return NSOrderedSet.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSScanner, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOrderedSet, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSScanner, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOrderedSet, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSScanner, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSOrderedSet, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSScanner, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSOrderedSet, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSScanner, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOrderedSet, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSScanner, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOrderedSet, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSScanner, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOrderedSet, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOrderedSet, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_85(_class_NSScanner, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSOrderedSet, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSOrderedSet = objc.getClass("NSOrderedSet"); +late final _sel_count = objc.registerName("count"); +late final _sel_objectAtIndex_ = objc.registerName("objectAtIndex:"); +late final _sel_indexOfObject_ = objc.registerName("indexOfObject:"); +final _objc_msgSend_364 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithObjects_count_ = + objc.registerName("initWithObjects:count:"); +final _objc_msgSend_365 = 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_getObjects_range_ = objc.registerName("getObjects:range:"); +final _objc_msgSend_366 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + _NSRange)>(); +late final _sel_objectsAtIndexes_ = objc.registerName("objectsAtIndexes:"); +final _objc_msgSend_367 = 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_firstObject = objc.registerName("firstObject"); +late final _sel_lastObject = objc.registerName("lastObject"); +late final _sel_isEqualToOrderedSet_ = + objc.registerName("isEqualToOrderedSet:"); +final _objc_msgSend_368 = 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_containsObject_ = objc.registerName("containsObject:"); +late final _sel_intersectsOrderedSet_ = + objc.registerName("intersectsOrderedSet:"); +late final _sel_intersectsSet_ = objc.registerName("intersectsSet:"); +final _objc_msgSend_369 = 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_isSubsetOfOrderedSet_ = + objc.registerName("isSubsetOfOrderedSet:"); +late final _sel_isSubsetOfSet_ = objc.registerName("isSubsetOfSet:"); +late final _sel_objectAtIndexedSubscript_ = + objc.registerName("objectAtIndexedSubscript:"); +late final _sel_objectEnumerator = objc.registerName("objectEnumerator"); +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_reverseObjectEnumerator = + objc.registerName("reverseObjectEnumerator"); +late final _sel_reversedOrderedSet = objc.registerName("reversedOrderedSet"); +final _objc_msgSend_371 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_array = objc.registerName("array"); +late final _sel_set = objc.registerName("set"); +final _objc_msgSend_372 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_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); +final _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + void Function(ffi.Pointer, int, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = + fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSScanner, _sel_classForKeyedUnarchiver); - return NSObject._(_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_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.fromFunction( + void Function(objc.NSObject, int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.listener( + void Function(objc.NSObject, int, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(objc.NSObject arg0, int 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, arg1, arg2); } -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_820 = objc.msgSendPointer +late final _sel_enumerateObjectsUsingBlock_ = + objc.registerName("enumerateObjectsUsingBlock:"); +final _objc_msgSend_373 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setCharactersToBeSkipped_ = - objc.registerName("setCharactersToBeSkipped:"); -final _objc_msgSend_821 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSEnumerationOptions { + static const int NSEnumerationConcurrent = 1; + static const int NSEnumerationReverse = 2; +} + +late final _sel_enumerateObjectsWithOptions_usingBlock_ = + objc.registerName("enumerateObjectsWithOptions:usingBlock:"); +final _objc_msgSend_374 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_caseSensitive = objc.registerName("caseSensitive"); -late final _sel_setCaseSensitive_ = objc.registerName("setCaseSensitive:"); -late final _sel_scanInt_ = objc.registerName("scanInt:"); -final _objc_msgSend_822 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.Int32, + ffi.Pointer)>>() .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_scanInteger_ = objc.registerName("scanInteger:"); -final _objc_msgSend_823 = objc.msgSendPointer + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_enumerateObjectsAtIndexes_options_usingBlock_ = + objc.registerName("enumerateObjectsAtIndexes:options:usingBlock:"); +final _objc_msgSend_375 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_scanLongLong_ = objc.registerName("scanLongLong:"); -final _objc_msgSend_824 = objc.msgSendPointer + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() + .asFunction< + bool Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + bool Function(ffi.Pointer, int, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool + extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_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_bool_objcObjCObject_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_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_objcObjCObject_ffiUnsignedLong_bool.fromFunction( + bool Function(objc.NSObject, int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(objc.NSObject arg0, int arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.UnsignedLong arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()(pointer, arg0.pointer, arg1, arg2); +} + +late final _sel_indexOfObjectPassingTest_ = + objc.registerName("indexOfObjectPassingTest:"); +final _objc_msgSend_376 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.UnsignedLong 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_825 = objc.msgSendPointer + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexOfObjectWithOptions_passingTest_ = + objc.registerName("indexOfObjectWithOptions:passingTest:"); +final _objc_msgSend_377 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32, + ffi.Pointer)>>() .asFunction< - bool Function( + int Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_scanFloat_ = objc.registerName("scanFloat:"); -final _objc_msgSend_826 = 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_827 = objc.msgSendPointer + int, + ffi.Pointer)>(); +late final _sel_indexOfObjectAtIndexes_options_passingTest_ = + objc.registerName("indexOfObjectAtIndexes:options:passingTest:"); +final _objc_msgSend_378 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_scanHexInt_ = objc.registerName("scanHexInt:"); -final _objc_msgSend_828 = objc.msgSendPointer + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexesOfObjectsPassingTest_ = + objc.registerName("indexesOfObjectsPassingTest:"); +final _objc_msgSend_379 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer 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_829 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexesOfObjectsWithOptions_passingTest_ = + objc.registerName("indexesOfObjectsWithOptions:passingTest:"); +final _objc_msgSend_380 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.Int32, + ffi.Pointer)>>() .asFunction< - bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>(); -late final _sel_scanCharactersFromSet_intoString_ = - objc.registerName("scanCharactersFromSet:intoString:"); -final _objc_msgSend_830 = objc.msgSendPointer + int, + ffi.Pointer)>(); +late final _sel_indexesOfObjectsAtIndexes_options_passingTest_ = + objc.registerName("indexesOfObjectsAtIndexes:options:passingTest:"); +final _objc_msgSend_381 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>() + ffi.Int32, + ffi.Pointer)>>() .asFunction< - bool Function( + ffi.Pointer 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_831 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() - .asFunction< - bool Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -class NSException extends NSObject { - NSException._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSException] that points to the same underlying object as [other]. - static NSException castFrom(T other) { - return NSException._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSException] that wraps the given raw object pointer. - static NSException castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSException._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSException]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSException); - } - - static NSException exceptionWithName_reason_userInfo_( - NSString name, NSString? reason, NSDictionary? userInfo) { - final _ret = _objc_msgSend_832( - _class_NSException, - _sel_exceptionWithName_reason_userInfo_, - name.pointer, - reason?.pointer ?? ffi.nullptr, - userInfo?.pointer ?? ffi.nullptr); - return NSException._(_ret, retain: true, release: true); - } - - NSException initWithName_reason_userInfo_( - NSString aName, NSString? aReason, NSDictionary? aUserInfo) { - final _ret = _objc_msgSend_833( - this.pointer, - _sel_initWithName_reason_userInfo_, - aName.pointer, - aReason?.pointer ?? ffi.nullptr, - aUserInfo?.pointer ?? ffi.nullptr); - return NSException._(_ret, retain: true, release: true); - } - - NSString get name { - final _ret = _objc_msgSend_21(this.pointer, _sel_name); - return NSString._(_ret, retain: true, release: true); - } - - NSString? get reason { - final _ret = _objc_msgSend_44(this.pointer, _sel_reason); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSDictionary? get userInfo { - final _ret = _objc_msgSend_390(this.pointer, _sel_userInfo); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSArray get callStackReturnAddresses { - final _ret = _objc_msgSend_85(this.pointer, _sel_callStackReturnAddresses); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray get callStackSymbols { - final _ret = _objc_msgSend_85(this.pointer, _sel_callStackSymbols); - return NSArray._(_ret, retain: true, release: true); - } - - void raise() { - _objc_msgSend_1(this.pointer, _sel_raise); - } - - static void raise_format_(NSString name, NSString format) { - _objc_msgSend_551( - _class_NSException, _sel_raise_format_, name.pointer, format.pointer); - } - - static void raise_format_arguments_( - NSString name, NSString format, ffi.Pointer<__va_list_tag> argList) { - _objc_msgSend_834(_class_NSException, _sel_raise_format_arguments_, - name.pointer, format.pointer, argList); - } - - @override - NSException init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSException._(_ret, retain: true, release: true); - } - - static NSException new1() { - final _ret = _objc_msgSend_2(_class_NSException, _sel_new); - return NSException._(_ret, retain: false, release: true); - } - - static NSException allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSException, _sel_allocWithZone_, zone); - return NSException._(_ret, retain: false, release: true); - } - - static NSException alloc() { - final _ret = _objc_msgSend_2(_class_NSException, _sel_alloc); - return NSException._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSException, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSException, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSException, _sel_accessInstanceVariablesDirectly); - } + int, + ffi.Pointer)>(); +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_registerClosure( + int Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistryIndex; + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry[ + id] = fn; + return ffi.Pointer.fromAddress(id); +} - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSException, _sel_useStoredAccessor); - } +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry[ + block.ref.target.address]!(arg0, arg1); - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSException, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } +class ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject + extends objc.ObjCBlockBase { + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSException, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) { + return ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._(pointer, + retain: retain, release: release); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSException, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.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_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline, + 0) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSException, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_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. + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunction( + int Function(objc.NSObject, objc.NSObject) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline, 0) + .cast(), + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), objc.NSObject.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSException, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } + int call(objc.NSObject arg0, objc.NSObject arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer); } -late final _class_NSException = objc.getClass("NSException"); -late final _sel_exceptionWithName_reason_userInfo_ = - objc.registerName("exceptionWithName:reason:userInfo:"); -final _objc_msgSend_832 = objc.msgSendPointer +late final _sel_indexOfObject_inSortedRange_options_usingComparator_ = + objc.registerName("indexOfObject:inSortedRange:options:usingComparator:"); +final _objc_msgSend_382 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.UnsignedLong Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + _NSRange, + ffi.Int32, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + int 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_833 = objc.msgSendPointer + _NSRange, + int, + ffi.Pointer)>(); +late final _sel_sortedArrayUsingComparator_ = + objc.registerName("sortedArrayUsingComparator:"); +final _objc_msgSend_383 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSSortOptions { + static const int NSSortConcurrent = 1; + static const int NSSortStable = 16; +} + +late final _sel_sortedArrayWithOptions_usingComparator_ = + objc.registerName("sortedArrayWithOptions:usingComparator:"); +final _objc_msgSend_384 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32, + 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_raise = objc.registerName("raise"); -late final _sel_raise_format_ = objc.registerName("raise:format:"); -late final _sel_raise_format_arguments_ = - objc.registerName("raise:format:arguments:"); -final _objc_msgSend_834 = objc.msgSendPointer + int, + ffi.Pointer)>(); +late final _sel_descriptionWithLocale_ = + objc.registerName("descriptionWithLocale:"); +final _objc_msgSend_385 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_descriptionWithLocale_indent_ = + objc.registerName("descriptionWithLocale:indent:"); +final _objc_msgSend_386 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, + ffi.Pointer, ffi.Pointer, - ffi.Pointer<__va_list_tag>)>>() + ffi.UnsignedLong)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer<__va_list_tag>)>(); - -class NSFileHandle extends NSObject { - NSFileHandle._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSFileHandle] that points to the same underlying object as [other]. - static NSFileHandle castFrom(T other) { - return NSFileHandle._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSFileHandle] that wraps the given raw object pointer. - static NSFileHandle castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileHandle._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSFileHandle]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSFileHandle); - } - - NSData get availableData { - final _ret = _objc_msgSend_43(this.pointer, _sel_availableData); - return NSData._(_ret, retain: true, release: true); - } - - NSFileHandle initWithFileDescriptor_closeOnDealloc_(int fd, bool closeopt) { - final _ret = _objc_msgSend_835(this.pointer, - _sel_initWithFileDescriptor_closeOnDealloc_, fd, closeopt); - return NSFileHandle._(_ret, retain: true, release: true); - } - - NSFileHandle? initWithCoder_(NSCoder coder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, coder.pointer); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, retain: true, release: true); - } - - NSData? readDataToEndOfFileAndReturnError_( - ffi.Pointer> error) { - final _ret = _objc_msgSend_836( - this.pointer, _sel_readDataToEndOfFileAndReturnError_, error); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSData? readDataUpToLength_error_( - int length, ffi.Pointer> error) { - final _ret = _objc_msgSend_837( - this.pointer, _sel_readDataUpToLength_error_, length, error); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - bool writeData_error_( - NSData data, ffi.Pointer> error) { - return _objc_msgSend_838( - this.pointer, _sel_writeData_error_, data.pointer, error); - } - - bool getOffset_error_(ffi.Pointer offsetInFile, - ffi.Pointer> error) { - return _objc_msgSend_839( - this.pointer, _sel_getOffset_error_, offsetInFile, error); - } - - bool seekToEndReturningOffset_error_( - ffi.Pointer offsetInFile, - ffi.Pointer> error) { - return _objc_msgSend_839(this.pointer, _sel_seekToEndReturningOffset_error_, - offsetInFile, error); - } - - bool seekToOffset_error_( - int offset, ffi.Pointer> error) { - return _objc_msgSend_840( - this.pointer, _sel_seekToOffset_error_, offset, error); - } - - bool truncateAtOffset_error_( - int offset, ffi.Pointer> error) { - return _objc_msgSend_840( - this.pointer, _sel_truncateAtOffset_error_, offset, error); - } - - bool synchronizeAndReturnError_( - ffi.Pointer> error) { - return _objc_msgSend_255( - this.pointer, _sel_synchronizeAndReturnError_, error); - } - - bool closeAndReturnError_(ffi.Pointer> error) { - return _objc_msgSend_255(this.pointer, _sel_closeAndReturnError_, error); - } - - static NSFileHandle getFileHandleWithStandardInput() { - final _ret = _objc_msgSend_841( - _class_NSFileHandle, _sel_fileHandleWithStandardInput); - return NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle getFileHandleWithStandardOutput() { - final _ret = _objc_msgSend_841( - _class_NSFileHandle, _sel_fileHandleWithStandardOutput); - return NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle getFileHandleWithStandardError() { - final _ret = _objc_msgSend_841( - _class_NSFileHandle, _sel_fileHandleWithStandardError); - return NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle getFileHandleWithNullDevice() { - final _ret = - _objc_msgSend_841(_class_NSFileHandle, _sel_fileHandleWithNullDevice); - return NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle? fileHandleForReadingAtPath_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSFileHandle, _sel_fileHandleForReadingAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle? fileHandleForWritingAtPath_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSFileHandle, _sel_fileHandleForWritingAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle? fileHandleForUpdatingAtPath_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSFileHandle, _sel_fileHandleForUpdatingAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle? fileHandleForReadingFromURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_842(_class_NSFileHandle, - _sel_fileHandleForReadingFromURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle? fileHandleForWritingToURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_842(_class_NSFileHandle, - _sel_fileHandleForWritingToURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle? fileHandleForUpdatingURL_error_( - NSURL url, ffi.Pointer> error) { - final _ret = _objc_msgSend_842(_class_NSFileHandle, - _sel_fileHandleForUpdatingURL_error_, url.pointer, error); - return _ret.address == 0 - ? null - : NSFileHandle._(_ret, retain: true, release: true); - } - - void readInBackgroundAndNotifyForModes_(NSArray? modes) { - _objc_msgSend_843(this.pointer, _sel_readInBackgroundAndNotifyForModes_, - modes?.pointer ?? ffi.nullptr); - } - - void readInBackgroundAndNotify() { - _objc_msgSend_1(this.pointer, _sel_readInBackgroundAndNotify); - } - - void readToEndOfFileInBackgroundAndNotifyForModes_(NSArray? modes) { - _objc_msgSend_843( - this.pointer, - _sel_readToEndOfFileInBackgroundAndNotifyForModes_, - modes?.pointer ?? ffi.nullptr); - } - - void readToEndOfFileInBackgroundAndNotify() { - _objc_msgSend_1(this.pointer, _sel_readToEndOfFileInBackgroundAndNotify); - } - - void acceptConnectionInBackgroundAndNotifyForModes_(NSArray? modes) { - _objc_msgSend_843( - this.pointer, - _sel_acceptConnectionInBackgroundAndNotifyForModes_, - modes?.pointer ?? ffi.nullptr); - } - - void acceptConnectionInBackgroundAndNotify() { - _objc_msgSend_1(this.pointer, _sel_acceptConnectionInBackgroundAndNotify); - } - - void waitForDataInBackgroundAndNotifyForModes_(NSArray? modes) { - _objc_msgSend_843( - this.pointer, - _sel_waitForDataInBackgroundAndNotifyForModes_, - modes?.pointer ?? ffi.nullptr); - } - - void waitForDataInBackgroundAndNotify() { - _objc_msgSend_1(this.pointer, _sel_waitForDataInBackgroundAndNotify); - } - - ObjCBlock_ffiVoid_NSFileHandle? get readabilityHandler { - final _ret = _objc_msgSend_844(this.pointer, _sel_readabilityHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_NSFileHandle._(_ret, retain: true, release: true); - } - - set readabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { - return _objc_msgSend_845(this.pointer, _sel_setReadabilityHandler_, - value?.pointer ?? ffi.nullptr); - } - - ObjCBlock_ffiVoid_NSFileHandle? get writeabilityHandler { - final _ret = _objc_msgSend_844(this.pointer, _sel_writeabilityHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_NSFileHandle._(_ret, retain: true, release: true); - } - - set writeabilityHandler(ObjCBlock_ffiVoid_NSFileHandle? value) { - return _objc_msgSend_845(this.pointer, _sel_setWriteabilityHandler_, - value?.pointer ?? ffi.nullptr); - } - - NSFileHandle initWithFileDescriptor_(int fd) { - final _ret = - _objc_msgSend_846(this.pointer, _sel_initWithFileDescriptor_, fd); - return NSFileHandle._(_ret, retain: true, release: true); - } - - int get fileDescriptor { - return _objc_msgSend_237(this.pointer, _sel_fileDescriptor); - } - - NSData readDataToEndOfFile() { - final _ret = _objc_msgSend_43(this.pointer, _sel_readDataToEndOfFile); - return NSData._(_ret, retain: true, release: true); - } - - NSData readDataOfLength_(int length) { - final _ret = - _objc_msgSend_847(this.pointer, _sel_readDataOfLength_, length); - return NSData._(_ret, retain: true, release: true); - } - - void writeData_(NSData data) { - _objc_msgSend_285(this.pointer, _sel_writeData_, data.pointer); - } - - int get offsetInFile { - return _objc_msgSend_164(this.pointer, _sel_offsetInFile); - } - - int seekToEndOfFile() { - return _objc_msgSend_164(this.pointer, _sel_seekToEndOfFile); - } - - void seekToFileOffset_(int offset) { - _objc_msgSend_848(this.pointer, _sel_seekToFileOffset_, offset); - } - - void truncateFileAtOffset_(int offset) { - _objc_msgSend_848(this.pointer, _sel_truncateFileAtOffset_, offset); - } - - void synchronizeFile() { - _objc_msgSend_1(this.pointer, _sel_synchronizeFile); - } - - void closeFile() { - _objc_msgSend_1(this.pointer, _sel_closeFile); - } - - @override - NSFileHandle init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSFileHandle._(_ret, retain: true, release: true); - } - - static NSFileHandle new1() { - final _ret = _objc_msgSend_2(_class_NSFileHandle, _sel_new); - return NSFileHandle._(_ret, retain: false, release: true); - } - - static NSFileHandle allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSFileHandle, _sel_allocWithZone_, zone); - return NSFileHandle._(_ret, retain: false, release: true); - } - - static NSFileHandle alloc() { - final _ret = _objc_msgSend_2(_class_NSFileHandle, _sel_alloc); - return NSFileHandle._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSFileHandle, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSFileHandle, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSFileHandle, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSFileHandle, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSFileHandle, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSFileHandle, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSFileHandle, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSFileHandle, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSFileHandle, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, 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_835 = objc.msgSendPointer + int)>(); +late final _sel_orderedSet = objc.registerName("orderedSet"); +late final _sel_orderedSetWithObject_ = + objc.registerName("orderedSetWithObject:"); +final _objc_msgSend_387 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Int, ffi.Bool)>>() + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< instancetype Function(ffi.Pointer, - ffi.Pointer, int, bool)>(); -late final _sel_readDataToEndOfFileAndReturnError_ = - objc.registerName("readDataToEndOfFileAndReturnError:"); -final _objc_msgSend_836 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithObjects_count_ = + objc.registerName("orderedSetWithObjects:count:"); +late final _sel_orderedSetWithObjects_ = + objc.registerName("orderedSetWithObjects:"); +late final _sel_orderedSetWithOrderedSet_ = + objc.registerName("orderedSetWithOrderedSet:"); +final _objc_msgSend_388 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, 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_837 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithOrderedSet_range_copyItems_ = + objc.registerName("orderedSetWithOrderedSet:range:copyItems:"); +final _objc_msgSend_389 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>)>>() + ffi.Pointer, + _NSRange, + ffi.Bool)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_writeData_error_ = objc.registerName("writeData:error:"); -final _objc_msgSend_838 = objc.msgSendPointer + ffi.Pointer, + _NSRange, + bool)>(); +late final _sel_orderedSetWithArray_ = + objc.registerName("orderedSetWithArray:"); +final _objc_msgSend_390 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithArray_range_copyItems_ = + objc.registerName("orderedSetWithArray:range:copyItems:"); +final _objc_msgSend_391 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>>() + _NSRange, + ffi.Bool)>>() .asFunction< - bool Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer>)>(); -late final _sel_getOffset_error_ = objc.registerName("getOffset:error:"); -final _objc_msgSend_839 = objc.msgSendPointer + _NSRange, + bool)>(); +late final _sel_orderedSetWithSet_ = objc.registerName("orderedSetWithSet:"); +final _objc_msgSend_392 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + instancetype Function( ffi.Pointer, 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_840 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_orderedSetWithSet_copyItems_ = + objc.registerName("orderedSetWithSet:copyItems:"); +final _objc_msgSend_393 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLongLong, - ffi.Pointer>)>>() + ffi.Pointer, + ffi.Bool)>>() .asFunction< - bool Function( + instancetype 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_841 = objc.msgSendPointer + ffi.Pointer, + bool)>(); +late final _sel_initWithObject_ = objc.registerName("initWithObject:"); +late final _sel_initWithObjects_ = objc.registerName("initWithObjects:"); +late final _sel_initWithOrderedSet_ = objc.registerName("initWithOrderedSet:"); +late final _sel_initWithOrderedSet_copyItems_ = + objc.registerName("initWithOrderedSet:copyItems:"); +final _objc_msgSend_394 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() .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_842 = objc.msgSendPointer + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_initWithOrderedSet_range_copyItems_ = + objc.registerName("initWithOrderedSet:range:copyItems:"); +late final _sel_initWithArray_ = objc.registerName("initWithArray:"); +late final _sel_initWithArray_copyItems_ = + objc.registerName("initWithArray:copyItems:"); +final _objc_msgSend_395 = 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>)>(); -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_843 = 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) => + bool)>(); +late final _sel_initWithArray_range_copyItems_ = + objc.registerName("initWithArray:range:copyItems:"); +late final _sel_initWithSet_ = objc.registerName("initWithSet:"); +late final _sel_initWithSet_copyItems_ = + objc.registerName("initWithSet:copyItems:"); + +abstract class NSOrderedCollectionDifferenceCalculationOptions { + static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = + 1; + static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = + 2; + static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; +} + +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => block.ref.target .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSFileHandle_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[id] = fn; + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_objcObjCObject_registerClosure( + bool Function( + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSFileHandle_closureRegistry[block.ref.target.address]!( - arg0); +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry[ + block.ref.target.address]!(arg0, arg1); -class ObjCBlock_ffiVoid_NSFileHandle extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSFileHandle._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) +class ObjCBlock_bool_objcObjCObject_objcObjCObject extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_objcObjCObject._( + 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( + static ObjCBlock_bool_objcObjCObject_objcObjCObject castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSFileHandle._(pointer, + return ObjCBlock_bool_objcObjCObject_objcObjCObject._(pointer, retain: retain, release: release); } @@ -41404,16 +18025,20 @@ class ObjCBlock_ffiVoid_NSFileHandle extends objc.ObjCBlockBase { /// This block must be invoked by native 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( + ObjCBlock_bool_objcObjCObject_objcObjCObject.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> ptr) : this._(objc.newBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSFileHandle_fnPtrTrampoline) + _ObjCBlock_bool_objcObjCObject_objcObjCObject_fnPtrTrampoline, + false) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; @@ -41423,2473 +18048,1535 @@ class ObjCBlock_ffiVoid_NSFileHandle extends objc.ObjCBlockBase { /// This block must be invoked by native 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) + ObjCBlock_bool_objcObjCObject_objcObjCObject.fromFunction( + bool Function(objc.NSObject, objc.NSObject) fn) : this._(objc.newBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline, false) .cast(), - _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( - (ffi.Pointer arg0) => - fn(NSFileHandle._(arg0, retain: true, release: true))))); + _ObjCBlock_bool_objcObjCObject_objcObjCObject_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(objc.NSObject.castFromPointer(arg0, retain: true, release: true), objc.NSObject.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_NSFileHandle.listener(void Function(NSFileHandle) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSFileHandle_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSFileHandle_registerClosure( - (ffi.Pointer arg0) => - fn(NSFileHandle._(arg0, retain: true, 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_844 = 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_845 = 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_846 = 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"); -late final _sel_readDataToEndOfFile = objc.registerName("readDataToEndOfFile"); -late final _sel_readDataOfLength_ = objc.registerName("readDataOfLength:"); -final _objc_msgSend_847 = 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_offsetInFile = objc.registerName("offsetInFile"); -late final _sel_seekToEndOfFile = objc.registerName("seekToEndOfFile"); -late final _sel_seekToFileOffset_ = objc.registerName("seekToFileOffset:"); -final _objc_msgSend_848 = 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"); - -class NSHTTPCookieStorage extends NSObject { - NSHTTPCookieStorage._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSHTTPCookieStorage] that points to the same underlying object as [other]. - static NSHTTPCookieStorage castFrom(T other) { - return NSHTTPCookieStorage._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSHTTPCookieStorage] that wraps the given raw object pointer. - static NSHTTPCookieStorage castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookieStorage._(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); - } - - static NSHTTPCookieStorage getSharedHTTPCookieStorage() { - final _ret = _objc_msgSend_849( - _class_NSHTTPCookieStorage, _sel_sharedHTTPCookieStorage); - return NSHTTPCookieStorage._(_ret, retain: true, release: true); - } - - static NSHTTPCookieStorage sharedCookieStorageForGroupContainerIdentifier_( - NSString identifier) { - final _ret = _objc_msgSend_850( - _class_NSHTTPCookieStorage, - _sel_sharedCookieStorageForGroupContainerIdentifier_, - identifier.pointer); - return NSHTTPCookieStorage._(_ret, retain: true, release: true); - } - - NSArray? get cookies { - final _ret = _objc_msgSend_84(this.pointer, _sel_cookies); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - void setCookie_(NSHTTPCookie cookie) { - _objc_msgSend_854(this.pointer, _sel_setCookie_, cookie.pointer); - } - - void deleteCookie_(NSHTTPCookie cookie) { - _objc_msgSend_854(this.pointer, _sel_deleteCookie_, cookie.pointer); - } - - void removeCookiesSinceDate_(NSDate date) { - _objc_msgSend_540(this.pointer, _sel_removeCookiesSinceDate_, date.pointer); - } - - NSArray? cookiesForURL_(NSURL URL) { - final _ret = - _objc_msgSend_133(this.pointer, _sel_cookiesForURL_, URL.pointer); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - void setCookies_forURL_mainDocumentURL_( - NSArray cookies, NSURL? URL, NSURL? mainDocumentURL) { - _objc_msgSend_855( - this.pointer, - _sel_setCookies_forURL_mainDocumentURL_, - cookies.pointer, - URL?.pointer ?? ffi.nullptr, - mainDocumentURL?.pointer ?? ffi.nullptr); - } - - int get cookieAcceptPolicy { - return _objc_msgSend_856(this.pointer, _sel_cookieAcceptPolicy); - } - - set cookieAcceptPolicy(int value) { - return _objc_msgSend_857(this.pointer, _sel_setCookieAcceptPolicy_, value); - } - - NSArray sortedCookiesUsingDescriptors_(NSArray sortOrder) { - final _ret = _objc_msgSend_68( - this.pointer, _sel_sortedCookiesUsingDescriptors_, sortOrder.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - void storeCookies_forTask_(NSArray cookies, NSURLSessionTask task) { - _objc_msgSend_882(this.pointer, _sel_storeCookies_forTask_, cookies.pointer, - task.pointer); - } - - void getCookiesForTask_completionHandler_( - NSURLSessionTask task, ObjCBlock_ffiVoid_NSArray completionHandler) { - _objc_msgSend_883(this.pointer, _sel_getCookiesForTask_completionHandler_, - task.pointer, completionHandler.pointer); - } - - @override - NSHTTPCookieStorage init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSHTTPCookieStorage._(_ret, retain: true, release: true); - } - - static NSHTTPCookieStorage new1() { - final _ret = _objc_msgSend_2(_class_NSHTTPCookieStorage, _sel_new); - return NSHTTPCookieStorage._(_ret, retain: false, release: true); - } - - static NSHTTPCookieStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSHTTPCookieStorage, _sel_allocWithZone_, zone); - return NSHTTPCookieStorage._(_ret, retain: false, release: true); - } - - static NSHTTPCookieStorage alloc() { - final _ret = _objc_msgSend_2(_class_NSHTTPCookieStorage, _sel_alloc); - return NSHTTPCookieStorage._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSHTTPCookieStorage, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSHTTPCookieStorage, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSHTTPCookieStorage, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSHTTPCookieStorage, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSHTTPCookieStorage, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSHTTPCookieStorage, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSHTTPCookieStorage, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSHTTPCookieStorage, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSHTTPCookieStorage, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSHTTPCookieStorage = objc.getClass("NSHTTPCookieStorage"); -late final _sel_sharedHTTPCookieStorage = - objc.registerName("sharedHTTPCookieStorage"); -final _objc_msgSend_849 = 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_850 = 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"); - -class NSHTTPCookie extends NSObject { - NSHTTPCookie._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSHTTPCookie] that points to the same underlying object as [other]. - static NSHTTPCookie castFrom(T other) { - return NSHTTPCookie._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSHTTPCookie] that wraps the given raw object pointer. - static NSHTTPCookie castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHTTPCookie._(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); - } - - NSHTTPCookie? initWithProperties_(NSDictionary properties) { - final _ret = _objc_msgSend_851( - this.pointer, _sel_initWithProperties_, properties.pointer); - return _ret.address == 0 - ? null - : NSHTTPCookie._(_ret, retain: true, release: true); - } - - static NSHTTPCookie? cookieWithProperties_(NSDictionary properties) { - final _ret = _objc_msgSend_852( - _class_NSHTTPCookie, _sel_cookieWithProperties_, properties.pointer); - return _ret.address == 0 - ? null - : NSHTTPCookie._(_ret, retain: true, release: true); - } - - static NSDictionary requestHeaderFieldsWithCookies_(NSArray cookies) { - final _ret = _objc_msgSend_508(_class_NSHTTPCookie, - _sel_requestHeaderFieldsWithCookies_, cookies.pointer); - return NSDictionary._(_ret, retain: true, release: true); - } - - static NSArray cookiesWithResponseHeaderFields_forURL_( - NSDictionary headerFields, NSURL URL) { - final _ret = _objc_msgSend_853( - _class_NSHTTPCookie, - _sel_cookiesWithResponseHeaderFields_forURL_, - headerFields.pointer, - URL.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSDictionary? get properties { - final _ret = _objc_msgSend_390(this.pointer, _sel_properties); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - int get version { - return _objc_msgSend_10(this.pointer, _sel_version); - } - - NSString get name { - final _ret = _objc_msgSend_21(this.pointer, _sel_name); - return NSString._(_ret, retain: true, release: true); - } - - NSString get value { - final _ret = _objc_msgSend_21(this.pointer, _sel_value); - return NSString._(_ret, retain: true, release: true); - } - - NSDate? get expiresDate { - final _ret = _objc_msgSend_183(this.pointer, _sel_expiresDate); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - bool get sessionOnly { - return _objc_msgSend_12(this.pointer, _sel_isSessionOnly); - } - - NSString get domain { - final _ret = _objc_msgSend_21(this.pointer, _sel_domain); - return NSString._(_ret, retain: true, release: true); - } - - NSString get path { - final _ret = _objc_msgSend_21(this.pointer, _sel_path); - return NSString._(_ret, retain: true, release: true); - } - - bool get secure { - return _objc_msgSend_12(this.pointer, _sel_isSecure); - } - - bool get HTTPOnly { - return _objc_msgSend_12(this.pointer, _sel_isHTTPOnly); - } - - NSString? get comment { - final _ret = _objc_msgSend_44(this.pointer, _sel_comment); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSURL? get commentURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_commentURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSArray? get portList { - final _ret = _objc_msgSend_84(this.pointer, _sel_portList); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSString? get sameSitePolicy { - final _ret = _objc_msgSend_44(this.pointer, _sel_sameSitePolicy); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - @override - NSHTTPCookie init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSHTTPCookie._(_ret, retain: true, release: true); - } - - static NSHTTPCookie new1() { - final _ret = _objc_msgSend_2(_class_NSHTTPCookie, _sel_new); - return NSHTTPCookie._(_ret, retain: false, release: true); - } - - static NSHTTPCookie allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSHTTPCookie, _sel_allocWithZone_, zone); - return NSHTTPCookie._(_ret, retain: false, release: true); - } - - static NSHTTPCookie alloc() { - final _ret = _objc_msgSend_2(_class_NSHTTPCookie, _sel_alloc); - return NSHTTPCookie._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSHTTPCookie, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSHTTPCookie, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSHTTPCookie, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSHTTPCookie, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSHTTPCookie, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSHTTPCookie, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSHTTPCookie, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSHTTPCookie, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSHTTPCookie, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSHTTPCookie = objc.getClass("NSHTTPCookie"); -late final _sel_initWithProperties_ = objc.registerName("initWithProperties:"); -final _objc_msgSend_851 = 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_852 = objc.msgSendPointer + bool call(objc.NSObject arg0, objc.NSObject 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_differenceFromOrderedSet_withOptions_usingEquivalenceTest_ = + objc.registerName( + "differenceFromOrderedSet:withOptions:usingEquivalenceTest:"); +final _objc_msgSend_396 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_requestHeaderFieldsWithCookies_ = - objc.registerName("requestHeaderFieldsWithCookies:"); -late final _sel_cookiesWithResponseHeaderFields_forURL_ = - objc.registerName("cookiesWithResponseHeaderFields:forURL:"); -final _objc_msgSend_853 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_differenceFromOrderedSet_withOptions_ = + objc.registerName("differenceFromOrderedSet:withOptions:"); +final _objc_msgSend_397 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_properties = objc.registerName("properties"); -late final _sel_value = objc.registerName("value"); -late final _sel_expiresDate = objc.registerName("expiresDate"); -late final _sel_isSessionOnly = objc.registerName("isSessionOnly"); -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_854 = objc.msgSendPointer + int)>(); +late final _sel_differenceFromOrderedSet_ = + objc.registerName("differenceFromOrderedSet:"); +late final _sel_orderedSetByApplyingDifference_ = + objc.registerName("orderedSetByApplyingDifference:"); +final _objc_msgSend_398 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, + ffi.Pointer 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:"); -late final _sel_setCookies_forURL_mainDocumentURL_ = - objc.registerName("setCookies:forURL:mainDocumentURL:"); -final _objc_msgSend_855 = objc.msgSendPointer +late final _sel_valueForKey_ = objc.registerName("valueForKey:"); +late final _sel_setValue_forKey_ = objc.registerName("setValue:forKey:"); +final _objc_msgSend_399 = 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)>(); -abstract class NSHTTPCookieAcceptPolicy { - static const int NSHTTPCookieAcceptPolicyAlways = 0; - static const int NSHTTPCookieAcceptPolicyNever = 1; - static const int NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain = 2; -} - -late final _sel_cookieAcceptPolicy = objc.registerName("cookieAcceptPolicy"); -final _objc_msgSend_856 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setCookieAcceptPolicy_ = - objc.registerName("setCookieAcceptPolicy:"); -final _objc_msgSend_857 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_sortedCookiesUsingDescriptors_ = - objc.registerName("sortedCookiesUsingDescriptors:"); - -class NSURLSessionTask extends NSObject { - NSURLSessionTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSURLSessionTask] that points to the same underlying object as [other]. - static NSURLSessionTask castFrom(T other) { - return NSURLSessionTask._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSURLSessionTask] that wraps the given raw object pointer. - static NSURLSessionTask castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSessionTask._(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); - } - - int get taskIdentifier { - return _objc_msgSend_10(this.pointer, _sel_taskIdentifier); - } - - NSURLRequest? get originalRequest { - final _ret = _objc_msgSend_876(this.pointer, _sel_originalRequest); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, retain: true, release: true); - } - - NSURLRequest? get currentRequest { - final _ret = _objc_msgSend_876(this.pointer, _sel_currentRequest); - return _ret.address == 0 - ? null - : NSURLRequest._(_ret, retain: true, release: true); - } - - NSURLResponse? get response { - final _ret = _objc_msgSend_878(this.pointer, _sel_response); - return _ret.address == 0 - ? null - : NSURLResponse._(_ret, retain: true, release: true); - } - - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); - } - - NSProgress get progress { - final _ret = _objc_msgSend_879(this.pointer, _sel_progress); - return NSProgress._(_ret, retain: true, release: true); - } - - NSDate? get earliestBeginDate { - final _ret = _objc_msgSend_183(this.pointer, _sel_earliestBeginDate); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } - - set earliestBeginDate(NSDate? value) { - return _objc_msgSend_800(this.pointer, _sel_setEarliestBeginDate_, - value?.pointer ?? ffi.nullptr); - } - - int get countOfBytesClientExpectsToSend { - return _objc_msgSend_666( - this.pointer, _sel_countOfBytesClientExpectsToSend); - } - - set countOfBytesClientExpectsToSend(int value) { - return _objc_msgSend_667( - this.pointer, _sel_setCountOfBytesClientExpectsToSend_, value); - } - - int get countOfBytesClientExpectsToReceive { - return _objc_msgSend_666( - this.pointer, _sel_countOfBytesClientExpectsToReceive); - } - - set countOfBytesClientExpectsToReceive(int value) { - return _objc_msgSend_667( - this.pointer, _sel_setCountOfBytesClientExpectsToReceive_, value); - } - - int get countOfBytesSent { - return _objc_msgSend_666(this.pointer, _sel_countOfBytesSent); - } - - int get countOfBytesReceived { - return _objc_msgSend_666(this.pointer, _sel_countOfBytesReceived); - } - - int get countOfBytesExpectedToSend { - return _objc_msgSend_666(this.pointer, _sel_countOfBytesExpectedToSend); - } - - int get countOfBytesExpectedToReceive { - return _objc_msgSend_666(this.pointer, _sel_countOfBytesExpectedToReceive); - } - - NSString? get taskDescription { - final _ret = _objc_msgSend_44(this.pointer, _sel_taskDescription); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set taskDescription(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setTaskDescription_, value?.pointer ?? ffi.nullptr); - } - - void cancel() { - _objc_msgSend_1(this.pointer, _sel_cancel); - } - - int get state { - return _objc_msgSend_880(this.pointer, _sel_state); - } - - NSError? get error { - final _ret = _objc_msgSend_322(this.pointer, _sel_error); - return _ret.address == 0 - ? null - : NSError._(_ret, retain: true, release: true); - } - - void suspend() { - _objc_msgSend_1(this.pointer, _sel_suspend); - } - - void resume() { - _objc_msgSend_1(this.pointer, _sel_resume); - } - - double get priority { - return objc.useMsgSendVariants - ? _objc_msgSend_239Fpret(this.pointer, _sel_priority) - : _objc_msgSend_239(this.pointer, _sel_priority); - } - - set priority(double value) { - return _objc_msgSend_881(this.pointer, _sel_setPriority_, value); - } - - bool get prefersIncrementalDelivery { - return _objc_msgSend_12(this.pointer, _sel_prefersIncrementalDelivery); - } - - set prefersIncrementalDelivery(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setPrefersIncrementalDelivery_, value); - } - - @override - NSURLSessionTask init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionTask._(_ret, retain: true, release: true); - } - - static NSURLSessionTask new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionTask, _sel_new); - return NSURLSessionTask._(_ret, retain: false, release: true); - } - - static NSURLSessionTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSURLSessionTask, _sel_allocWithZone_, zone); - return NSURLSessionTask._(_ret, retain: false, release: true); - } - - static NSURLSessionTask alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSessionTask, _sel_alloc); - return NSURLSessionTask._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionTask, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSessionTask, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLSessionTask, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionTask, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionTask, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSessionTask, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSURLSessionTask, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSURLSessionTask = objc.getClass("NSURLSessionTask"); -late final _sel_taskIdentifier = objc.registerName("taskIdentifier"); - -class NSURLRequest extends NSObject { - NSURLRequest._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSURLRequest] that points to the same underlying object as [other]. - static NSURLRequest castFrom(T other) { - return NSURLRequest._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSURLRequest] that wraps the given raw object pointer. - static NSURLRequest castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLRequest._(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); - } - - static NSURLRequest requestWithURL_(NSURL URL) { - final _ret = _objc_msgSend_262( - _class_NSURLRequest, _sel_requestWithURL_, URL.pointer); - return NSURLRequest._(_ret, retain: true, release: true); - } - - static bool getSupportsSecureCoding() { - return _objc_msgSend_12(_class_NSURLRequest, _sel_supportsSecureCoding); - } - - static NSURLRequest requestWithURL_cachePolicy_timeoutInterval_( - NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _objc_msgSend_858( - _class_NSURLRequest, - _sel_requestWithURL_cachePolicy_timeoutInterval_, - URL.pointer, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, retain: true, release: true); - } - - NSURLRequest initWithURL_(NSURL URL) { - final _ret = - _objc_msgSend_262(this.pointer, _sel_initWithURL_, URL.pointer); - return NSURLRequest._(_ret, retain: true, release: true); - } - - NSURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _objc_msgSend_858( - this.pointer, - _sel_initWithURL_cachePolicy_timeoutInterval_, - URL.pointer, - cachePolicy, - timeoutInterval); - return NSURLRequest._(_ret, retain: true, release: true); - } - - NSURL? get URL { - final _ret = _objc_msgSend_45(this.pointer, _sel_URL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - int get cachePolicy { - return _objc_msgSend_859(this.pointer, _sel_cachePolicy); - } - - double get timeoutInterval { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_timeoutInterval) - : _objc_msgSend_165(this.pointer, _sel_timeoutInterval); - } - - NSURL? get mainDocumentURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_mainDocumentURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - int get networkServiceType { - return _objc_msgSend_860(this.pointer, _sel_networkServiceType); - } - - bool get allowsCellularAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsCellularAccess); - } - - bool get allowsExpensiveNetworkAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsExpensiveNetworkAccess); - } - - bool get allowsConstrainedNetworkAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsConstrainedNetworkAccess); - } - - bool get assumesHTTP3Capable { - return _objc_msgSend_12(this.pointer, _sel_assumesHTTP3Capable); - } - - int get attribution { - return _objc_msgSend_861(this.pointer, _sel_attribution); - } - - bool get requiresDNSSECValidation { - return _objc_msgSend_12(this.pointer, _sel_requiresDNSSECValidation); - } - - NSString? get HTTPMethod { - final _ret = _objc_msgSend_44(this.pointer, _sel_HTTPMethod); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSDictionary? get allHTTPHeaderFields { - final _ret = _objc_msgSend_390(this.pointer, _sel_allHTTPHeaderFields); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSString? valueForHTTPHeaderField_(NSString field) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_valueForHTTPHeaderField_, field.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSData? get HTTPBody { - final _ret = _objc_msgSend_286(this.pointer, _sel_HTTPBody); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSInputStream? get HTTPBodyStream { - final _ret = _objc_msgSend_875(this.pointer, _sel_HTTPBodyStream); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, retain: true, release: true); - } - - bool get HTTPShouldHandleCookies { - return _objc_msgSend_12(this.pointer, _sel_HTTPShouldHandleCookies); - } - - bool get HTTPShouldUsePipelining { - return _objc_msgSend_12(this.pointer, _sel_HTTPShouldUsePipelining); - } - - @override - NSURLRequest init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLRequest._(_ret, retain: true, release: true); - } - - static NSURLRequest new1() { - final _ret = _objc_msgSend_2(_class_NSURLRequest, _sel_new); - return NSURLRequest._(_ret, retain: false, release: true); - } - - static NSURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSURLRequest, _sel_allocWithZone_, zone); - return NSURLRequest._(_ret, retain: false, release: true); - } - - static NSURLRequest alloc() { - final _ret = _objc_msgSend_2(_class_NSURLRequest, _sel_alloc); - return NSURLRequest._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLRequest, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLRequest, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLRequest, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLRequest, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLRequest, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLRequest, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLRequest, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLRequest, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSURLRequest, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSURLRequest = objc.getClass("NSURLRequest"); -late final _sel_requestWithURL_ = objc.registerName("requestWithURL:"); -late final _sel_supportsSecureCoding = - objc.registerName("supportsSecureCoding"); - -abstract class NSURLRequestCachePolicy { - static const int NSURLRequestUseProtocolCachePolicy = 0; - static const int NSURLRequestReloadIgnoringLocalCacheData = 1; - static const int NSURLRequestReloadIgnoringLocalAndRemoteCacheData = 4; - static const int NSURLRequestReloadIgnoringCacheData = 1; - static const int NSURLRequestReturnCacheDataElseLoad = 2; - static const int NSURLRequestReturnCacheDataDontLoad = 3; - static const int NSURLRequestReloadRevalidatingCacheData = 5; +abstract class NSKeyValueObservingOptions { + static const int NSKeyValueObservingOptionNew = 1; + static const int NSKeyValueObservingOptionOld = 2; + static const int NSKeyValueObservingOptionInitial = 4; + static const int NSKeyValueObservingOptionPrior = 8; } -late final _sel_requestWithURL_cachePolicy_timeoutInterval_ = - objc.registerName("requestWithURL:cachePolicy:timeoutInterval:"); -final _objc_msgSend_858 = objc.msgSendPointer +late final _sel_addObserver_forKeyPath_options_context_ = + objc.registerName("addObserver:forKeyPath:options:context:"); +final _objc_msgSend_400 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, + ffi.Pointer, ffi.Int32, - ffi.Double)>>() + ffi.Pointer)>>() .asFunction< - instancetype Function( + void Function( ffi.Pointer, 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_859 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 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"); - -abstract class NSURLRequestNetworkServiceType { - static const int NSURLNetworkServiceTypeDefault = 0; - static const int NSURLNetworkServiceTypeVoIP = 1; - static const int NSURLNetworkServiceTypeVideo = 2; - static const int NSURLNetworkServiceTypeBackground = 3; - static const int NSURLNetworkServiceTypeVoice = 4; - static const int NSURLNetworkServiceTypeResponsiveData = 6; - static const int NSURLNetworkServiceTypeAVStreaming = 8; - static const int NSURLNetworkServiceTypeResponsiveAV = 9; - static const int NSURLNetworkServiceTypeCallSignaling = 11; -} - -late final _sel_networkServiceType = objc.registerName("networkServiceType"); -final _objc_msgSend_860 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_removeObserver_forKeyPath_context_ = + objc.registerName("removeObserver:forKeyPath:context:"); +final _objc_msgSend_401 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + 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"); - -abstract class NSURLRequestAttribution { - static const int NSURLRequestAttributionDeveloper = 0; - static const int NSURLRequestAttributionUser = 1; -} - -late final _sel_attribution = objc.registerName("attribution"); -final _objc_msgSend_861 = objc.msgSendPointer + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_removeObserver_forKeyPath_ = + objc.registerName("removeObserver:forKeyPath:"); +final _objc_msgSend_402 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + 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"); + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_sortedArrayUsingDescriptors_ = + objc.registerName("sortedArrayUsingDescriptors:"); -class NSInputStream extends NSStream { - NSInputStream._(ffi.Pointer pointer, +class NSPredicate extends objc.NSObject { + NSPredicate._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSInputStream] that points to the same underlying object as [other]. - static NSInputStream castFrom(T other) { - return NSInputStream._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSPredicate] that points to the same underlying object as [other]. + NSPredicate.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSInputStream] that wraps the given raw object pointer. - static NSInputStream castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInputStream._(other, retain: retain, release: release); - } + /// Constructs a [NSPredicate] that wraps the given raw object pointer. + NSPredicate.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 [NSPredicate]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSInputStream); - } - - int read_maxLength_(ffi.Pointer buffer, int len) { - return _objc_msgSend_864(this.pointer, _sel_read_maxLength_, buffer, len); + obj.pointer, _sel_isKindOfClass_, _class_NSPredicate); } - bool getBuffer_length_(ffi.Pointer> buffer, - ffi.Pointer len) { - return _objc_msgSend_873(this.pointer, _sel_getBuffer_length_, buffer, len); + static NSPredicate predicateWithFormat_argumentArray_( + objc.NSString predicateFormat, objc.NSArray? arguments) { + final _ret = _objc_msgSend_403( + _class_NSPredicate, + _sel_predicateWithFormat_argumentArray_, + predicateFormat.pointer, + arguments?.pointer ?? ffi.nullptr); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - bool get hasBytesAvailable { - return _objc_msgSend_12(this.pointer, _sel_hasBytesAvailable); + static NSPredicate predicateWithFormat_(objc.NSString predicateFormat) { + final _ret = _objc_msgSend_404( + _class_NSPredicate, _sel_predicateWithFormat_, predicateFormat.pointer); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - NSInputStream initWithData_(NSData data) { - final _ret = - _objc_msgSend_279(this.pointer, _sel_initWithData_, data.pointer); - return NSInputStream._(_ret, retain: true, release: true); + static NSPredicate predicateWithFormat_arguments_( + objc.NSString predicateFormat, ffi.Pointer<__va_list_tag> argList) { + final _ret = _objc_msgSend_405(_class_NSPredicate, + _sel_predicateWithFormat_arguments_, predicateFormat.pointer, argList); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - NSInputStream? initWithURL_(NSURL url) { - final _ret = - _objc_msgSend_277(this.pointer, _sel_initWithURL_, url.pointer); + static NSPredicate? predicateFromMetadataQueryString_( + objc.NSString queryString) { + final _ret = _objc_msgSend_406(_class_NSPredicate, + _sel_predicateFromMetadataQueryString_, queryString.pointer); return _ret.address == 0 ? null - : NSInputStream._(_ret, retain: true, release: true); + : NSPredicate.castFromPointer(_ret, retain: true, release: true); } - NSInputStream? initWithFileAtPath_(NSString path) { + static NSPredicate predicateWithValue_(bool value) { final _ret = - _objc_msgSend_38(this.pointer, _sel_initWithFileAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, retain: true, release: true); + _objc_msgSend_407(_class_NSPredicate, _sel_predicateWithValue_, value); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - static NSInputStream? inputStreamWithData_(NSData data) { - final _ret = _objc_msgSend_874( - _class_NSInputStream, _sel_inputStreamWithData_, data.pointer); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, retain: true, release: true); + static NSPredicate predicateWithBlock_( + ObjCBlock_bool_objcObjCObject_NSDictionary block) { + final _ret = _objc_msgSend_408( + _class_NSPredicate, _sel_predicateWithBlock_, block.pointer); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - static NSInputStream? inputStreamWithFileAtPath_(NSString path) { - final _ret = _objc_msgSend_38( - _class_NSInputStream, _sel_inputStreamWithFileAtPath_, path.pointer); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, retain: true, release: true); + objc.NSString get predicateFormat { + final _ret = _objc_msgSend_12(this.pointer, _sel_predicateFormat); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSInputStream? inputStreamWithURL_(NSURL url) { - final _ret = _objc_msgSend_277( - _class_NSInputStream, _sel_inputStreamWithURL_, url.pointer); - return _ret.address == 0 - ? null - : NSInputStream._(_ret, retain: true, release: true); + NSPredicate predicateWithSubstitutionVariables_(objc.NSDictionary variables) { + final _ret = _objc_msgSend_409(this.pointer, + _sel_predicateWithSubstitutionVariables_, variables.pointer); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - static void getStreamsToHostWithName_port_inputStream_outputStream_( - NSString hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_867( - _class_NSInputStream, - _sel_getStreamsToHostWithName_port_inputStream_outputStream_, - hostname.pointer, - port, - inputStream, - outputStream); + bool evaluateWithObject_(objc.NSObject? object) { + return _objc_msgSend_410( + this.pointer, _sel_evaluateWithObject_, object?.pointer ?? ffi.nullptr); } - static void getStreamsToHost_port_inputStream_outputStream_( - NSHost host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_871( - _class_NSInputStream, - _sel_getStreamsToHost_port_inputStream_outputStream_, - host.pointer, - port, - inputStream, - outputStream); + bool evaluateWithObject_substitutionVariables_( + objc.NSObject? object, objc.NSDictionary? bindings) { + return _objc_msgSend_411( + this.pointer, + _sel_evaluateWithObject_substitutionVariables_, + object?.pointer ?? ffi.nullptr, + bindings?.pointer ?? ffi.nullptr); } - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_872( - _class_NSInputStream, - _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, - bufferSize, - inputStream, - outputStream); + void allowEvaluation() { + _objc_msgSend_82(this.pointer, _sel_allowEvaluation); } @override - NSInputStream init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSInputStream._(_ret, retain: true, release: true); + NSPredicate init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPredicate.castFromPointer(_ret, retain: true, release: true); } - static NSInputStream new1() { - final _ret = _objc_msgSend_2(_class_NSInputStream, _sel_new); - return NSInputStream._(_ret, retain: false, release: true); + static NSPredicate new1() { + final _ret = _objc_msgSend_40(_class_NSPredicate, _sel_new); + return NSPredicate.castFromPointer(_ret, retain: false, release: true); } - static NSInputStream allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSPredicate allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSInputStream, _sel_allocWithZone_, zone); - return NSInputStream._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSPredicate, _sel_allocWithZone_, zone); + return NSPredicate.castFromPointer(_ret, retain: false, release: true); } - static NSInputStream alloc() { - final _ret = _objc_msgSend_2(_class_NSInputStream, _sel_alloc); - return NSInputStream._(_ret, retain: false, release: true); + static NSPredicate alloc() { + final _ret = _objc_msgSend_40(_class_NSPredicate, _sel_alloc); + return NSPredicate.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSInputStream, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPredicate, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSInputStream, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPredicate, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSInputStream, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSPredicate, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSInputStream, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSPredicate, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSInputStream, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPredicate, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSInputStream, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPredicate, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSInputStream, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPredicate, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSInputStream, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPredicate, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSInputStream, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSPredicate, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSInputStream = objc.getClass("NSInputStream"); - -class NSStream extends NSObject { - NSStream._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSStream] that points to the same underlying object as [other]. - static NSStream castFrom(T other) { - return NSStream._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSStream] that wraps the given raw object pointer. - static NSStream castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSStream._(other, retain: retain, release: release); - } +late final _class_NSPredicate = objc.getClass("NSPredicate"); +late final _sel_predicateWithFormat_argumentArray_ = + objc.registerName("predicateWithFormat:argumentArray:"); +final _objc_msgSend_403 = 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_predicateWithFormat_ = + objc.registerName("predicateWithFormat:"); +final _objc_msgSend_404 = 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_predicateWithFormat_arguments_ = + objc.registerName("predicateWithFormat:arguments:"); +final _objc_msgSend_405 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); +late final _sel_predicateFromMetadataQueryString_ = + objc.registerName("predicateFromMetadataQueryString:"); +final _objc_msgSend_406 = 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_predicateWithValue_ = objc.registerName("predicateWithValue:"); +final _objc_msgSend_407 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, bool)>(); +bool _ObjCBlock_bool_objcObjCObject_NSDictionary_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); +final _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_NSDictionary_registerClosure( + bool Function( + ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Returns whether [obj] is an instance of [NSStream]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSStream); - } +bool _ObjCBlock_bool_objcObjCObject_NSDictionary_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_objcObjCObject_NSDictionary_closureRegistry[ + block.ref.target.address]!(arg0, arg1); - void open() { - _objc_msgSend_1(this.pointer, _sel_open); - } +class ObjCBlock_bool_objcObjCObject_NSDictionary extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_NSDictionary._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); - void close() { - _objc_msgSend_1(this.pointer, _sel_close); + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_bool_objcObjCObject_NSDictionary castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_NSDictionary._(pointer, + retain: retain, release: release); } - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_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_bool_objcObjCObject_NSDictionary.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_NSDictionary_fnPtrTrampoline, + false) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - set delegate(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); - } + /// 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_objcObjCObject_NSDictionary.fromFunction( + bool Function(objc.NSObject?, objc.NSDictionary?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_NSDictionary_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_objcObjCObject_NSDictionary_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : objc.NSObject.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : objc.NSDictionary.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - NSObject? propertyForKey_(NSString key) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_propertyForKey_, key.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } + bool call(objc.NSObject? arg0, objc.NSDictionary? 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 ?? ffi.nullptr, arg1?.pointer ?? ffi.nullptr); +} - bool setProperty_forKey_(NSObject? property, NSString key) { - return _objc_msgSend_862(this.pointer, _sel_setProperty_forKey_, - property?.pointer ?? ffi.nullptr, key.pointer); - } +late final _sel_predicateWithBlock_ = objc.registerName("predicateWithBlock:"); +final _objc_msgSend_408 = 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_predicateFormat = objc.registerName("predicateFormat"); +late final _sel_predicateWithSubstitutionVariables_ = + objc.registerName("predicateWithSubstitutionVariables:"); +final _objc_msgSend_409 = 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_evaluateWithObject_ = objc.registerName("evaluateWithObject:"); +final _objc_msgSend_410 = 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_evaluateWithObject_substitutionVariables_ = + objc.registerName("evaluateWithObject:substitutionVariables:"); +final _objc_msgSend_411 = 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_allowEvaluation = objc.registerName("allowEvaluation"); +late final _sel_filteredOrderedSetUsingPredicate_ = + objc.registerName("filteredOrderedSetUsingPredicate:"); +final _objc_msgSend_412 = 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 scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_scheduleInRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); - } +class NSMutableOrderedSet extends NSOrderedSet { + NSMutableOrderedSet._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_removeFromRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); - } + /// Constructs a [NSMutableOrderedSet] that points to the same underlying object as [other]. + NSMutableOrderedSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - int get streamStatus { - return _objc_msgSend_863(this.pointer, _sel_streamStatus); - } + /// Constructs a [NSMutableOrderedSet] that wraps the given raw object pointer. + NSMutableOrderedSet.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - NSError? get streamError { - final _ret = _objc_msgSend_322(this.pointer, _sel_streamError); - return _ret.address == 0 - ? null - : NSError._(_ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSMutableOrderedSet]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableOrderedSet); } - static void getStreamsToHostWithName_port_inputStream_outputStream_( - NSString hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_867( - _class_NSStream, - _sel_getStreamsToHostWithName_port_inputStream_outputStream_, - hostname.pointer, - port, - inputStream, - outputStream); + void insertObject_atIndex_(objc.NSObject object, int idx) { + _objc_msgSend_413( + this.pointer, _sel_insertObject_atIndex_, object.pointer, idx); } - static void getStreamsToHost_port_inputStream_outputStream_( - NSHost host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_871( - _class_NSStream, - _sel_getStreamsToHost_port_inputStream_outputStream_, - host.pointer, - port, - inputStream, - outputStream); + void removeObjectAtIndex_(int idx) { + _objc_msgSend_414(this.pointer, _sel_removeObjectAtIndex_, idx); } - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_872( - _class_NSStream, - _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, - bufferSize, - inputStream, - outputStream); + void replaceObjectAtIndex_withObject_(int idx, objc.NSObject object) { + _objc_msgSend_415(this.pointer, _sel_replaceObjectAtIndex_withObject_, idx, + object.pointer); } @override - NSStream init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSStream._(_ret, retain: true, release: true); - } - - static NSStream new1() { - final _ret = _objc_msgSend_2(_class_NSStream, _sel_new); - return NSStream._(_ret, retain: false, release: true); - } - - static NSStream allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSStream, _sel_allocWithZone_, zone); - return NSStream._(_ret, retain: false, release: true); - } - - static NSStream alloc() { - final _ret = _objc_msgSend_2(_class_NSStream, _sel_alloc); - return NSStream._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSStream, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSStream, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSStream, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSStream, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSStream, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSStream, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSStream, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { + NSMutableOrderedSet? initWithCoder_(objc.NSCoder coder) { final _ret = - _objc_msgSend_85(_class_NSStream, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSStream, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + @override + NSMutableOrderedSet init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } -} - -late final _class_NSStream = objc.getClass("NSStream"); -late final _sel_open = objc.registerName("open"); -late final _sel_close = objc.registerName("close"); -final _objc_msgSend_862 = 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)>(); - -abstract class NSStreamStatus { - static const int NSStreamStatusNotOpen = 0; - static const int NSStreamStatusOpening = 1; - static const int NSStreamStatusOpen = 2; - static const int NSStreamStatusReading = 3; - static const int NSStreamStatusWriting = 4; - static const int NSStreamStatusAtEnd = 5; - static const int NSStreamStatusClosed = 6; - static const int NSStreamStatusError = 7; -} -late final _sel_streamStatus = objc.registerName("streamStatus"); -final _objc_msgSend_863 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_streamError = objc.registerName("streamError"); + NSMutableOrderedSet initWithCapacity_(int numItems) { + final _ret = + _objc_msgSend_355(this.pointer, _sel_initWithCapacity_, numItems); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); + } -class NSOutputStream extends NSStream { - NSOutputStream._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + void addObject_(objc.NSObject object) { + _objc_msgSend_49(this.pointer, _sel_addObject_, object.pointer); + } - /// Returns a [NSOutputStream] that points to the same underlying object as [other]. - static NSOutputStream castFrom(T other) { - return NSOutputStream._(other.pointer, retain: true, release: true); + void addObjects_count_( + ffi.Pointer> objects, int count) { + _objc_msgSend_416(this.pointer, _sel_addObjects_count_, objects, count); } - /// Returns a [NSOutputStream] that wraps the given raw object pointer. - static NSOutputStream castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOutputStream._(other, retain: retain, release: release); + void addObjectsFromArray_(objc.NSArray array) { + _objc_msgSend_242(this.pointer, _sel_addObjectsFromArray_, array.pointer); } - /// Returns whether [obj] is an instance of [NSOutputStream]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSOutputStream); + void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { + _objc_msgSend_417(this.pointer, + _sel_exchangeObjectAtIndex_withObjectAtIndex_, idx1, idx2); } - int write_maxLength_(ffi.Pointer buffer, int len) { - return _objc_msgSend_864(this.pointer, _sel_write_maxLength_, buffer, len); + void moveObjectsAtIndexes_toIndex_(objc.NSIndexSet indexes, int idx) { + _objc_msgSend_418( + this.pointer, _sel_moveObjectsAtIndexes_toIndex_, indexes.pointer, idx); } - bool get hasSpaceAvailable { - return _objc_msgSend_12(this.pointer, _sel_hasSpaceAvailable); + void insertObjects_atIndexes_(objc.NSArray objects, objc.NSIndexSet indexes) { + _objc_msgSend_419(this.pointer, _sel_insertObjects_atIndexes_, + objects.pointer, indexes.pointer); } - NSOutputStream initToMemory() { - final _ret = _objc_msgSend_2(this.pointer, _sel_initToMemory); - return NSOutputStream._(_ret, retain: true, release: true); + void setObject_atIndex_(objc.NSObject obj, int idx) { + _objc_msgSend_413(this.pointer, _sel_setObject_atIndex_, obj.pointer, idx); } - NSOutputStream initToBuffer_capacity_( - ffi.Pointer buffer, int capacity) { - final _ret = _objc_msgSend_865( - this.pointer, _sel_initToBuffer_capacity_, buffer, capacity); - return NSOutputStream._(_ret, retain: true, release: true); + void setObject_atIndexedSubscript_(objc.NSObject obj, int idx) { + _objc_msgSend_413( + this.pointer, _sel_setObject_atIndexedSubscript_, obj.pointer, idx); } - NSOutputStream? initWithURL_append_(NSURL url, bool shouldAppend) { - final _ret = _objc_msgSend_866( - this.pointer, _sel_initWithURL_append_, url.pointer, shouldAppend); - return _ret.address == 0 - ? null - : NSOutputStream._(_ret, retain: true, release: true); + void replaceObjectsInRange_withObjects_count_(_NSRange range, + ffi.Pointer> objects, int count) { + _objc_msgSend_420(this.pointer, + _sel_replaceObjectsInRange_withObjects_count_, range, objects, count); } - NSOutputStream? initToFileAtPath_append_(NSString path, bool shouldAppend) { - final _ret = _objc_msgSend_40(this.pointer, _sel_initToFileAtPath_append_, - path.pointer, shouldAppend); - return _ret.address == 0 - ? null - : NSOutputStream._(_ret, retain: true, release: true); + void replaceObjectsAtIndexes_withObjects_( + objc.NSIndexSet indexes, objc.NSArray objects) { + _objc_msgSend_421(this.pointer, _sel_replaceObjectsAtIndexes_withObjects_, + indexes.pointer, objects.pointer); } - static NSOutputStream outputStreamToMemory() { - final _ret = - _objc_msgSend_2(_class_NSOutputStream, _sel_outputStreamToMemory); - return NSOutputStream._(_ret, retain: true, release: true); + void removeObjectsInRange_(_NSRange range) { + _objc_msgSend_81(this.pointer, _sel_removeObjectsInRange_, range); } - static NSOutputStream outputStreamToBuffer_capacity_( - ffi.Pointer buffer, int capacity) { - final _ret = _objc_msgSend_865(_class_NSOutputStream, - _sel_outputStreamToBuffer_capacity_, buffer, capacity); - return NSOutputStream._(_ret, retain: true, release: true); + void removeObjectsAtIndexes_(objc.NSIndexSet indexes) { + _objc_msgSend_422( + this.pointer, _sel_removeObjectsAtIndexes_, indexes.pointer); } - static NSOutputStream outputStreamToFileAtPath_append_( - NSString path, bool shouldAppend) { - final _ret = _objc_msgSend_30(_class_NSOutputStream, - _sel_outputStreamToFileAtPath_append_, path.pointer, shouldAppend); - return NSOutputStream._(_ret, retain: true, release: true); + void removeAllObjects() { + _objc_msgSend_82(this.pointer, _sel_removeAllObjects); } - static NSOutputStream? outputStreamWithURL_append_( - NSURL url, bool shouldAppend) { - final _ret = _objc_msgSend_866(_class_NSOutputStream, - _sel_outputStreamWithURL_append_, url.pointer, shouldAppend); - return _ret.address == 0 - ? null - : NSOutputStream._(_ret, retain: true, release: true); + void removeObject_(objc.NSObject object) { + _objc_msgSend_49(this.pointer, _sel_removeObject_, object.pointer); } - static void getStreamsToHostWithName_port_inputStream_outputStream_( - NSString hostname, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_867( - _class_NSOutputStream, - _sel_getStreamsToHostWithName_port_inputStream_outputStream_, - hostname.pointer, - port, - inputStream, - outputStream); + void removeObjectsInArray_(objc.NSArray array) { + _objc_msgSend_242(this.pointer, _sel_removeObjectsInArray_, array.pointer); } - static void getStreamsToHost_port_inputStream_outputStream_( - NSHost host, - int port, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_871( - _class_NSOutputStream, - _sel_getStreamsToHost_port_inputStream_outputStream_, - host.pointer, - port, - inputStream, - outputStream); + void intersectOrderedSet_(NSOrderedSet other) { + _objc_msgSend_423(this.pointer, _sel_intersectOrderedSet_, other.pointer); } - static void getBoundStreamsWithBufferSize_inputStream_outputStream_( - int bufferSize, - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - _objc_msgSend_872( - _class_NSOutputStream, - _sel_getBoundStreamsWithBufferSize_inputStream_outputStream_, - bufferSize, - inputStream, - outputStream); + void minusOrderedSet_(NSOrderedSet other) { + _objc_msgSend_423(this.pointer, _sel_minusOrderedSet_, other.pointer); } - @override - NSOutputStream init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSOutputStream._(_ret, retain: true, release: true); + void unionOrderedSet_(NSOrderedSet other) { + _objc_msgSend_423(this.pointer, _sel_unionOrderedSet_, other.pointer); } - static NSOutputStream new1() { - final _ret = _objc_msgSend_2(_class_NSOutputStream, _sel_new); - return NSOutputStream._(_ret, retain: false, release: true); + void intersectSet_(objc.NSSet other) { + _objc_msgSend_424(this.pointer, _sel_intersectSet_, other.pointer); } - static NSOutputStream allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSOutputStream, _sel_allocWithZone_, zone); - return NSOutputStream._(_ret, retain: false, release: true); + void minusSet_(objc.NSSet other) { + _objc_msgSend_424(this.pointer, _sel_minusSet_, other.pointer); } - static NSOutputStream alloc() { - final _ret = _objc_msgSend_2(_class_NSOutputStream, _sel_alloc); - return NSOutputStream._(_ret, retain: false, release: true); + void unionSet_(objc.NSSet other) { + _objc_msgSend_424(this.pointer, _sel_unionSet_, other.pointer); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSOutputStream, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + void sortUsingComparator_( + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_425(this.pointer, _sel_sortUsingComparator_, cmptr.pointer); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSOutputStream, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + void sortWithOptions_usingComparator_(int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_426(this.pointer, _sel_sortWithOptions_usingComparator_, opts, + cmptr.pointer); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSOutputStream, _sel_accessInstanceVariablesDirectly); + void sortRange_options_usingComparator_(_NSRange range, int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_427(this.pointer, _sel_sortRange_options_usingComparator_, + range, opts, cmptr.pointer); } - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSOutputStream, _sel_useStoredAccessor); + static NSMutableOrderedSet orderedSetWithCapacity_(int numItems) { + final _ret = _objc_msgSend_355( + _class_NSMutableOrderedSet, _sel_orderedSetWithCapacity_, numItems); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSOutputStream, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + void applyDifference_(objc.NSObject difference) { + _objc_msgSend_49(this.pointer, _sel_applyDifference_, difference.pointer); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSOutputStream, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + void sortUsingDescriptors_(objc.NSArray sortDescriptors) { + _objc_msgSend_242( + this.pointer, _sel_sortUsingDescriptors_, sortDescriptors.pointer); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSOutputStream, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + void filterUsingPredicate_(NSPredicate p) { + _objc_msgSend_428(this.pointer, _sel_filterUsingPredicate_, p.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSOutputStream, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + @override + NSMutableOrderedSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSOutputStream, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static NSMutableOrderedSet orderedSet() { + final _ret = _objc_msgSend_40(_class_NSMutableOrderedSet, _sel_orderedSet); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } -} -late final _class_NSOutputStream = objc.getClass("NSOutputStream"); -late final _sel_write_maxLength_ = objc.registerName("write:maxLength:"); -final _objc_msgSend_864 = 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_hasSpaceAvailable = objc.registerName("hasSpaceAvailable"); -late final _sel_initToMemory = objc.registerName("initToMemory"); -late final _sel_initToBuffer_capacity_ = - objc.registerName("initToBuffer:capacity:"); -final _objc_msgSend_865 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer, int)>(); -late final _sel_initWithURL_append_ = objc.registerName("initWithURL:append:"); -final _objc_msgSend_866 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_initToFileAtPath_append_ = - objc.registerName("initToFileAtPath:append:"); -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_867 = 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>)>(); + static NSMutableOrderedSet orderedSetWithObject_(objc.NSObject object) { + final _ret = _objc_msgSend_387( + _class_NSMutableOrderedSet, _sel_orderedSetWithObject_, object.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); + } -class NSHost extends NSObject { - NSHost._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + static NSMutableOrderedSet orderedSetWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_365(_class_NSMutableOrderedSet, + _sel_orderedSetWithObjects_count_, objects, cnt); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); + } - /// Returns a [NSHost] that points to the same underlying object as [other]. - static NSHost castFrom(T other) { - return NSHost._(other.pointer, retain: true, release: true); + static NSMutableOrderedSet orderedSetWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387(_class_NSMutableOrderedSet, + _sel_orderedSetWithObjects_, firstObj.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - /// Returns a [NSHost] that wraps the given raw object pointer. - static NSHost castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSHost._(other, retain: retain, release: release); + static NSMutableOrderedSet orderedSetWithOrderedSet_(NSOrderedSet set) { + final _ret = _objc_msgSend_388(_class_NSMutableOrderedSet, + _sel_orderedSetWithOrderedSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSHost]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSHost); + static NSMutableOrderedSet orderedSetWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389( + _class_NSMutableOrderedSet, + _sel_orderedSetWithOrderedSet_range_copyItems_, + set.pointer, + range, + flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static NSHost currentHost() { - final _ret = _objc_msgSend_2(_class_NSHost, _sel_currentHost); - return NSHost._(_ret, retain: true, release: true); + static NSMutableOrderedSet orderedSetWithArray_(objc.NSArray array) { + final _ret = _objc_msgSend_390( + _class_NSMutableOrderedSet, _sel_orderedSetWithArray_, array.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSHost hostWithName_(NSString? name) { - final _ret = _objc_msgSend_868( - _class_NSHost, _sel_hostWithName_, name?.pointer ?? ffi.nullptr); - return NSHost._(_ret, retain: true, release: true); + static NSMutableOrderedSet orderedSetWithArray_range_copyItems_( + objc.NSArray array, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(_class_NSMutableOrderedSet, + _sel_orderedSetWithArray_range_copyItems_, array.pointer, range, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static NSHost hostWithAddress_(NSString address) { - final _ret = - _objc_msgSend_31(_class_NSHost, _sel_hostWithAddress_, address.pointer); - return NSHost._(_ret, retain: true, release: true); + static NSMutableOrderedSet orderedSetWithSet_(objc.NSSet set) { + final _ret = _objc_msgSend_392( + _class_NSMutableOrderedSet, _sel_orderedSetWithSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - bool isEqualToHost_(NSHost aHost) { - return _objc_msgSend_869(this.pointer, _sel_isEqualToHost_, aHost.pointer); + static NSMutableOrderedSet orderedSetWithSet_copyItems_( + objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393(_class_NSMutableOrderedSet, + _sel_orderedSetWithSet_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - NSString? get name { - final _ret = _objc_msgSend_44(this.pointer, _sel_name); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + @override + NSMutableOrderedSet initWithObject_(objc.NSObject object) { + final _ret = + _objc_msgSend_387(this.pointer, _sel_initWithObject_, object.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - NSArray get names { - final _ret = _objc_msgSend_85(this.pointer, _sel_names); - return NSArray._(_ret, retain: true, release: true); + @override + NSMutableOrderedSet initWithObjects_(objc.NSObject firstObj) { + final _ret = _objc_msgSend_387( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - NSString? get address { - final _ret = _objc_msgSend_44(this.pointer, _sel_address); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + @override + NSMutableOrderedSet initWithOrderedSet_(NSOrderedSet set) { + final _ret = + _objc_msgSend_388(this.pointer, _sel_initWithOrderedSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - NSArray get addresses { - final _ret = _objc_msgSend_85(this.pointer, _sel_addresses); - return NSArray._(_ret, retain: true, release: true); + @override + NSMutableOrderedSet initWithOrderedSet_copyItems_( + NSOrderedSet set, bool flag) { + final _ret = _objc_msgSend_394( + this.pointer, _sel_initWithOrderedSet_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - NSString? get localizedName { - final _ret = _objc_msgSend_44(this.pointer, _sel_localizedName); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + @override + NSMutableOrderedSet initWithOrderedSet_range_copyItems_( + NSOrderedSet set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_389(this.pointer, + _sel_initWithOrderedSet_range_copyItems_, set.pointer, range, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static void setHostCacheEnabled_(bool flag) { - _objc_msgSend_870(_class_NSHost, _sel_setHostCacheEnabled_, flag); + @override + NSMutableOrderedSet initWithArray_(objc.NSArray array) { + final _ret = + _objc_msgSend_390(this.pointer, _sel_initWithArray_, array.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static bool isHostCacheEnabled() { - return _objc_msgSend_12(_class_NSHost, _sel_isHostCacheEnabled); + @override + NSMutableOrderedSet initWithArray_copyItems_(objc.NSArray set, bool flag) { + final _ret = _objc_msgSend_395( + this.pointer, _sel_initWithArray_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static void flushHostCache() { - _objc_msgSend_1(_class_NSHost, _sel_flushHostCache); + @override + NSMutableOrderedSet initWithArray_range_copyItems_( + objc.NSArray set, _NSRange range, bool flag) { + final _ret = _objc_msgSend_391(this.pointer, + _sel_initWithArray_range_copyItems_, set.pointer, range, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } @override - NSHost init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSHost._(_ret, retain: true, release: true); + NSMutableOrderedSet initWithSet_(objc.NSSet set) { + final _ret = + _objc_msgSend_392(this.pointer, _sel_initWithSet_, set.pointer); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: true, release: true); } - static NSHost new1() { - final _ret = _objc_msgSend_2(_class_NSHost, _sel_new); - return NSHost._(_ret, retain: false, release: true); + @override + NSMutableOrderedSet initWithSet_copyItems_(objc.NSSet set, bool flag) { + final _ret = _objc_msgSend_393( + this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static NSHost allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSHost, _sel_allocWithZone_, zone); - return NSHost._(_ret, retain: false, release: true); + static NSMutableOrderedSet new1() { + final _ret = _objc_msgSend_40(_class_NSMutableOrderedSet, _sel_new); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } - static NSHost alloc() { - final _ret = _objc_msgSend_2(_class_NSHost, _sel_alloc); - return NSHost._(_ret, retain: false, release: true); + static NSMutableOrderedSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSMutableOrderedSet, _sel_allocWithZone_, zone); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); + } + + static NSMutableOrderedSet alloc() { + final _ret = _objc_msgSend_40(_class_NSMutableOrderedSet, _sel_alloc); + return NSMutableOrderedSet.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSHost, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMutableOrderedSet, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSHost, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMutableOrderedSet, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSHost, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSMutableOrderedSet, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSHost, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSMutableOrderedSet, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSHost, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMutableOrderedSet, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64( - _class_NSHost, _sel_automaticallyNotifiesObserversForKey_, key.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMutableOrderedSet, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSHost, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMutableOrderedSet, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSHost, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMutableOrderedSet, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSHost, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMutableOrderedSet, _sel_classForKeyedUnarchiver); + return objc.NSObject.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:"); -final _objc_msgSend_868 = objc.msgSendPointer +late final _class_NSMutableOrderedSet = objc.getClass("NSMutableOrderedSet"); +late final _sel_insertObject_atIndex_ = + objc.registerName("insertObject:atIndex:"); +final _objc_msgSend_413 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_removeObjectAtIndex_ = + objc.registerName("removeObjectAtIndex:"); +final _objc_msgSend_414 = 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_replaceObjectAtIndex_withObject_ = + objc.registerName("replaceObjectAtIndex:withObject:"); +final _objc_msgSend_415 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_initWithCapacity_ = objc.registerName("initWithCapacity:"); +late final _sel_addObject_ = objc.registerName("addObject:"); +late final _sel_addObjects_count_ = objc.registerName("addObjects:count:"); +final _objc_msgSend_416 = 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_addObjectsFromArray_ = + objc.registerName("addObjectsFromArray:"); +late final _sel_exchangeObjectAtIndex_withObjectAtIndex_ = + objc.registerName("exchangeObjectAtIndex:withObjectAtIndex:"); +final _objc_msgSend_417 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_moveObjectsAtIndexes_toIndex_ = + objc.registerName("moveObjectsAtIndexes:toIndex:"); +final _objc_msgSend_418 = 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_insertObjects_atIndexes_ = + objc.registerName("insertObjects:atIndexes:"); +final _objc_msgSend_419 = 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_setObject_atIndex_ = objc.registerName("setObject:atIndex:"); +late final _sel_setObject_atIndexedSubscript_ = + objc.registerName("setObject:atIndexedSubscript:"); +late final _sel_replaceObjectsInRange_withObjects_count_ = + objc.registerName("replaceObjectsInRange:withObjects:count:"); +final _objc_msgSend_420 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer>, + int)>(); +late final _sel_replaceObjectsAtIndexes_withObjects_ = + objc.registerName("replaceObjectsAtIndexes:withObjects:"); +final _objc_msgSend_421 = 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_removeObjectsInRange_ = + objc.registerName("removeObjectsInRange:"); +late final _sel_removeObjectsAtIndexes_ = + objc.registerName("removeObjectsAtIndexes:"); +final _objc_msgSend_422 = 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_hostWithAddress_ = objc.registerName("hostWithAddress:"); -late final _sel_isEqualToHost_ = objc.registerName("isEqualToHost:"); -final _objc_msgSend_869 = objc.msgSendPointer +late final _sel_removeAllObjects = objc.registerName("removeAllObjects"); +late final _sel_removeObject_ = objc.registerName("removeObject:"); +late final _sel_removeObjectsInArray_ = + objc.registerName("removeObjectsInArray:"); +late final _sel_intersectOrderedSet_ = + objc.registerName("intersectOrderedSet:"); +final _objc_msgSend_423 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - bool Function(ffi.Pointer, + void 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_870 = objc.msgSendPointer +late final _sel_minusOrderedSet_ = objc.registerName("minusOrderedSet:"); +late final _sel_unionOrderedSet_ = objc.registerName("unionOrderedSet:"); +late final _sel_intersectSet_ = objc.registerName("intersectSet:"); +final _objc_msgSend_424 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .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_871 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_minusSet_ = objc.registerName("minusSet:"); +late final _sel_unionSet_ = objc.registerName("unionSet:"); +late final _sel_sortUsingComparator_ = + objc.registerName("sortUsingComparator:"); +final _objc_msgSend_425 = 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_sortWithOptions_usingComparator_ = + objc.registerName("sortWithOptions:usingComparator:"); +final _objc_msgSend_426 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer>, - ffi.Pointer>)>>() + ffi.Int32, + 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_872 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_sortRange_options_usingComparator_ = + objc.registerName("sortRange:options:usingComparator:"); +final _objc_msgSend_427 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - ffi.Pointer>, - ffi.Pointer>)>>() + _NSRange, + ffi.Int32, + ffi.Pointer)>>() .asFunction< void Function( ffi.Pointer, ffi.Pointer, + _NSRange, int, - ffi.Pointer>, - ffi.Pointer>)>(); -late final _sel_read_maxLength_ = objc.registerName("read:maxLength:"); -late final _sel_getBuffer_length_ = objc.registerName("getBuffer:length:"); -final _objc_msgSend_873 = 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_initWithFileAtPath_ = objc.registerName("initWithFileAtPath:"); -late final _sel_inputStreamWithData_ = - objc.registerName("inputStreamWithData:"); -final _objc_msgSend_874 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_orderedSetWithCapacity_ = + objc.registerName("orderedSetWithCapacity:"); +late final _sel_applyDifference_ = objc.registerName("applyDifference:"); +late final _sel_sortUsingDescriptors_ = + objc.registerName("sortUsingDescriptors:"); +late final _sel_filterUsingPredicate_ = + objc.registerName("filterUsingPredicate:"); +final _objc_msgSend_428 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, + void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_inputStreamWithFileAtPath_ = - objc.registerName("inputStreamWithFileAtPath:"); -late final _sel_inputStreamWithURL_ = objc.registerName("inputStreamWithURL:"); -late final _sel_HTTPBodyStream = objc.registerName("HTTPBodyStream"); -final _objc_msgSend_875 = 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_876 = 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"); -class NSURLResponse extends NSObject { - NSURLResponse._(ffi.Pointer pointer, +class NSMorphology extends objc.NSObject { + NSMorphology._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLResponse] that points to the same underlying object as [other]. - static NSURLResponse castFrom(T other) { - return NSURLResponse._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSMorphology] that points to the same underlying object as [other]. + NSMorphology.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSURLResponse] that wraps the given raw object pointer. - static NSURLResponse castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLResponse._(other, retain: retain, release: release); - } + /// 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 [NSURLResponse]. + /// Returns whether [obj] is an instance of [NSMorphology]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLResponse); + obj.pointer, _sel_isKindOfClass_, _class_NSMorphology); } - NSURLResponse initWithURL_MIMEType_expectedContentLength_textEncodingName_( - NSURL URL, NSString? MIMEType, int length, NSString? name) { - final _ret = _objc_msgSend_877( - this.pointer, - _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_, - URL.pointer, - MIMEType?.pointer ?? ffi.nullptr, - length, - name?.pointer ?? ffi.nullptr); - return NSURLResponse._(_ret, retain: true, release: true); + int get grammaticalGender { + return _objc_msgSend_429(this.pointer, _sel_grammaticalGender); } - NSURL? get URL { - final _ret = _objc_msgSend_45(this.pointer, _sel_URL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + set grammaticalGender(int value) { + return _objc_msgSend_430(this.pointer, _sel_setGrammaticalGender_, value); } - NSString? get MIMEType { - final _ret = _objc_msgSend_44(this.pointer, _sel_MIMEType); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + int get partOfSpeech { + return _objc_msgSend_431(this.pointer, _sel_partOfSpeech); } - int get expectedContentLength { - return _objc_msgSend_238(this.pointer, _sel_expectedContentLength); + set partOfSpeech(int value) { + return _objc_msgSend_432(this.pointer, _sel_setPartOfSpeech_, value); } - NSString? get textEncodingName { - final _ret = _objc_msgSend_44(this.pointer, _sel_textEncodingName); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + int get number { + return _objc_msgSend_433(this.pointer, _sel_number); + } + + set number(int value) { + return _objc_msgSend_434(this.pointer, _sel_setNumber_, value); + } + + int get grammaticalCase { + return _objc_msgSend_435(this.pointer, _sel_grammaticalCase); + } + + set grammaticalCase(int value) { + return _objc_msgSend_436(this.pointer, _sel_setGrammaticalCase_, value); + } + + int get determination { + return _objc_msgSend_437(this.pointer, _sel_determination); + } + + set determination(int value) { + return _objc_msgSend_438(this.pointer, _sel_setDetermination_, value); + } + + int get grammaticalPerson { + return _objc_msgSend_439(this.pointer, _sel_grammaticalPerson); + } + + set grammaticalPerson(int value) { + return _objc_msgSend_440(this.pointer, _sel_setGrammaticalPerson_, value); + } + + int get pronounType { + return _objc_msgSend_441(this.pointer, _sel_pronounType); + } + + set pronounType(int value) { + return _objc_msgSend_442(this.pointer, _sel_setPronounType_, value); } - NSString? get suggestedFilename { - final _ret = _objc_msgSend_44(this.pointer, _sel_suggestedFilename); + int get definiteness { + return _objc_msgSend_443(this.pointer, _sel_definiteness); + } + + set definiteness(int value) { + return _objc_msgSend_444(this.pointer, _sel_setDefiniteness_, value); + } + + NSMorphologyCustomPronoun? customPronounForLanguage_(objc.NSString language) { + final _ret = _objc_msgSend_446( + this.pointer, _sel_customPronounForLanguage_, language.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: true, release: true); + } + + bool setCustomPronoun_forLanguage_error_(NSMorphologyCustomPronoun? features, + objc.NSString language, ffi.Pointer> error) { + return _objc_msgSend_447( + this.pointer, + _sel_setCustomPronoun_forLanguage_error_, + features?.pointer ?? ffi.nullptr, + language.pointer, + error); + } + + bool get unspecified { + return _objc_msgSend_7(this.pointer, _sel_isUnspecified); + } + + static NSMorphology getUserMorphology() { + final _ret = _objc_msgSend_448(_class_NSMorphology, _sel_userMorphology); + return NSMorphology.castFromPointer(_ret, retain: true, release: true); } @override - NSURLResponse init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLResponse._(_ret, retain: true, release: true); + NSMorphology init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMorphology.castFromPointer(_ret, retain: true, release: true); } - static NSURLResponse new1() { - final _ret = _objc_msgSend_2(_class_NSURLResponse, _sel_new); - return NSURLResponse._(_ret, retain: false, release: true); + static NSMorphology new1() { + final _ret = _objc_msgSend_40(_class_NSMorphology, _sel_new); + return NSMorphology.castFromPointer(_ret, retain: false, release: true); } - static NSURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSMorphology allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSURLResponse, _sel_allocWithZone_, zone); - return NSURLResponse._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSMorphology, _sel_allocWithZone_, zone); + return NSMorphology.castFromPointer(_ret, retain: false, release: true); } - static NSURLResponse alloc() { - final _ret = _objc_msgSend_2(_class_NSURLResponse, _sel_alloc); - return NSURLResponse._(_ret, retain: false, release: true); + static NSMorphology alloc() { + final _ret = _objc_msgSend_40(_class_NSMorphology, _sel_alloc); + return NSMorphology.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLResponse, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMorphology, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLResponse, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMorphology, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLResponse, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSMorphology, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLResponse, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSMorphology, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLResponse, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMorphology, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLResponse, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMorphology, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLResponse, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMorphology, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLResponse, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMorphology, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSURLResponse, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSMorphology, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSURLResponse = objc.getClass("NSURLResponse"); -late final _sel_initWithURL_MIMEType_expectedContentLength_textEncodingName_ = - objc.registerName( - "initWithURL:MIMEType:expectedContentLength:textEncodingName:"); -final _objc_msgSend_877 = objc.msgSendPointer +late final _class_NSMorphology = objc.getClass("NSMorphology"); + +abstract class NSGrammaticalGender { + static const int NSGrammaticalGenderNotSet = 0; + static const int NSGrammaticalGenderFeminine = 1; + static const int NSGrammaticalGenderMasculine = 2; + static const int NSGrammaticalGenderNeuter = 3; +} + +late final _sel_grammaticalGender = objc.registerName("grammaticalGender"); +final _objc_msgSend_429 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer)>>() + ffi.Int32 Function(ffi.Pointer, + 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"); -late final _sel_textEncodingName = objc.registerName("textEncodingName"); -late final _sel_suggestedFilename = objc.registerName("suggestedFilename"); -late final _sel_response = objc.registerName("response"); -final _objc_msgSend_878 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setGrammaticalGender_ = + objc.registerName("setGrammaticalGender:"); +final _objc_msgSend_430 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_progress = objc.registerName("progress"); -final _objc_msgSend_879 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSGrammaticalPartOfSpeech { + static const int NSGrammaticalPartOfSpeechNotSet = 0; + static const int NSGrammaticalPartOfSpeechDeterminer = 1; + static const int NSGrammaticalPartOfSpeechPronoun = 2; + static const int NSGrammaticalPartOfSpeechLetter = 3; + static const int NSGrammaticalPartOfSpeechAdverb = 4; + static const int NSGrammaticalPartOfSpeechParticle = 5; + static const int NSGrammaticalPartOfSpeechAdjective = 6; + static const int NSGrammaticalPartOfSpeechAdposition = 7; + static const int NSGrammaticalPartOfSpeechVerb = 8; + static const int NSGrammaticalPartOfSpeechNoun = 9; + static const int NSGrammaticalPartOfSpeechConjunction = 10; + static const int NSGrammaticalPartOfSpeechNumeral = 11; + static const int NSGrammaticalPartOfSpeechInterjection = 12; + static const int NSGrammaticalPartOfSpeechPreposition = 13; + static const int NSGrammaticalPartOfSpeechAbbreviation = 14; +} + +late final _sel_partOfSpeech = objc.registerName("partOfSpeech"); +final _objc_msgSend_431 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Int32 Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + int 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:"); +late final _sel_setPartOfSpeech_ = objc.registerName("setPartOfSpeech:"); +final _objc_msgSend_432 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); -abstract class NSURLSessionTaskState { - static const int NSURLSessionTaskStateRunning = 0; - static const int NSURLSessionTaskStateSuspended = 1; - static const int NSURLSessionTaskStateCanceling = 2; - static const int NSURLSessionTaskStateCompleted = 3; +abstract class NSGrammaticalNumber { + static const int NSGrammaticalNumberNotSet = 0; + static const int NSGrammaticalNumberSingular = 1; + static const int NSGrammaticalNumberZero = 2; + static const int NSGrammaticalNumberPlural = 3; + static const int NSGrammaticalNumberPluralTwo = 4; + static const int NSGrammaticalNumberPluralFew = 5; + static const int NSGrammaticalNumberPluralMany = 6; } -late final _sel_state = objc.registerName("state"); -final _objc_msgSend_880 = objc.msgSendPointer +late final _sel_number = objc.registerName("number"); +final _objc_msgSend_433 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -43897,844 +19584,842 @@ final _objc_msgSend_880 = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_suspend = objc.registerName("suspend"); -late final _sel_priority = objc.registerName("priority"); -late final _sel_setPriority_ = objc.registerName("setPriority:"); -final _objc_msgSend_881 = objc.msgSendPointer +late final _sel_setNumber_ = objc.registerName("setNumber:"); +final _objc_msgSend_434 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Float)>>() + ffi.Pointer, ffi.Int32)>>() .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_882 = objc.msgSendPointer + ffi.Pointer, int)>(); + +abstract class NSGrammaticalCase { + static const int NSGrammaticalCaseNotSet = 0; + static const int NSGrammaticalCaseNominative = 1; + static const int NSGrammaticalCaseAccusative = 2; + static const int NSGrammaticalCaseDative = 3; + static const int NSGrammaticalCaseGenitive = 4; + static const int NSGrammaticalCasePrepositional = 5; + static const int NSGrammaticalCaseAblative = 6; + static const int NSGrammaticalCaseAdessive = 7; + static const int NSGrammaticalCaseAllative = 8; + static const int NSGrammaticalCaseElative = 9; + static const int NSGrammaticalCaseIllative = 10; + static const int NSGrammaticalCaseEssive = 11; + static const int NSGrammaticalCaseInessive = 12; + static const int NSGrammaticalCaseLocative = 13; + static const int NSGrammaticalCaseTranslative = 14; +} + +late final _sel_grammaticalCase = objc.registerName("grammaticalCase"); +final _objc_msgSend_435 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32 Function(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); -final _ObjCBlock_ffiVoid_NSArray_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSArray_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSArray_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSArray_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSArray_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setGrammaticalCase_ = objc.registerName("setGrammaticalCase:"); +final _objc_msgSend_436 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); -void _ObjCBlock_ffiVoid_NSArray_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSArray_closureRegistry[block.ref.target.address]!(arg0); +abstract class NSGrammaticalDetermination { + static const int NSGrammaticalDeterminationNotSet = 0; + static const int NSGrammaticalDeterminationIndependent = 1; + static const int NSGrammaticalDeterminationDependent = 2; +} -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); +late final _sel_determination = objc.registerName("determination"); +final _objc_msgSend_437 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDetermination_ = objc.registerName("setDetermination:"); +final _objc_msgSend_438 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - /// 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); - } +abstract class NSGrammaticalPerson { + static const int NSGrammaticalPersonNotSet = 0; + static const int NSGrammaticalPersonFirst = 1; + static const int NSGrammaticalPersonSecond = 2; + static const int NSGrammaticalPersonThird = 3; +} - /// 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.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; +late final _sel_grammaticalPerson = objc.registerName("grammaticalPerson"); +final _objc_msgSend_439 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setGrammaticalPerson_ = + objc.registerName("setGrammaticalPerson:"); +final _objc_msgSend_440 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - /// 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(NSArray?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSArray_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSArray._(arg0, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; +abstract class NSGrammaticalPronounType { + static const int NSGrammaticalPronounTypeNotSet = 0; + static const int NSGrammaticalPronounTypePersonal = 1; + static const int NSGrammaticalPronounTypeReflexive = 2; + static const int NSGrammaticalPronounTypePossessive = 3; +} - /// 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(NSArray?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSArray_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSArray._(arg0, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; +late final _sel_pronounType = objc.registerName("pronounType"); +final _objc_msgSend_441 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setPronounType_ = objc.registerName("setPronounType:"); +final _objc_msgSend_442 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); - void call(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); +abstract class NSGrammaticalDefiniteness { + static const int NSGrammaticalDefinitenessNotSet = 0; + static const int NSGrammaticalDefinitenessIndefinite = 1; + static const int NSGrammaticalDefinitenessDefinite = 2; } -late final _sel_getCookiesForTask_completionHandler_ = - objc.registerName("getCookiesForTask:completionHandler:"); -final _objc_msgSend_883 = objc.msgSendPointer +late final _sel_definiteness = objc.registerName("definiteness"); +final _objc_msgSend_443 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDefiniteness_ = objc.registerName("setDefiniteness:"); +final _objc_msgSend_444 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); -class NSIndexPath extends NSObject { - NSIndexPath._(ffi.Pointer pointer, +class NSMorphologyCustomPronoun extends objc.NSObject { + NSMorphologyCustomPronoun._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSIndexPath] that points to the same underlying object as [other]. - static NSIndexPath castFrom(T other) { - return NSIndexPath._(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.pointer, retain: true, release: true); - /// Returns a [NSIndexPath] that wraps the given raw object pointer. - static NSIndexPath castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSIndexPath._(other, retain: retain, release: release); - } + /// 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 [NSIndexPath]. + /// Returns whether [obj] is an instance of [NSMorphologyCustomPronoun]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSIndexPath); + obj.pointer, _sel_isKindOfClass_, _class_NSMorphologyCustomPronoun); } - static NSIndexPath indexPathWithIndex_(int index) { - final _ret = - _objc_msgSend_65(_class_NSIndexPath, _sel_indexPathWithIndex_, index); - return NSIndexPath._(_ret, retain: true, release: true); + static bool isSupportedForLanguage_(objc.NSString language) { + return _objc_msgSend_51(_class_NSMorphologyCustomPronoun, + _sel_isSupportedForLanguage_, language.pointer); } - static NSIndexPath indexPathWithIndexes_length_( - ffi.Pointer indexes, int length) { - final _ret = _objc_msgSend_884( - _class_NSIndexPath, _sel_indexPathWithIndexes_length_, indexes, length); - return NSIndexPath._(_ret, retain: true, release: true); + static objc.NSArray requiredKeysForLanguage_(objc.NSString language) { + final _ret = _objc_msgSend_445(_class_NSMorphologyCustomPronoun, + _sel_requiredKeysForLanguage_, language.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSIndexPath initWithIndexes_length_( - ffi.Pointer indexes, int length) { - final _ret = _objc_msgSend_884( - this.pointer, _sel_initWithIndexes_length_, indexes, length); - return NSIndexPath._(_ret, retain: true, release: true); + objc.NSString? get subjectForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_subjectForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSIndexPath initWithIndex_(int index) { - final _ret = _objc_msgSend_65(this.pointer, _sel_initWithIndex_, index); - return NSIndexPath._(_ret, retain: true, release: true); + set subjectForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setSubjectForm_, value?.pointer ?? ffi.nullptr); } - NSIndexPath indexPathByAddingIndex_(int index) { - final _ret = - _objc_msgSend_885(this.pointer, _sel_indexPathByAddingIndex_, index); - return NSIndexPath._(_ret, retain: true, release: true); + objc.NSString? get objectForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_objectForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSIndexPath indexPathByRemovingLastIndex() { - final _ret = - _objc_msgSend_886(this.pointer, _sel_indexPathByRemovingLastIndex); - return NSIndexPath._(_ret, retain: true, release: true); + set objectForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setObjectForm_, value?.pointer ?? ffi.nullptr); } - int indexAtPosition_(int position) { - return _objc_msgSend_94(this.pointer, _sel_indexAtPosition_, position); + objc.NSString? get possessiveForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_possessiveForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get length { - return _objc_msgSend_10(this.pointer, _sel_length); + set possessiveForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setPossessiveForm_, value?.pointer ?? ffi.nullptr); } - void getIndexes_range_( - ffi.Pointer indexes, _NSRange positionRange) { - _objc_msgSend_887( - this.pointer, _sel_getIndexes_range_, indexes, positionRange); + objc.NSString? get possessiveAdjectiveForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_possessiveAdjectiveForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int compare_(NSIndexPath otherObject) { - return _objc_msgSend_888(this.pointer, _sel_compare_, otherObject.pointer); + set possessiveAdjectiveForm(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setPossessiveAdjectiveForm_, + value?.pointer ?? ffi.nullptr); } - void getIndexes_(ffi.Pointer indexes) { - _objc_msgSend_889(this.pointer, _sel_getIndexes_, indexes); + objc.NSString? get reflexiveForm { + final _ret = _objc_msgSend_13(this.pointer, _sel_reflexiveForm); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set reflexiveForm(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setReflexiveForm_, value?.pointer ?? ffi.nullptr); } @override - NSIndexPath init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSIndexPath._(_ret, retain: true, release: true); + NSMorphologyCustomPronoun init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: true, release: true); } - static NSIndexPath new1() { - final _ret = _objc_msgSend_2(_class_NSIndexPath, _sel_new); - return NSIndexPath._(_ret, retain: false, release: true); + static NSMorphologyCustomPronoun new1() { + final _ret = _objc_msgSend_40(_class_NSMorphologyCustomPronoun, _sel_new); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } - static NSIndexPath allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSIndexPath, _sel_allocWithZone_, zone); - return NSIndexPath._(_ret, retain: false, release: true); + static NSMorphologyCustomPronoun allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSMorphologyCustomPronoun, _sel_allocWithZone_, zone); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } - static NSIndexPath alloc() { - final _ret = _objc_msgSend_2(_class_NSIndexPath, _sel_alloc); - return NSIndexPath._(_ret, retain: false, release: true); + static NSMorphologyCustomPronoun alloc() { + final _ret = _objc_msgSend_40(_class_NSMorphologyCustomPronoun, _sel_alloc); + return NSMorphologyCustomPronoun.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSIndexPath, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMorphologyCustomPronoun, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSIndexPath, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMorphologyCustomPronoun, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSIndexPath, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSMorphologyCustomPronoun, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSIndexPath, _sel_useStoredAccessor); + return _objc_msgSend_7( + _class_NSMorphologyCustomPronoun, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSIndexPath, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMorphologyCustomPronoun, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSIndexPath, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMorphologyCustomPronoun, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSIndexPath, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMorphologyCustomPronoun, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSIndexPath, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMorphologyCustomPronoun, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSIndexPath, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMorphologyCustomPronoun, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_884 = objc.msgSendPointer +late final _class_NSMorphologyCustomPronoun = + objc.getClass("NSMorphologyCustomPronoun"); +late final _sel_isSupportedForLanguage_ = + objc.registerName("isSupportedForLanguage:"); +late final _sel_requiredKeysForLanguage_ = + objc.registerName("requiredKeysForLanguage:"); +final _objc_msgSend_445 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer 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_indexPathByAddingIndex_ = - objc.registerName("indexPathByAddingIndex:"); -final _objc_msgSend_885 = 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)>(); -late final _sel_indexPathByRemovingLastIndex = - objc.registerName("indexPathByRemovingLastIndex"); -final _objc_msgSend_886 = 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:"); -late final _sel_getIndexes_range_ = objc.registerName("getIndexes:range:"); -final _objc_msgSend_887 = objc.msgSendPointer + 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_446 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - _NSRange)>>() + ffi.Pointer)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - _NSRange)>(); -final _objc_msgSend_888 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCustomPronoun_forLanguage_error_ = + objc.registerName("setCustomPronoun:forLanguage:error:"); +final _objc_msgSend_447 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + 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_889 = objc.msgSendPointer + 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_448 = 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)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); -class NSInflectionRule extends NSObject { - NSInflectionRule._(ffi.Pointer pointer, +class NSOperationQueue extends objc.NSObject { + NSOperationQueue._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSInflectionRule] that points to the same underlying object as [other]. - static NSInflectionRule castFrom(T other) { - return NSInflectionRule._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSOperationQueue] that points to the same underlying object as [other]. + NSOperationQueue.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSInflectionRule] that wraps the given raw object pointer. - static NSInflectionRule castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSInflectionRule._(other, retain: retain, release: release); - } + /// 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 [NSInflectionRule]. + /// Returns whether [obj] is an instance of [NSOperationQueue]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSInflectionRule); + obj.pointer, _sel_isKindOfClass_, _class_NSOperationQueue); } - @override - NSObject init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSObject._(_ret, retain: true, release: true); + objc.NSProgress get progress { + final _ret = _objc_msgSend_347(this.pointer, _sel_progress); + return objc.NSProgress.castFromPointer(_ret, retain: true, release: true); } - static NSInflectionRule getAutomaticRule() { - final _ret = _objc_msgSend_890(_class_NSInflectionRule, _sel_automaticRule); - return NSInflectionRule._(_ret, retain: true, release: true); + void addOperation_(NSOperation op) { + _objc_msgSend_449(this.pointer, _sel_addOperation_, op.pointer); } - static bool canInflectLanguage_(NSString language) { - return _objc_msgSend_64( - _class_NSInflectionRule, _sel_canInflectLanguage_, language.pointer); + void addOperations_waitUntilFinished_(objc.NSArray ops, bool wait) { + _objc_msgSend_456( + this.pointer, _sel_addOperations_waitUntilFinished_, ops.pointer, wait); } - static bool getCanInflectPreferredLocalization() { - return _objc_msgSend_12( - _class_NSInflectionRule, _sel_canInflectPreferredLocalization); + void addOperationWithBlock_(ObjCBlock_ffiVoid block) { + _objc_msgSend_249(this.pointer, _sel_addOperationWithBlock_, block.pointer); } - static NSInflectionRule new1() { - final _ret = _objc_msgSend_2(_class_NSInflectionRule, _sel_new); - return NSInflectionRule._(_ret, retain: false, release: true); + void addBarrierBlock_(ObjCBlock_ffiVoid barrier) { + _objc_msgSend_249(this.pointer, _sel_addBarrierBlock_, barrier.pointer); } - static NSInflectionRule allocWithZone_(ffi.Pointer<_NSZone> zone) { + int get maxConcurrentOperationCount { + return _objc_msgSend_114(this.pointer, _sel_maxConcurrentOperationCount); + } + + set maxConcurrentOperationCount(int value) { + return _objc_msgSend_134( + this.pointer, _sel_setMaxConcurrentOperationCount_, value); + } + + bool get suspended { + return _objc_msgSend_7(this.pointer, _sel_isSuspended); + } + + set suspended(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setSuspended_, value); + } + + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set name(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); + } + + int get qualityOfService { + return _objc_msgSend_454(this.pointer, _sel_qualityOfService); + } + + set qualityOfService(int value) { + return _objc_msgSend_455(this.pointer, _sel_setQualityOfService_, value); + } + + objc.NSObject? get underlyingQueue { + final _ret = _objc_msgSend_457(this.pointer, _sel_underlyingQueue); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + set underlyingQueue(objc.NSObject? value) { + return _objc_msgSend_458( + this.pointer, _sel_setUnderlyingQueue_, value?.pointer ?? ffi.nullptr); + } + + void cancelAllOperations() { + _objc_msgSend_82(this.pointer, _sel_cancelAllOperations); + } + + void waitUntilAllOperationsAreFinished() { + _objc_msgSend_82(this.pointer, _sel_waitUntilAllOperationsAreFinished); + } + + static NSOperationQueue? getCurrentQueue() { + final _ret = _objc_msgSend_459(_class_NSOperationQueue, _sel_currentQueue); + return _ret.address == 0 + ? null + : NSOperationQueue.castFromPointer(_ret, retain: true, release: true); + } + + static NSOperationQueue getMainQueue() { + final _ret = _objc_msgSend_460(_class_NSOperationQueue, _sel_mainQueue); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get operations { + final _ret = _objc_msgSend_6(this.pointer, _sel_operations); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + int get operationCount { + return _objc_msgSend_29(this.pointer, _sel_operationCount); + } + + @override + NSOperationQueue init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); + } + + static NSOperationQueue new1() { + final _ret = _objc_msgSend_40(_class_NSOperationQueue, _sel_new); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); + } + + static NSOperationQueue allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSInflectionRule, _sel_allocWithZone_, zone); - return NSInflectionRule._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSOperationQueue, _sel_allocWithZone_, zone); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } - static NSInflectionRule alloc() { - final _ret = _objc_msgSend_2(_class_NSInflectionRule, _sel_alloc); - return NSInflectionRule._(_ret, retain: false, release: true); + static NSOperationQueue alloc() { + final _ret = _objc_msgSend_40(_class_NSOperationQueue, _sel_alloc); + return NSOperationQueue.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSInflectionRule, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOperationQueue, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSInflectionRule, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOperationQueue, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSInflectionRule, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSOperationQueue, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSInflectionRule, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSOperationQueue, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSInflectionRule, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOperationQueue, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSInflectionRule, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOperationQueue, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSInflectionRule, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOperationQueue, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSInflectionRule, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOperationQueue, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSInflectionRule, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSOperationQueue, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSInflectionRule = objc.getClass("NSInflectionRule"); -late final _sel_automaticRule = objc.registerName("automaticRule"); -final _objc_msgSend_890 = 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"); +late final _class_NSOperationQueue = objc.getClass("NSOperationQueue"); -class NSMorphology extends NSObject { - NSMorphology._(ffi.Pointer pointer, +class NSOperation extends objc.NSObject { + NSOperation._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSMorphology] that points to the same underlying object as [other]. - static NSMorphology castFrom(T other) { - return NSMorphology._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSOperation] that points to the same underlying object as [other]. + NSOperation.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSMorphology] that wraps the given raw object pointer. - static NSMorphology castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMorphology._(other, retain: retain, release: release); - } + /// 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 [NSMorphology]. + /// Returns whether [obj] is an instance of [NSOperation]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMorphology); + obj.pointer, _sel_isKindOfClass_, _class_NSOperation); } - int get grammaticalGender { - return _objc_msgSend_891(this.pointer, _sel_grammaticalGender); + void start() { + _objc_msgSend_82(this.pointer, _sel_start); } - set grammaticalGender(int value) { - return _objc_msgSend_892(this.pointer, _sel_setGrammaticalGender_, value); + void main() { + _objc_msgSend_82(this.pointer, _sel_main); } - int get partOfSpeech { - return _objc_msgSend_893(this.pointer, _sel_partOfSpeech); + bool get cancelled { + return _objc_msgSend_7(this.pointer, _sel_isCancelled); } - set partOfSpeech(int value) { - return _objc_msgSend_894(this.pointer, _sel_setPartOfSpeech_, value); + void cancel() { + _objc_msgSend_82(this.pointer, _sel_cancel); } - int get number { - return _objc_msgSend_895(this.pointer, _sel_number); + bool get executing { + return _objc_msgSend_7(this.pointer, _sel_isExecuting); } - set number(int value) { - return _objc_msgSend_896(this.pointer, _sel_setNumber_, value); + bool get finished { + return _objc_msgSend_7(this.pointer, _sel_isFinished); } - int get grammaticalCase { - return _objc_msgSend_897(this.pointer, _sel_grammaticalCase); + bool get concurrent { + return _objc_msgSend_7(this.pointer, _sel_isConcurrent); } - set grammaticalCase(int value) { - return _objc_msgSend_898(this.pointer, _sel_setGrammaticalCase_, value); + bool get asynchronous { + return _objc_msgSend_7(this.pointer, _sel_isAsynchronous); } - int get determination { - return _objc_msgSend_899(this.pointer, _sel_determination); + bool get ready { + return _objc_msgSend_7(this.pointer, _sel_isReady); } - set determination(int value) { - return _objc_msgSend_900(this.pointer, _sel_setDetermination_, value); + void addDependency_(NSOperation op) { + _objc_msgSend_449(this.pointer, _sel_addDependency_, op.pointer); } - int get grammaticalPerson { - return _objc_msgSend_901(this.pointer, _sel_grammaticalPerson); + void removeDependency_(NSOperation op) { + _objc_msgSend_449(this.pointer, _sel_removeDependency_, op.pointer); } - set grammaticalPerson(int value) { - return _objc_msgSend_902(this.pointer, _sel_setGrammaticalPerson_, value); + objc.NSArray get dependencies { + final _ret = _objc_msgSend_6(this.pointer, _sel_dependencies); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get pronounType { - return _objc_msgSend_903(this.pointer, _sel_pronounType); + int get queuePriority { + return _objc_msgSend_450(this.pointer, _sel_queuePriority); } - set pronounType(int value) { - return _objc_msgSend_904(this.pointer, _sel_setPronounType_, value); + set queuePriority(int value) { + return _objc_msgSend_451(this.pointer, _sel_setQueuePriority_, value); } - int get definiteness { - return _objc_msgSend_905(this.pointer, _sel_definiteness); + ObjCBlock_ffiVoid? get completionBlock { + final _ret = _objc_msgSend_452(this.pointer, _sel_completionBlock); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid.castFromPointer(_ret, retain: true, release: true); } - set definiteness(int value) { - return _objc_msgSend_906(this.pointer, _sel_setDefiniteness_, value); + set completionBlock(ObjCBlock_ffiVoid? value) { + return _objc_msgSend_453( + this.pointer, _sel_setCompletionBlock_, value?.pointer ?? ffi.nullptr); } - NSMorphologyCustomPronoun? customPronounForLanguage_(NSString language) { - final _ret = _objc_msgSend_907( - this.pointer, _sel_customPronounForLanguage_, language.pointer); - return _ret.address == 0 - ? null - : NSMorphologyCustomPronoun._(_ret, retain: true, release: true); + void waitUntilFinished() { + _objc_msgSend_82(this.pointer, _sel_waitUntilFinished); } - bool setCustomPronoun_forLanguage_error_(NSMorphologyCustomPronoun? features, - NSString language, ffi.Pointer> error) { - return _objc_msgSend_908( - this.pointer, - _sel_setCustomPronoun_forLanguage_error_, - features?.pointer ?? ffi.nullptr, - language.pointer, - error); + double get threadPriority { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_threadPriority) + : _objc_msgSend_115(this.pointer, _sel_threadPriority); } - bool get unspecified { - return _objc_msgSend_12(this.pointer, _sel_isUnspecified); + set threadPriority(double value) { + return _objc_msgSend_212(this.pointer, _sel_setThreadPriority_, value); } - static NSMorphology getUserMorphology() { - final _ret = _objc_msgSend_909(_class_NSMorphology, _sel_userMorphology); - return NSMorphology._(_ret, retain: true, release: true); + int get qualityOfService { + return _objc_msgSend_454(this.pointer, _sel_qualityOfService); + } + + set qualityOfService(int value) { + return _objc_msgSend_455(this.pointer, _sel_setQualityOfService_, value); + } + + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set name(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); } @override - NSMorphology init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMorphology._(_ret, retain: true, release: true); + NSOperation init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOperation.castFromPointer(_ret, retain: true, release: true); } - static NSMorphology new1() { - final _ret = _objc_msgSend_2(_class_NSMorphology, _sel_new); - return NSMorphology._(_ret, retain: false, release: true); + static NSOperation new1() { + final _ret = _objc_msgSend_40(_class_NSOperation, _sel_new); + return NSOperation.castFromPointer(_ret, retain: false, release: true); } - static NSMorphology allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSOperation allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSMorphology, _sel_allocWithZone_, zone); - return NSMorphology._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSOperation, _sel_allocWithZone_, zone); + return NSOperation.castFromPointer(_ret, retain: false, release: true); } - static NSMorphology alloc() { - final _ret = _objc_msgSend_2(_class_NSMorphology, _sel_alloc); - return NSMorphology._(_ret, retain: false, release: true); + static NSOperation alloc() { + final _ret = _objc_msgSend_40(_class_NSOperation, _sel_alloc); + return NSOperation.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMorphology, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOperation, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMorphology, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOperation, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMorphology, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSOperation, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMorphology, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSOperation, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMorphology, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOperation, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMorphology, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOperation, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMorphology, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOperation, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMorphology, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOperation, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSMorphology, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSOperation, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSMorphology = objc.getClass("NSMorphology"); - -abstract class NSGrammaticalGender { - static const int NSGrammaticalGenderNotSet = 0; - static const int NSGrammaticalGenderFeminine = 1; - static const int NSGrammaticalGenderMasculine = 2; - static const int NSGrammaticalGenderNeuter = 3; -} - -late final _sel_grammaticalGender = objc.registerName("grammaticalGender"); -final _objc_msgSend_891 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setGrammaticalGender_ = - objc.registerName("setGrammaticalGender:"); -final _objc_msgSend_892 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); - -abstract class NSGrammaticalPartOfSpeech { - static const int NSGrammaticalPartOfSpeechNotSet = 0; - static const int NSGrammaticalPartOfSpeechDeterminer = 1; - static const int NSGrammaticalPartOfSpeechPronoun = 2; - static const int NSGrammaticalPartOfSpeechLetter = 3; - static const int NSGrammaticalPartOfSpeechAdverb = 4; - static const int NSGrammaticalPartOfSpeechParticle = 5; - static const int NSGrammaticalPartOfSpeechAdjective = 6; - static const int NSGrammaticalPartOfSpeechAdposition = 7; - static const int NSGrammaticalPartOfSpeechVerb = 8; - static const int NSGrammaticalPartOfSpeechNoun = 9; - static const int NSGrammaticalPartOfSpeechConjunction = 10; - static const int NSGrammaticalPartOfSpeechNumeral = 11; - static const int NSGrammaticalPartOfSpeechInterjection = 12; - static const int NSGrammaticalPartOfSpeechPreposition = 13; - static const int NSGrammaticalPartOfSpeechAbbreviation = 14; -} - -late final _sel_partOfSpeech = objc.registerName("partOfSpeech"); -final _objc_msgSend_893 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setPartOfSpeech_ = objc.registerName("setPartOfSpeech:"); -final _objc_msgSend_894 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); - -abstract class NSGrammaticalNumber { - static const int NSGrammaticalNumberNotSet = 0; - static const int NSGrammaticalNumberSingular = 1; - static const int NSGrammaticalNumberZero = 2; - static const int NSGrammaticalNumberPlural = 3; - static const int NSGrammaticalNumberPluralTwo = 4; - static const int NSGrammaticalNumberPluralFew = 5; - static const int NSGrammaticalNumberPluralMany = 6; -} - -late final _sel_number = objc.registerName("number"); -final _objc_msgSend_895 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setNumber_ = objc.registerName("setNumber:"); -final _objc_msgSend_896 = objc.msgSendPointer +late final _class_NSOperation = objc.getClass("NSOperation"); +late final _sel_start = objc.registerName("start"); +late final _sel_main = objc.registerName("main"); +late final _sel_isCancelled = objc.registerName("isCancelled"); +late final _sel_isExecuting = objc.registerName("isExecuting"); +late final _sel_isFinished = objc.registerName("isFinished"); +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_449 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removeDependency_ = objc.registerName("removeDependency:"); +late final _sel_dependencies = objc.registerName("dependencies"); -abstract class NSGrammaticalCase { - static const int NSGrammaticalCaseNotSet = 0; - static const int NSGrammaticalCaseNominative = 1; - static const int NSGrammaticalCaseAccusative = 2; - static const int NSGrammaticalCaseDative = 3; - static const int NSGrammaticalCaseGenitive = 4; - static const int NSGrammaticalCasePrepositional = 5; - static const int NSGrammaticalCaseAblative = 6; - static const int NSGrammaticalCaseAdessive = 7; - static const int NSGrammaticalCaseAllative = 8; - static const int NSGrammaticalCaseElative = 9; - static const int NSGrammaticalCaseIllative = 10; - static const int NSGrammaticalCaseEssive = 11; - static const int NSGrammaticalCaseInessive = 12; - static const int NSGrammaticalCaseLocative = 13; - static const int NSGrammaticalCaseTranslative = 14; +abstract class NSOperationQueuePriority { + static const int NSOperationQueuePriorityVeryLow = -8; + static const int NSOperationQueuePriorityLow = -4; + static const int NSOperationQueuePriorityNormal = 0; + static const int NSOperationQueuePriorityHigh = 4; + static const int NSOperationQueuePriorityVeryHigh = 8; } -late final _sel_grammaticalCase = objc.registerName("grammaticalCase"); -final _objc_msgSend_897 = objc.msgSendPointer +late final _sel_queuePriority = objc.registerName("queuePriority"); +final _objc_msgSend_450 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -44742,8 +20427,8 @@ final _objc_msgSend_897 = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setGrammaticalCase_ = objc.registerName("setGrammaticalCase:"); -final _objc_msgSend_898 = objc.msgSendPointer +late final _sel_setQueuePriority_ = objc.registerName("setQueuePriority:"); +final _objc_msgSend_451 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, @@ -44751,41 +20436,38 @@ final _objc_msgSend_898 = objc.msgSendPointer .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); - -abstract class NSGrammaticalDetermination { - static const int NSGrammaticalDeterminationNotSet = 0; - static const int NSGrammaticalDeterminationIndependent = 1; - static const int NSGrammaticalDeterminationDependent = 2; -} - -late final _sel_determination = objc.registerName("determination"); -final _objc_msgSend_899 = objc.msgSendPointer +late final _sel_completionBlock = objc.registerName("completionBlock"); +final _objc_msgSend_452 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDetermination_ = objc.registerName("setDetermination:"); -final _objc_msgSend_900 = objc.msgSendPointer +late final _sel_setCompletionBlock_ = objc.registerName("setCompletionBlock:"); +final _objc_msgSend_453 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Pointer, ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer, ffi.Pointer)>(); +late final _sel_waitUntilFinished = objc.registerName("waitUntilFinished"); +late final _sel_threadPriority = objc.registerName("threadPriority"); +late final _sel_setThreadPriority_ = objc.registerName("setThreadPriority:"); -abstract class NSGrammaticalPerson { - static const int NSGrammaticalPersonNotSet = 0; - static const int NSGrammaticalPersonFirst = 1; - static const int NSGrammaticalPersonSecond = 2; - static const int NSGrammaticalPersonThird = 3; +abstract class NSQualityOfService { + static const int NSQualityOfServiceUserInteractive = 33; + static const int NSQualityOfServiceUserInitiated = 25; + static const int NSQualityOfServiceUtility = 17; + static const int NSQualityOfServiceBackground = 9; + static const int NSQualityOfServiceDefault = -1; } -late final _sel_grammaticalPerson = objc.registerName("grammaticalPerson"); -final _objc_msgSend_901 = objc.msgSendPointer +late final _sel_qualityOfService = objc.registerName("qualityOfService"); +final _objc_msgSend_454 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -44793,9 +20475,9 @@ final _objc_msgSend_901 = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setGrammaticalPerson_ = - objc.registerName("setGrammaticalPerson:"); -final _objc_msgSend_902 = objc.msgSendPointer +late final _sel_setQualityOfService_ = + objc.registerName("setQualityOfService:"); +final _objc_msgSend_455 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, @@ -44803,804 +20485,1066 @@ final _objc_msgSend_902 = objc.msgSendPointer .asFunction< void Function(ffi.Pointer, ffi.Pointer, int)>(); - -abstract class NSGrammaticalPronounType { - static const int NSGrammaticalPronounTypeNotSet = 0; - static const int NSGrammaticalPronounTypePersonal = 1; - static const int NSGrammaticalPronounTypeReflexive = 2; - static const int NSGrammaticalPronounTypePossessive = 3; -} - -late final _sel_pronounType = objc.registerName("pronounType"); -final _objc_msgSend_903 = objc.msgSendPointer +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_456 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + 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_457 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setPronounType_ = objc.registerName("setPronounType:"); -final _objc_msgSend_904 = objc.msgSendPointer +late final _sel_setUnderlyingQueue_ = objc.registerName("setUnderlyingQueue:"); +final _objc_msgSend_458 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< void Function(ffi.Pointer, - ffi.Pointer, int)>(); - -abstract class NSGrammaticalDefiniteness { - static const int NSGrammaticalDefinitenessNotSet = 0; - static const int NSGrammaticalDefinitenessIndefinite = 1; - static const int NSGrammaticalDefinitenessDefinite = 2; -} - -late final _sel_definiteness = objc.registerName("definiteness"); -final _objc_msgSend_905 = objc.msgSendPointer + 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_459 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDefiniteness_ = objc.registerName("setDefiniteness:"); -final _objc_msgSend_906 = objc.msgSendPointer +late final _sel_mainQueue = objc.registerName("mainQueue"); +final _objc_msgSend_460 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_operations = objc.registerName("operations"); +late final _sel_operationCount = objc.registerName("operationCount"); -class NSMorphologyCustomPronoun extends NSObject { - NSMorphologyCustomPronoun._(ffi.Pointer pointer, +class NSOrthography extends objc.NSObject { + NSOrthography._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSMorphologyCustomPronoun] that points to the same underlying object as [other]. - static NSMorphologyCustomPronoun castFrom( - T other) { - return NSMorphologyCustomPronoun._(other.pointer, - retain: true, release: true); - } + /// Constructs a [NSOrthography] that points to the same underlying object as [other]. + NSOrthography.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSMorphologyCustomPronoun] that wraps the given raw object pointer. - static NSMorphologyCustomPronoun castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSMorphologyCustomPronoun._(other, retain: retain, release: release); - } + /// Constructs a [NSOrthography] that wraps the given raw object pointer. + NSOrthography.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSMorphologyCustomPronoun]. + /// Returns whether [obj] is an instance of [NSOrthography]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMorphologyCustomPronoun); - } - - static bool isSupportedForLanguage_(NSString language) { - return _objc_msgSend_64(_class_NSMorphologyCustomPronoun, - _sel_isSupportedForLanguage_, language.pointer); + obj.pointer, _sel_isKindOfClass_, _class_NSOrthography); } - static NSArray requiredKeysForLanguage_(NSString language) { - final _ret = _objc_msgSend_358(_class_NSMorphologyCustomPronoun, - _sel_requiredKeysForLanguage_, language.pointer); - return NSArray._(_ret, retain: true, release: true); + objc.NSString get dominantScript { + final _ret = _objc_msgSend_12(this.pointer, _sel_dominantScript); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get subjectForm { - final _ret = _objc_msgSend_44(this.pointer, _sel_subjectForm); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + objc.NSDictionary get languageMap { + final _ret = _objc_msgSend_112(this.pointer, _sel_languageMap); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set subjectForm(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setSubjectForm_, value?.pointer ?? ffi.nullptr); + NSOrthography initWithDominantScript_languageMap_( + objc.NSString script, objc.NSDictionary map) { + final _ret = _objc_msgSend_461(this.pointer, + _sel_initWithDominantScript_languageMap_, script.pointer, map.pointer); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } - NSString? get objectForm { - final _ret = _objc_msgSend_44(this.pointer, _sel_objectForm); + NSOrthography? initWithCoder_(objc.NSCoder coder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, coder.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSOrthography.castFromPointer(_ret, retain: true, release: true); } - set objectForm(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setObjectForm_, value?.pointer ?? ffi.nullptr); + objc.NSArray? languagesForScript_(objc.NSString script) { + final _ret = _objc_msgSend_290( + this.pointer, _sel_languagesForScript_, script.pointer); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? get possessiveForm { - final _ret = _objc_msgSend_44(this.pointer, _sel_possessiveForm); + objc.NSString? dominantLanguageForScript_(objc.NSString script) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_dominantLanguageForScript_, script.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set possessiveForm(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setPossessiveForm_, value?.pointer ?? ffi.nullptr); + objc.NSString get dominantLanguage { + final _ret = _objc_msgSend_12(this.pointer, _sel_dominantLanguage); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get possessiveAdjectiveForm { - final _ret = _objc_msgSend_44(this.pointer, _sel_possessiveAdjectiveForm); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + objc.NSArray get allScripts { + final _ret = _objc_msgSend_6(this.pointer, _sel_allScripts); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set possessiveAdjectiveForm(NSString? value) { - return _objc_msgSend_545(this.pointer, _sel_setPossessiveAdjectiveForm_, - value?.pointer ?? ffi.nullptr); + objc.NSArray get allLanguages { + final _ret = _objc_msgSend_6(this.pointer, _sel_allLanguages); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString? get reflexiveForm { - final _ret = _objc_msgSend_44(this.pointer, _sel_reflexiveForm); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static NSOrthography defaultOrthographyForLanguage_(objc.NSString language) { + final _ret = _objc_msgSend_35(_class_NSOrthography, + _sel_defaultOrthographyForLanguage_, language.pointer); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } - set reflexiveForm(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setReflexiveForm_, value?.pointer ?? ffi.nullptr); + static NSOrthography orthographyWithDominantScript_languageMap_( + objc.NSString script, objc.NSDictionary map) { + final _ret = _objc_msgSend_461( + _class_NSOrthography, + _sel_orthographyWithDominantScript_languageMap_, + script.pointer, + map.pointer); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } @override - NSMorphologyCustomPronoun init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMorphologyCustomPronoun._(_ret, retain: true, release: true); + NSOrthography init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSOrthography.castFromPointer(_ret, retain: true, release: true); } - static NSMorphologyCustomPronoun new1() { - final _ret = _objc_msgSend_2(_class_NSMorphologyCustomPronoun, _sel_new); - return NSMorphologyCustomPronoun._(_ret, retain: false, release: true); + static NSOrthography new1() { + final _ret = _objc_msgSend_40(_class_NSOrthography, _sel_new); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } - static NSMorphologyCustomPronoun allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSMorphologyCustomPronoun, _sel_allocWithZone_, zone); - return NSMorphologyCustomPronoun._(_ret, retain: false, release: true); + static NSOrthography allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSOrthography, _sel_allocWithZone_, zone); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } - static NSMorphologyCustomPronoun alloc() { - final _ret = _objc_msgSend_2(_class_NSMorphologyCustomPronoun, _sel_alloc); - return NSMorphologyCustomPronoun._(_ret, retain: false, release: true); + static NSOrthography alloc() { + final _ret = _objc_msgSend_40(_class_NSOrthography, _sel_alloc); + return NSOrthography.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMorphologyCustomPronoun, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSOrthography, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMorphologyCustomPronoun, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSOrthography, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMorphologyCustomPronoun, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSOrthography, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSMorphologyCustomPronoun, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSOrthography, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMorphologyCustomPronoun, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSOrthography, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMorphologyCustomPronoun, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSOrthography, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMorphologyCustomPronoun, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSOrthography, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMorphologyCustomPronoun, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSOrthography, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSMorphologyCustomPronoun, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSOrthography, _sel_classForKeyedUnarchiver); + return objc.NSObject.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:"); -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_907 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setCustomPronoun_forLanguage_error_ = - objc.registerName("setCustomPronoun:forLanguage:error:"); -final _objc_msgSend_908 = objc.msgSendPointer +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_461 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.Pointer)>>() .asFunction< - bool Function( + instancetype 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_909 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - 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:"); -class NSOperationQueue extends NSObject { - NSOperationQueue._(ffi.Pointer pointer, +class NSPointerArray extends objc.NSObject { + NSPointerArray._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSOperationQueue] that points to the same underlying object as [other]. - static NSOperationQueue castFrom(T other) { - return NSOperationQueue._(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.pointer, retain: true, release: true); - /// Returns a [NSOperationQueue] that wraps the given raw object pointer. - static NSOperationQueue castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperationQueue._(other, retain: retain, release: release); - } + /// 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); - } - - NSProgress get progress { - final _ret = _objc_msgSend_879(this.pointer, _sel_progress); - return NSProgress._(_ret, retain: true, release: true); - } - - void addOperation_(NSOperation op) { - _objc_msgSend_910(this.pointer, _sel_addOperation_, op.pointer); - } - - void addOperations_waitUntilFinished_(NSArray ops, bool wait) { - _objc_msgSend_913( - this.pointer, _sel_addOperations_waitUntilFinished_, ops.pointer, wait); + obj.pointer, _sel_isKindOfClass_, _class_NSPointerArray); } - void addOperationWithBlock_(ObjCBlock_ffiVoid block) { - _objc_msgSend_532(this.pointer, _sel_addOperationWithBlock_, block.pointer); + NSPointerArray initWithOptions_(int options) { + final _ret = + _objc_msgSend_462(this.pointer, _sel_initWithOptions_, options); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - void addBarrierBlock_(ObjCBlock_ffiVoid barrier) { - _objc_msgSend_532(this.pointer, _sel_addBarrierBlock_, barrier.pointer); + NSPointerArray initWithPointerFunctions_(NSPointerFunctions functions) { + final _ret = _objc_msgSend_476( + this.pointer, _sel_initWithPointerFunctions_, functions.pointer); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - int get maxConcurrentOperationCount { - return _objc_msgSend_83(this.pointer, _sel_maxConcurrentOperationCount); + static NSPointerArray pointerArrayWithOptions_(int options) { + final _ret = _objc_msgSend_477( + _class_NSPointerArray, _sel_pointerArrayWithOptions_, options); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - set maxConcurrentOperationCount(int value) { - return _objc_msgSend_635( - this.pointer, _sel_setMaxConcurrentOperationCount_, value); + static NSPointerArray pointerArrayWithPointerFunctions_( + NSPointerFunctions functions) { + final _ret = _objc_msgSend_478(_class_NSPointerArray, + _sel_pointerArrayWithPointerFunctions_, functions.pointer); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - bool get suspended { - return _objc_msgSend_12(this.pointer, _sel_isSuspended); + NSPointerFunctions get pointerFunctions { + final _ret = _objc_msgSend_479(this.pointer, _sel_pointerFunctions); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - set suspended(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setSuspended_, value); + ffi.Pointer pointerAtIndex_(int index) { + return _objc_msgSend_480(this.pointer, _sel_pointerAtIndex_, index); } - NSString? get name { - final _ret = _objc_msgSend_44(this.pointer, _sel_name); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + void addPointer_(ffi.Pointer pointer) { + _objc_msgSend_481(this.pointer, _sel_addPointer_, pointer); } - set name(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); + void removePointerAtIndex_(int index) { + _objc_msgSend_414(this.pointer, _sel_removePointerAtIndex_, index); } - int get qualityOfService { - return _objc_msgSend_543(this.pointer, _sel_qualityOfService); + void insertPointer_atIndex_(ffi.Pointer item, int index) { + _objc_msgSend_482(this.pointer, _sel_insertPointer_atIndex_, item, index); } - set qualityOfService(int value) { - return _objc_msgSend_544(this.pointer, _sel_setQualityOfService_, value); + void replacePointerAtIndex_withPointer_( + int index, ffi.Pointer item) { + _objc_msgSend_483( + this.pointer, _sel_replacePointerAtIndex_withPointer_, index, item); } - NSObject? get underlyingQueue { - final _ret = _objc_msgSend_914(this.pointer, _sel_underlyingQueue); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + void compact() { + _objc_msgSend_82(this.pointer, _sel_compact); } - set underlyingQueue(NSObject? value) { - return _objc_msgSend_915( - this.pointer, _sel_setUnderlyingQueue_, value?.pointer ?? ffi.nullptr); + int get count { + return _objc_msgSend_29(this.pointer, _sel_count); } - void cancelAllOperations() { - _objc_msgSend_1(this.pointer, _sel_cancelAllOperations); + set count(int value) { + return _objc_msgSend_125(this.pointer, _sel_setCount_, value); } - void waitUntilAllOperationsAreFinished() { - _objc_msgSend_1(this.pointer, _sel_waitUntilAllOperationsAreFinished); + static objc.NSObject pointerArrayWithStrongObjects() { + final _ret = _objc_msgSend_40( + _class_NSPointerArray, _sel_pointerArrayWithStrongObjects); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSOperationQueue? getCurrentQueue() { - final _ret = _objc_msgSend_916(_class_NSOperationQueue, _sel_currentQueue); - return _ret.address == 0 - ? null - : NSOperationQueue._(_ret, retain: true, release: true); + static objc.NSObject pointerArrayWithWeakObjects() { + final _ret = _objc_msgSend_40( + _class_NSPointerArray, _sel_pointerArrayWithWeakObjects); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSOperationQueue getMainQueue() { - final _ret = _objc_msgSend_917(_class_NSOperationQueue, _sel_mainQueue); - return NSOperationQueue._(_ret, retain: true, release: true); + static NSPointerArray strongObjectsPointerArray() { + final _ret = _objc_msgSend_484( + _class_NSPointerArray, _sel_strongObjectsPointerArray); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - NSArray get operations { - final _ret = _objc_msgSend_85(this.pointer, _sel_operations); - return NSArray._(_ret, retain: true, release: true); + static NSPointerArray weakObjectsPointerArray() { + final _ret = + _objc_msgSend_484(_class_NSPointerArray, _sel_weakObjectsPointerArray); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - int get operationCount { - return _objc_msgSend_10(this.pointer, _sel_operationCount); + objc.NSArray get allObjects { + final _ret = _objc_msgSend_6(this.pointer, _sel_allObjects); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } @override - NSOperationQueue init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSOperationQueue._(_ret, retain: true, release: true); + NSPointerArray init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPointerArray.castFromPointer(_ret, retain: true, release: true); } - static NSOperationQueue new1() { - final _ret = _objc_msgSend_2(_class_NSOperationQueue, _sel_new); - return NSOperationQueue._(_ret, retain: false, release: true); + static NSPointerArray new1() { + final _ret = _objc_msgSend_40(_class_NSPointerArray, _sel_new); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } - static NSOperationQueue allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSPointerArray allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSOperationQueue, _sel_allocWithZone_, zone); - return NSOperationQueue._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSPointerArray, _sel_allocWithZone_, zone); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } - static NSOperationQueue alloc() { - final _ret = _objc_msgSend_2(_class_NSOperationQueue, _sel_alloc); - return NSOperationQueue._(_ret, retain: false, release: true); + static NSPointerArray alloc() { + final _ret = _objc_msgSend_40(_class_NSPointerArray, _sel_alloc); + return NSPointerArray.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSOperationQueue, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPointerArray, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSOperationQueue, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPointerArray, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSOperationQueue, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSPointerArray, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSOperationQueue, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSPointerArray, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSOperationQueue, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPointerArray, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSOperationQueue, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPointerArray, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSOperationQueue, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPointerArray, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSOperationQueue, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPointerArray, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSOperationQueue, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSPointerArray, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSOperationQueue = objc.getClass("NSOperationQueue"); +late final _class_NSPointerArray = objc.getClass("NSPointerArray"); -class NSOperation extends NSObject { - NSOperation._(ffi.Pointer pointer, +abstract class NSPointerFunctionsOptions { + static const int NSPointerFunctionsStrongMemory = 0; + static const int NSPointerFunctionsZeroingWeakMemory = 1; + static const int NSPointerFunctionsOpaqueMemory = 2; + static const int NSPointerFunctionsMallocMemory = 3; + static const int NSPointerFunctionsMachVirtualMemory = 4; + static const int NSPointerFunctionsWeakMemory = 5; + static const int NSPointerFunctionsObjectPersonality = 0; + static const int NSPointerFunctionsOpaquePersonality = 256; + static const int NSPointerFunctionsObjectPointerPersonality = 512; + static const int NSPointerFunctionsCStringPersonality = 768; + static const int NSPointerFunctionsStructPersonality = 1024; + static const int NSPointerFunctionsIntegerPersonality = 1280; + static const int NSPointerFunctionsCopyIn = 65536; +} + +late final _sel_initWithOptions_ = objc.registerName("initWithOptions:"); +final _objc_msgSend_462 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); + +class NSPointerFunctions extends objc.NSObject { + NSPointerFunctions._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSOperation] that points to the same underlying object as [other]. - static NSOperation castFrom(T other) { - return NSOperation._(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.pointer, retain: true, release: true); - /// Returns a [NSOperation] that wraps the given raw object pointer. - static NSOperation castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSOperation._(other, retain: retain, release: release); - } + /// 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 [NSOperation]. + /// Returns whether [obj] is an instance of [NSPointerFunctions]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSOperation); - } - - void start() { - _objc_msgSend_1(this.pointer, _sel_start); - } - - void main() { - _objc_msgSend_1(this.pointer, _sel_main); - } - - bool get cancelled { - return _objc_msgSend_12(this.pointer, _sel_isCancelled); - } - - void cancel() { - _objc_msgSend_1(this.pointer, _sel_cancel); - } - - bool get executing { - return _objc_msgSend_12(this.pointer, _sel_isExecuting); + obj.pointer, _sel_isKindOfClass_, _class_NSPointerFunctions); } - bool get finished { - return _objc_msgSend_12(this.pointer, _sel_isFinished); + NSPointerFunctions initWithOptions_(int options) { + final _ret = + _objc_msgSend_462(this.pointer, _sel_initWithOptions_, options); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - bool get concurrent { - return _objc_msgSend_12(this.pointer, _sel_isConcurrent); + static NSPointerFunctions pointerFunctionsWithOptions_(int options) { + final _ret = _objc_msgSend_463( + _class_NSPointerFunctions, _sel_pointerFunctionsWithOptions_, options); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - bool get asynchronous { - return _objc_msgSend_12(this.pointer, _sel_isAsynchronous); + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get hashFunction { + return _objc_msgSend_464(this.pointer, _sel_hashFunction); } - bool get ready { - return _objc_msgSend_12(this.pointer, _sel_isReady); + set hashFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value) { + return _objc_msgSend_465(this.pointer, _sel_setHashFunction_, value); } - void addDependency_(NSOperation op) { - _objc_msgSend_910(this.pointer, _sel_addDependency_, op.pointer); + 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_466(this.pointer, _sel_isEqualFunction); } - void removeDependency_(NSOperation op) { - _objc_msgSend_910(this.pointer, _sel_removeDependency_, op.pointer); + 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_467(this.pointer, _sel_setIsEqualFunction_, value); } - NSArray get dependencies { - final _ret = _objc_msgSend_85(this.pointer, _sel_dependencies); - return NSArray._(_ret, retain: true, release: true); + ffi.Pointer< + ffi.NativeFunction)>> + get sizeFunction { + return _objc_msgSend_468(this.pointer, _sel_sizeFunction); } - int get queuePriority { - return _objc_msgSend_911(this.pointer, _sel_queuePriority); + set sizeFunction( + ffi.Pointer< + ffi + .NativeFunction)>> + value) { + return _objc_msgSend_469(this.pointer, _sel_setSizeFunction_, value); } - set queuePriority(int value) { - return _objc_msgSend_912(this.pointer, _sel_setQueuePriority_, value); + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + get descriptionFunction { + return _objc_msgSend_470(this.pointer, _sel_descriptionFunction); } - ObjCBlock_ffiVoid? get completionBlock { - final _ret = _objc_msgSend_668(this.pointer, _sel_completionBlock); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid._(_ret, retain: true, release: true); + set descriptionFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> + value) { + return _objc_msgSend_471(this.pointer, _sel_setDescriptionFunction_, value); } - set completionBlock(ObjCBlock_ffiVoid? value) { - return _objc_msgSend_669( - this.pointer, _sel_setCompletionBlock_, value?.pointer ?? ffi.nullptr); + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer)>>)>> + get relinquishFunction { + return _objc_msgSend_472(this.pointer, _sel_relinquishFunction); } - void waitUntilFinished() { - _objc_msgSend_1(this.pointer, _sel_waitUntilFinished); + set relinquishFunction( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer)>>)>> + value) { + return _objc_msgSend_473(this.pointer, _sel_setRelinquishFunction_, value); } - double get threadPriority { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_threadPriority) - : _objc_msgSend_165(this.pointer, _sel_threadPriority); + 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_474(this.pointer, _sel_acquireFunction); } - set threadPriority(double value) { - return _objc_msgSend_542(this.pointer, _sel_setThreadPriority_, 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_475(this.pointer, _sel_setAcquireFunction_, value); } - int get qualityOfService { - return _objc_msgSend_543(this.pointer, _sel_qualityOfService); + bool get usesStrongWriteBarrier { + return _objc_msgSend_7(this.pointer, _sel_usesStrongWriteBarrier); } - set qualityOfService(int value) { - return _objc_msgSend_544(this.pointer, _sel_setQualityOfService_, value); + set usesStrongWriteBarrier(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesStrongWriteBarrier_, value); } - NSString? get name { - final _ret = _objc_msgSend_44(this.pointer, _sel_name); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + bool get usesWeakReadAndWriteBarriers { + return _objc_msgSend_7(this.pointer, _sel_usesWeakReadAndWriteBarriers); } - set name(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); + set usesWeakReadAndWriteBarriers(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setUsesWeakReadAndWriteBarriers_, value); } @override - NSOperation init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSOperation._(_ret, retain: true, release: true); + NSPointerFunctions init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSPointerFunctions.castFromPointer(_ret, + retain: true, release: true); } - static NSOperation new1() { - final _ret = _objc_msgSend_2(_class_NSOperation, _sel_new); - return NSOperation._(_ret, retain: false, release: true); + static NSPointerFunctions new1() { + final _ret = _objc_msgSend_40(_class_NSPointerFunctions, _sel_new); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } - static NSOperation allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSOperation, _sel_allocWithZone_, zone); - return NSOperation._(_ret, retain: false, release: true); + static NSPointerFunctions allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSPointerFunctions, _sel_allocWithZone_, zone); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } - static NSOperation alloc() { - final _ret = _objc_msgSend_2(_class_NSOperation, _sel_alloc); - return NSOperation._(_ret, retain: false, release: true); + static NSPointerFunctions alloc() { + final _ret = _objc_msgSend_40(_class_NSPointerFunctions, _sel_alloc); + return NSPointerFunctions.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSOperation, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSPointerFunctions, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSOperation, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSPointerFunctions, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSOperation, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSPointerFunctions, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSOperation, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSPointerFunctions, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSOperation, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSPointerFunctions, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSOperation, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSPointerFunctions, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSOperation, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSPointerFunctions, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSOperation, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSPointerFunctions, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSOperation, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSPointerFunctions, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSOperation = objc.getClass("NSOperation"); -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_910 = objc.msgSendPointer +late final _class_NSPointerFunctions = objc.getClass("NSPointerFunctions"); +late final _sel_pointerFunctionsWithOptions_ = + objc.registerName("pointerFunctionsWithOptions:"); +final _objc_msgSend_463 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_hashFunction = objc.registerName("hashFunction"); +final _objc_msgSend_464 = 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_465 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, 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)>(); -late final _sel_removeDependency_ = objc.registerName("removeDependency:"); -late final _sel_dependencies = objc.registerName("dependencies"); - -abstract class NSOperationQueuePriority { - static const int NSOperationQueuePriorityVeryLow = -8; - static const int NSOperationQueuePriorityLow = -4; - static const int NSOperationQueuePriorityNormal = 0; - static const int NSOperationQueuePriorityHigh = 4; - static const int NSOperationQueuePriorityVeryHigh = 8; -} - -late final _sel_queuePriority = objc.registerName("queuePriority"); -final _objc_msgSend_911 = 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_466 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, ffi.Pointer)>>)>> Function( + ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setQueuePriority_ = objc.registerName("setQueuePriority:"); -final _objc_msgSend_912 = 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_467 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + 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)>(); -late final _sel_completionBlock = objc.registerName("completionBlock"); -late final _sel_setCompletionBlock_ = objc.registerName("setCompletionBlock:"); -late final _sel_waitUntilFinished = objc.registerName("waitUntilFinished"); -late final _sel_addOperation_ = objc.registerName("addOperation:"); -late final _sel_addOperations_waitUntilFinished_ = - objc.registerName("addOperations:waitUntilFinished:"); -final _objc_msgSend_913 = 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_468 = 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_469 = 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_470 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer)>> Function( ffi.Pointer, - ffi.Bool)>>() + 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_471 = 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_472 = 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_473 = 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, - 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_914 = objc.msgSendPointer + 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_474 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>, ffi.Bool)>> Function( + ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setUnderlyingQueue_ = objc.registerName("setUnderlyingQueue:"); -final _objc_msgSend_915 = 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_475 = 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_476 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, + instancetype 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_916 = objc.msgSendPointer +late final _sel_pointerArrayWithOptions_ = + objc.registerName("pointerArrayWithOptions:"); +final _objc_msgSend_477 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_pointerArrayWithPointerFunctions_ = + objc.registerName("pointerArrayWithPointerFunctions:"); +final _objc_msgSend_478 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_pointerFunctions = objc.registerName("pointerFunctions"); +final _objc_msgSend_479 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -45608,8 +21552,61 @@ final _objc_msgSend_916 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_mainQueue = objc.registerName("mainQueue"); -final _objc_msgSend_917 = objc.msgSendPointer +late final _sel_pointerAtIndex_ = objc.registerName("pointerAtIndex:"); +final _objc_msgSend_480 = 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_481 = 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_482 = 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_483 = 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_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_484 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -45617,1118 +21614,1655 @@ final _objc_msgSend_917 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_operations = objc.registerName("operations"); -late final _sel_operationCount = objc.registerName("operationCount"); +late final _sel_weakObjectsPointerArray = + objc.registerName("weakObjectsPointerArray"); +late final _sel_allObjects = objc.registerName("allObjects"); -class NSPointerArray extends NSObject { - NSPointerArray._(ffi.Pointer pointer, +class NSProcessInfo extends objc.NSObject { + NSProcessInfo._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSPointerArray] that points to the same underlying object as [other]. - static NSPointerArray castFrom(T other) { - return NSPointerArray._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSProcessInfo] that points to the same underlying object as [other]. + NSProcessInfo.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSPointerArray] that wraps the given raw object pointer. - static NSPointerArray castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPointerArray._(other, retain: retain, release: release); - } + /// Constructs a [NSProcessInfo] that wraps the given raw object pointer. + NSProcessInfo.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSPointerArray]. + /// Returns whether [obj] is an instance of [NSProcessInfo]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSPointerArray); + obj.pointer, _sel_isKindOfClass_, _class_NSProcessInfo); } - NSPointerArray initWithOptions_(int options) { + static NSProcessInfo getProcessInfo() { + final _ret = _objc_msgSend_485(_class_NSProcessInfo, _sel_processInfo); + return NSProcessInfo.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSDictionary get environment { + final _ret = _objc_msgSend_112(this.pointer, _sel_environment); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray get arguments { + final _ret = _objc_msgSend_6(this.pointer, _sel_arguments); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString get hostName { + final _ret = _objc_msgSend_12(this.pointer, _sel_hostName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString get processName { + final _ret = _objc_msgSend_12(this.pointer, _sel_processName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set processName(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setProcessName_, value.pointer); + } + + int get processIdentifier { + return _objc_msgSend_264(this.pointer, _sel_processIdentifier); + } + + objc.NSString get globallyUniqueString { + final _ret = _objc_msgSend_12(this.pointer, _sel_globallyUniqueString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + int operatingSystem() { + return _objc_msgSend_29(this.pointer, _sel_operatingSystem); + } + + objc.NSString operatingSystemName() { + final _ret = _objc_msgSend_12(this.pointer, _sel_operatingSystemName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString get operatingSystemVersionString { final _ret = - _objc_msgSend_918(this.pointer, _sel_initWithOptions_, options); - return NSPointerArray._(_ret, retain: true, release: true); + _objc_msgSend_12(this.pointer, _sel_operatingSystemVersionString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSPointerArray initWithPointerFunctions_(NSPointerFunctions functions) { - final _ret = _objc_msgSend_932( - this.pointer, _sel_initWithPointerFunctions_, functions.pointer); - return NSPointerArray._(_ret, retain: true, release: true); + void getOperatingSystemVersion(ffi.Pointer stret) { + objc.useMsgSendVariants + ? _objc_msgSend_486Stret( + stret, this.pointer, _sel_operatingSystemVersion) + : stret.ref = + _objc_msgSend_486(this.pointer, _sel_operatingSystemVersion); } - static NSPointerArray pointerArrayWithOptions_(int options) { - final _ret = _objc_msgSend_933( - _class_NSPointerArray, _sel_pointerArrayWithOptions_, options); - return NSPointerArray._(_ret, retain: true, release: true); + int get processorCount { + return _objc_msgSend_29(this.pointer, _sel_processorCount); + } + + int get activeProcessorCount { + return _objc_msgSend_29(this.pointer, _sel_activeProcessorCount); + } + + int get physicalMemory { + return _objc_msgSend_267(this.pointer, _sel_physicalMemory); + } + + bool isOperatingSystemAtLeastVersion_(NSOperatingSystemVersion version) { + return _objc_msgSend_487( + this.pointer, _sel_isOperatingSystemAtLeastVersion_, version); + } + + double get systemUptime { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_systemUptime) + : _objc_msgSend_115(this.pointer, _sel_systemUptime); + } + + void disableSuddenTermination() { + _objc_msgSend_82(this.pointer, _sel_disableSuddenTermination); } - static NSPointerArray pointerArrayWithPointerFunctions_( - NSPointerFunctions functions) { - final _ret = _objc_msgSend_934(_class_NSPointerArray, - _sel_pointerArrayWithPointerFunctions_, functions.pointer); - return NSPointerArray._(_ret, retain: true, release: true); + void enableSuddenTermination() { + _objc_msgSend_82(this.pointer, _sel_enableSuddenTermination); } - NSPointerFunctions get pointerFunctions { - final _ret = _objc_msgSend_935(this.pointer, _sel_pointerFunctions); - return NSPointerFunctions._(_ret, retain: true, release: true); + void disableAutomaticTermination_(objc.NSString reason) { + _objc_msgSend_98( + this.pointer, _sel_disableAutomaticTermination_, reason.pointer); } - ffi.Pointer pointerAtIndex_(int index) { - return _objc_msgSend_936(this.pointer, _sel_pointerAtIndex_, index); + void enableAutomaticTermination_(objc.NSString reason) { + _objc_msgSend_98( + this.pointer, _sel_enableAutomaticTermination_, reason.pointer); } - void addPointer_(ffi.Pointer pointer) { - _objc_msgSend_52(this.pointer, _sel_addPointer_, pointer); + bool get automaticTerminationSupportEnabled { + return _objc_msgSend_7( + this.pointer, _sel_automaticTerminationSupportEnabled); } - void removePointerAtIndex_(int index) { - _objc_msgSend_470(this.pointer, _sel_removePointerAtIndex_, index); + set automaticTerminationSupportEnabled(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAutomaticTerminationSupportEnabled_, value); } - void insertPointer_atIndex_(ffi.Pointer item, int index) { - _objc_msgSend_22(this.pointer, _sel_insertPointer_atIndex_, item, index); + objc.NSObject beginActivityWithOptions_reason_( + int options, objc.NSString reason) { + final _ret = _objc_msgSend_488(this.pointer, + _sel_beginActivityWithOptions_reason_, options, reason.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void replacePointerAtIndex_withPointer_( - int index, ffi.Pointer item) { - _objc_msgSend_937( - this.pointer, _sel_replacePointerAtIndex_withPointer_, index, item); + void endActivity_(objc.NSObject activity) { + _objc_msgSend_49(this.pointer, _sel_endActivity_, activity.pointer); } - void compact() { - _objc_msgSend_1(this.pointer, _sel_compact); + void performActivityWithOptions_reason_usingBlock_( + int options, objc.NSString reason, ObjCBlock_ffiVoid block) { + _objc_msgSend_489( + this.pointer, + _sel_performActivityWithOptions_reason_usingBlock_, + options, + reason.pointer, + block.pointer); } - int get count { - return _objc_msgSend_10(this.pointer, _sel_count); + void performExpiringActivityWithReason_usingBlock_( + objc.NSString reason, ObjCBlock_ffiVoid_bool block) { + _objc_msgSend_490( + this.pointer, + _sel_performExpiringActivityWithReason_usingBlock_, + reason.pointer, + block.pointer); } - set count(int value) { - return _objc_msgSend_516(this.pointer, _sel_setCount_, value); + objc.NSString get userName { + final _ret = _objc_msgSend_12(this.pointer, _sel_userName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject pointerArrayWithStrongObjects() { - final _ret = _objc_msgSend_2( - _class_NSPointerArray, _sel_pointerArrayWithStrongObjects); - return NSObject._(_ret, retain: true, release: true); + objc.NSString get fullUserName { + final _ret = _objc_msgSend_12(this.pointer, _sel_fullUserName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject pointerArrayWithWeakObjects() { - final _ret = _objc_msgSend_2( - _class_NSPointerArray, _sel_pointerArrayWithWeakObjects); - return NSObject._(_ret, retain: true, release: true); + int get thermalState { + return _objc_msgSend_491(this.pointer, _sel_thermalState); } - static NSPointerArray strongObjectsPointerArray() { - final _ret = _objc_msgSend_938( - _class_NSPointerArray, _sel_strongObjectsPointerArray); - return NSPointerArray._(_ret, retain: true, release: true); + bool get lowPowerModeEnabled { + return _objc_msgSend_7(this.pointer, _sel_isLowPowerModeEnabled); } - static NSPointerArray weakObjectsPointerArray() { - final _ret = - _objc_msgSend_938(_class_NSPointerArray, _sel_weakObjectsPointerArray); - return NSPointerArray._(_ret, retain: true, release: true); + bool get macCatalystApp { + return _objc_msgSend_7(this.pointer, _sel_isMacCatalystApp); } - NSArray get allObjects { - final _ret = _objc_msgSend_85(this.pointer, _sel_allObjects); - return NSArray._(_ret, retain: true, release: true); + bool get iOSAppOnMac { + return _objc_msgSend_7(this.pointer, _sel_isiOSAppOnMac); } @override - NSPointerArray init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSPointerArray._(_ret, retain: true, release: true); + NSProcessInfo init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSProcessInfo.castFromPointer(_ret, retain: true, release: true); } - static NSPointerArray new1() { - final _ret = _objc_msgSend_2(_class_NSPointerArray, _sel_new); - return NSPointerArray._(_ret, retain: false, release: true); + static NSProcessInfo new1() { + final _ret = _objc_msgSend_40(_class_NSProcessInfo, _sel_new); + return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } - static NSPointerArray allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSProcessInfo allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSPointerArray, _sel_allocWithZone_, zone); - return NSPointerArray._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSProcessInfo, _sel_allocWithZone_, zone); + return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } - static NSPointerArray alloc() { - final _ret = _objc_msgSend_2(_class_NSPointerArray, _sel_alloc); - return NSPointerArray._(_ret, retain: false, release: true); + static NSProcessInfo alloc() { + final _ret = _objc_msgSend_40(_class_NSProcessInfo, _sel_alloc); + return NSProcessInfo.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSPointerArray, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSProcessInfo, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSPointerArray, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSProcessInfo, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSPointerArray, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSProcessInfo, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSPointerArray, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSProcessInfo, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSPointerArray, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSProcessInfo, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSPointerArray, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSProcessInfo, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSPointerArray, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSProcessInfo, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSPointerArray, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSProcessInfo, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSPointerArray, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSProcessInfo, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSPointerArray = objc.getClass("NSPointerArray"); +late final _class_NSProcessInfo = objc.getClass("NSProcessInfo"); +late final _sel_processInfo = objc.registerName("processInfo"); +final _objc_msgSend_485 = 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"); -abstract class NSPointerFunctionsOptions { - static const int NSPointerFunctionsStrongMemory = 0; - static const int NSPointerFunctionsZeroingWeakMemory = 1; - static const int NSPointerFunctionsOpaqueMemory = 2; - static const int NSPointerFunctionsMallocMemory = 3; - static const int NSPointerFunctionsMachVirtualMemory = 4; - static const int NSPointerFunctionsWeakMemory = 5; - static const int NSPointerFunctionsObjectPersonality = 0; - static const int NSPointerFunctionsOpaquePersonality = 256; - static const int NSPointerFunctionsObjectPointerPersonality = 512; - static const int NSPointerFunctionsCStringPersonality = 768; - static const int NSPointerFunctionsStructPersonality = 1024; - static const int NSPointerFunctionsIntegerPersonality = 1280; - static const int NSPointerFunctionsCopyIn = 65536; +final class NSOperatingSystemVersion extends ffi.Struct { + @ffi.Long() + external int majorVersion; + + @ffi.Long() + external int minorVersion; + + @ffi.Long() + external int patchVersion; } -late final _sel_initWithOptions_ = objc.registerName("initWithOptions:"); -final _objc_msgSend_918 = objc.msgSendPointer +late final _sel_operatingSystemVersion = + objc.registerName("operatingSystemVersion"); +final _objc_msgSend_486 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + NSOperatingSystemVersion Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int)>(); + NSOperatingSystemVersion Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_486Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_processorCount = objc.registerName("processorCount"); +late final _sel_activeProcessorCount = + objc.registerName("activeProcessorCount"); +late final _sel_physicalMemory = objc.registerName("physicalMemory"); +late final _sel_isOperatingSystemAtLeastVersion_ = + objc.registerName("isOperatingSystemAtLeastVersion:"); +final _objc_msgSend_487 = 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:"); -class NSPointerFunctions extends NSObject { - NSPointerFunctions._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); +abstract class NSActivityOptions { + static const int NSActivityIdleDisplaySleepDisabled = 1099511627776; + static const int NSActivityIdleSystemSleepDisabled = 1048576; + static const int NSActivitySuddenTerminationDisabled = 16384; + static const int NSActivityAutomaticTerminationDisabled = 32768; + static const int NSActivityAnimationTrackingEnabled = 35184372088832; + static const int NSActivityTrackingEnabled = 70368744177664; + static const int NSActivityUserInitiated = 16777215; + static const int NSActivityUserInitiatedAllowingIdleSystemSleep = 15728639; + static const int NSActivityBackground = 255; + static const int NSActivityLatencyCritical = 1095216660480; + static const int NSActivityUserInteractive = 1095233437695; +} - /// Returns a [NSPointerFunctions] that points to the same underlying object as [other]. - static NSPointerFunctions castFrom(T other) { - return NSPointerFunctions._(other.pointer, retain: true, release: true); - } +late final _sel_beginActivityWithOptions_reason_ = + objc.registerName("beginActivityWithOptions:reason:"); +final _objc_msgSend_488 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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_489 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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); +final _ObjCBlock_ffiVoid_bool_closureRegistry = {}; +int _ObjCBlock_ffiVoid_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_bool_registerClosure( + void Function(bool) fn) { + final id = ++_ObjCBlock_ffiVoid_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - /// Returns a [NSPointerFunctions] that wraps the given raw object pointer. - static NSPointerFunctions castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSPointerFunctions._(other, retain: retain, release: release); +void _ObjCBlock_ffiVoid_bool_closureTrampoline( + ffi.Pointer block, bool arg0) => + _ObjCBlock_ffiVoid_bool_closureRegistry[block.ref.target.address]!(arg0); + +class ObjCBlock_ffiVoid_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_bool._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_bool._(pointer, retain: retain, release: release); } - /// Returns whether [obj] is an instance of [NSPointerFunctions]. + /// 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.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_bool.fromFunction(void Function(bool) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Bool)>(_ObjCBlock_ffiVoid_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_bool_registerClosure((bool arg0) => fn(arg0)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_bool.listener(void Function(bool) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Bool)>.listener( + _ObjCBlock_ffiVoid_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_bool_registerClosure((bool arg0) => fn(arg0)))); + static ffi + .NativeCallable, ffi.Bool)>? + _dartFuncListenerTrampoline; + + void call(bool arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, ffi.Bool arg0)>>() + .asFunction, bool)>()( + pointer, arg0); +} + +late final _sel_performExpiringActivityWithReason_usingBlock_ = + objc.registerName("performExpiringActivityWithReason:usingBlock:"); +final _objc_msgSend_490 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_userName = objc.registerName("userName"); +late final _sel_fullUserName = objc.registerName("fullUserName"); + +abstract class NSProcessInfoThermalState { + static const int NSProcessInfoThermalStateNominal = 0; + static const int NSProcessInfoThermalStateFair = 1; + static const int NSProcessInfoThermalStateSerious = 2; + static const int NSProcessInfoThermalStateCritical = 3; +} + +late final _sel_thermalState = objc.registerName("thermalState"); +final _objc_msgSend_491 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 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"); + +class NSTextCheckingResult extends objc.NSObject { + NSTextCheckingResult._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSTextCheckingResult] that points to the same underlying object as [other]. + NSTextCheckingResult.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSTextCheckingResult] that wraps the given raw object pointer. + NSTextCheckingResult.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSTextCheckingResult]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSPointerFunctions); + obj.pointer, _sel_isKindOfClass_, _class_NSTextCheckingResult); } - NSPointerFunctions initWithOptions_(int options) { - final _ret = - _objc_msgSend_918(this.pointer, _sel_initWithOptions_, options); - return NSPointerFunctions._(_ret, retain: true, release: true); + int get resultType { + return _objc_msgSend_492(this.pointer, _sel_resultType); } - static NSPointerFunctions pointerFunctionsWithOptions_(int options) { - final _ret = _objc_msgSend_919( - _class_NSPointerFunctions, _sel_pointerFunctionsWithOptions_, options); - return NSPointerFunctions._(_ret, retain: true, release: true); + void getRange(ffi.Pointer<_NSRange> stret) { + objc.useMsgSendVariants + ? _objc_msgSend_493Stret(stret, this.pointer, _sel_range) + : stret.ref = _objc_msgSend_493(this.pointer, _sel_range); } - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - get hashFunction { - return _objc_msgSend_920(this.pointer, _sel_hashFunction); + NSOrthography? get orthography { + final _ret = _objc_msgSend_494(this.pointer, _sel_orthography); + return _ret.address == 0 + ? null + : NSOrthography.castFromPointer(_ret, retain: true, release: true); } - set hashFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value) { - return _objc_msgSend_921(this.pointer, _sel_setHashFunction_, value); + objc.NSArray? get grammarDetails { + final _ret = _objc_msgSend_69(this.pointer, _sel_grammarDetails); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - 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_922(this.pointer, _sel_isEqualFunction); + objc.NSDate? get date { + final _ret = _objc_msgSend_116(this.pointer, _sel_date); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - 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_923(this.pointer, _sel_setIsEqualFunction_, value); + NSTimeZone? get timeZone { + final _ret = _objc_msgSend_132(this.pointer, _sel_timeZone); + return _ret.address == 0 + ? null + : NSTimeZone.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer< - ffi.NativeFunction)>> - get sizeFunction { - return _objc_msgSend_924(this.pointer, _sel_sizeFunction); + double get duration { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_duration) + : _objc_msgSend_115(this.pointer, _sel_duration); } - set sizeFunction( - ffi.Pointer< - ffi - .NativeFunction)>> - value) { - return _objc_msgSend_925(this.pointer, _sel_setSizeFunction_, value); + objc.NSDictionary? get components { + final _ret = _objc_msgSend_65(this.pointer, _sel_components); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - get descriptionFunction { - return _objc_msgSend_926(this.pointer, _sel_descriptionFunction); + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - set descriptionFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>> - value) { - return _objc_msgSend_927(this.pointer, _sel_setDescriptionFunction_, value); + objc.NSString? get replacementString { + final _ret = _objc_msgSend_13(this.pointer, _sel_replacementString); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray? get alternativeStrings { + final _ret = _objc_msgSend_69(this.pointer, _sel_alternativeStrings); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSRegularExpression? get regularExpression { + final _ret = _objc_msgSend_506(this.pointer, _sel_regularExpression); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); + } + + objc.NSString? get phoneNumber { + final _ret = _objc_msgSend_13(this.pointer, _sel_phoneNumber); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + int get numberOfRanges { + return _objc_msgSend_29(this.pointer, _sel_numberOfRanges); + } + + void rangeAtIndex_(ffi.Pointer<_NSRange> stret, int idx) { + objc.useMsgSendVariants + ? _objc_msgSend_507Stret(stret, this.pointer, _sel_rangeAtIndex_, idx) + : stret.ref = _objc_msgSend_507(this.pointer, _sel_rangeAtIndex_, idx); + } + + void rangeWithName_(ffi.Pointer<_NSRange> stret, objc.NSString name) { + objc.useMsgSendVariants + ? _objc_msgSend_508Stret( + stret, this.pointer, _sel_rangeWithName_, name.pointer) + : stret.ref = + _objc_msgSend_508(this.pointer, _sel_rangeWithName_, name.pointer); + } + + NSTextCheckingResult resultByAdjustingRangesWithOffset_(int offset) { + final _ret = _objc_msgSend_509( + this.pointer, _sel_resultByAdjustingRangesWithOffset_, offset); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + objc.NSDictionary? get addressComponents { + final _ret = _objc_msgSend_65(this.pointer, _sel_addressComponents); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSTextCheckingResult orthographyCheckingResultWithRange_orthography_( + _NSRange range, NSOrthography orthography) { + final _ret = _objc_msgSend_510( + _class_NSTextCheckingResult, + _sel_orthographyCheckingResultWithRange_orthography_, + range, + orthography.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult spellCheckingResultWithRange_(_NSRange range) { + final _ret = _objc_msgSend_511( + _class_NSTextCheckingResult, _sel_spellCheckingResultWithRange_, range); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult grammarCheckingResultWithRange_details_( + _NSRange range, objc.NSArray details) { + final _ret = _objc_msgSend_512(_class_NSTextCheckingResult, + _sel_grammarCheckingResultWithRange_details_, range, details.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult dateCheckingResultWithRange_date_( + _NSRange range, objc.NSDate date) { + final _ret = _objc_msgSend_513(_class_NSTextCheckingResult, + _sel_dateCheckingResultWithRange_date_, range, date.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult + dateCheckingResultWithRange_date_timeZone_duration_(_NSRange range, + objc.NSDate date, NSTimeZone timeZone, double duration) { + final _ret = _objc_msgSend_514( + _class_NSTextCheckingResult, + _sel_dateCheckingResultWithRange_date_timeZone_duration_, + range, + date.pointer, + timeZone.pointer, + duration); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult addressCheckingResultWithRange_components_( + _NSRange range, objc.NSDictionary components) { + final _ret = _objc_msgSend_515( + _class_NSTextCheckingResult, + _sel_addressCheckingResultWithRange_components_, + range, + components.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); + } + + static NSTextCheckingResult linkCheckingResultWithRange_URL_( + _NSRange range, objc.NSURL url) { + final _ret = _objc_msgSend_516(_class_NSTextCheckingResult, + _sel_linkCheckingResultWithRange_URL_, range, url.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function(ffi.Pointer)>>)>> - get relinquishFunction { - return _objc_msgSend_928(this.pointer, _sel_relinquishFunction); + static NSTextCheckingResult quoteCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_quoteCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - set relinquishFunction( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer)>>)>> - value) { - return _objc_msgSend_929(this.pointer, _sel_setRelinquishFunction_, value); + static NSTextCheckingResult dashCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_dashCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - 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_930(this.pointer, _sel_acquireFunction); + static NSTextCheckingResult + replacementCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_replacementCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - 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_931(this.pointer, _sel_setAcquireFunction_, value); + static NSTextCheckingResult + correctionCheckingResultWithRange_replacementString_( + _NSRange range, objc.NSString replacementString) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_correctionCheckingResultWithRange_replacementString_, + range, + replacementString.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - bool get usesStrongWriteBarrier { - return _objc_msgSend_12(this.pointer, _sel_usesStrongWriteBarrier); + static NSTextCheckingResult + correctionCheckingResultWithRange_replacementString_alternativeStrings_( + _NSRange range, + objc.NSString replacementString, + objc.NSArray alternativeStrings) { + final _ret = _objc_msgSend_518( + _class_NSTextCheckingResult, + _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_, + range, + replacementString.pointer, + alternativeStrings.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - set usesStrongWriteBarrier(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setUsesStrongWriteBarrier_, value); + static NSTextCheckingResult + regularExpressionCheckingResultWithRanges_count_regularExpression_( + ffi.Pointer<_NSRange> ranges, + int count, + NSRegularExpression regularExpression) { + final _ret = _objc_msgSend_519( + _class_NSTextCheckingResult, + _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_, + ranges, + count, + regularExpression.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - bool get usesWeakReadAndWriteBarriers { - return _objc_msgSend_12(this.pointer, _sel_usesWeakReadAndWriteBarriers); + static NSTextCheckingResult phoneNumberCheckingResultWithRange_phoneNumber_( + _NSRange range, objc.NSString phoneNumber) { + final _ret = _objc_msgSend_517( + _class_NSTextCheckingResult, + _sel_phoneNumberCheckingResultWithRange_phoneNumber_, + range, + phoneNumber.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - set usesWeakReadAndWriteBarriers(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setUsesWeakReadAndWriteBarriers_, value); + static NSTextCheckingResult + transitInformationCheckingResultWithRange_components_( + _NSRange range, objc.NSDictionary components) { + final _ret = _objc_msgSend_515( + _class_NSTextCheckingResult, + _sel_transitInformationCheckingResultWithRange_components_, + range, + components.pointer); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } @override - NSPointerFunctions init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSPointerFunctions._(_ret, retain: true, release: true); + NSTextCheckingResult init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - static NSPointerFunctions new1() { - final _ret = _objc_msgSend_2(_class_NSPointerFunctions, _sel_new); - return NSPointerFunctions._(_ret, retain: false, release: true); + static NSTextCheckingResult new1() { + final _ret = _objc_msgSend_40(_class_NSTextCheckingResult, _sel_new); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } - static NSPointerFunctions allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSPointerFunctions, _sel_allocWithZone_, zone); - return NSPointerFunctions._(_ret, retain: false, release: true); + static NSTextCheckingResult allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSTextCheckingResult, _sel_allocWithZone_, zone); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } - static NSPointerFunctions alloc() { - final _ret = _objc_msgSend_2(_class_NSPointerFunctions, _sel_alloc); - return NSPointerFunctions._(_ret, retain: false, release: true); + static NSTextCheckingResult alloc() { + final _ret = _objc_msgSend_40(_class_NSTextCheckingResult, _sel_alloc); + return NSTextCheckingResult.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSPointerFunctions, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTextCheckingResult, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSPointerFunctions, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTextCheckingResult, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSPointerFunctions, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSTextCheckingResult, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSPointerFunctions, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSTextCheckingResult, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSPointerFunctions, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTextCheckingResult, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSPointerFunctions, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSTextCheckingResult, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSPointerFunctions, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTextCheckingResult, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSPointerFunctions, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSTextCheckingResult, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSPointerFunctions, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSTextCheckingResult, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSPointerFunctions = objc.getClass("NSPointerFunctions"); -late final _sel_pointerFunctionsWithOptions_ = - objc.registerName("pointerFunctionsWithOptions:"); -final _objc_msgSend_919 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_hashFunction = objc.registerName("hashFunction"); -final _objc_msgSend_920 = 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_921 = 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_922 = 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_923 = 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_924 = 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_925 = 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_926 = 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_927 = 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_928 = 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_929 = 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_930 = objc.msgSendPointer +late final _class_NSTextCheckingResult = objc.getClass("NSTextCheckingResult"); + +abstract class NSTextCheckingType { + static const int NSTextCheckingTypeOrthography = 1; + static const int NSTextCheckingTypeSpelling = 2; + static const int NSTextCheckingTypeGrammar = 4; + static const int NSTextCheckingTypeDate = 8; + static const int NSTextCheckingTypeAddress = 16; + static const int NSTextCheckingTypeLink = 32; + static const int NSTextCheckingTypeQuote = 64; + static const int NSTextCheckingTypeDash = 128; + static const int NSTextCheckingTypeReplacement = 256; + static const int NSTextCheckingTypeCorrection = 512; + static const int NSTextCheckingTypeRegularExpression = 1024; + static const int NSTextCheckingTypePhoneNumber = 2048; + static const int NSTextCheckingTypeTransitInformation = 4096; +} + +late final _sel_resultType = objc.registerName("resultType"); +final _objc_msgSend_492 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>, ffi.Bool)>> Function( - ffi.Pointer, + ffi.Int32 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_931 = 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_932 = 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_933 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_pointerArrayWithPointerFunctions_ = - objc.registerName("pointerArrayWithPointerFunctions:"); -final _objc_msgSend_934 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_pointerFunctions = objc.registerName("pointerFunctions"); -final _objc_msgSend_935 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_range = objc.registerName("range"); +final _objc_msgSend_493 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + _NSRange Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + _NSRange Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_pointerAtIndex_ = objc.registerName("pointerAtIndex:"); -final _objc_msgSend_936 = 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:"); -late final _sel_removePointerAtIndex_ = - objc.registerName("removePointerAtIndex:"); -late final _sel_insertPointer_atIndex_ = - objc.registerName("insertPointer:atIndex:"); -late final _sel_replacePointerAtIndex_withPointer_ = - objc.registerName("replacePointerAtIndex:withPointer:"); -final _objc_msgSend_937 = objc.msgSendPointer +final _objc_msgSend_493Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( + ffi.Pointer<_NSRange>, 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_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_938 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_weakObjectsPointerArray = - objc.registerName("weakObjectsPointerArray"); - -class NSProcessInfo extends NSObject { - NSProcessInfo._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSProcessInfo] that points to the same underlying object as [other]. - static NSProcessInfo castFrom(T other) { - return NSProcessInfo._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSProcessInfo] that wraps the given raw object pointer. - static NSProcessInfo castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProcessInfo._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSProcessInfo]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSProcessInfo); - } - - static NSProcessInfo getProcessInfo() { - final _ret = _objc_msgSend_939(_class_NSProcessInfo, _sel_processInfo); - return NSProcessInfo._(_ret, retain: true, release: true); - } - - NSDictionary get environment { - final _ret = _objc_msgSend_181(this.pointer, _sel_environment); - return NSDictionary._(_ret, retain: true, release: true); - } - - NSArray get arguments { - final _ret = _objc_msgSend_85(this.pointer, _sel_arguments); - return NSArray._(_ret, retain: true, release: true); - } - - NSString get hostName { - final _ret = _objc_msgSend_21(this.pointer, _sel_hostName); - return NSString._(_ret, retain: true, release: true); - } - - NSString get processName { - final _ret = _objc_msgSend_21(this.pointer, _sel_processName); - return NSString._(_ret, retain: true, release: true); - } - - set processName(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setProcessName_, value.pointer); - } - - int get processIdentifier { - return _objc_msgSend_237(this.pointer, _sel_processIdentifier); - } - - NSString get globallyUniqueString { - final _ret = _objc_msgSend_21(this.pointer, _sel_globallyUniqueString); - return NSString._(_ret, retain: true, release: true); - } - - int operatingSystem() { - return _objc_msgSend_10(this.pointer, _sel_operatingSystem); - } - - NSString operatingSystemName() { - final _ret = _objc_msgSend_21(this.pointer, _sel_operatingSystemName); - return NSString._(_ret, retain: true, release: true); - } + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer)>(); +late final _sel_orthography = objc.registerName("orthography"); +final _objc_msgSend_494 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_grammarDetails = objc.registerName("grammarDetails"); +late final _sel_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"); - NSString get operatingSystemVersionString { - final _ret = - _objc_msgSend_21(this.pointer, _sel_operatingSystemVersionString); - return NSString._(_ret, retain: true, release: true); - } +class NSRegularExpression extends objc.NSObject { + NSRegularExpression._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - void getOperatingSystemVersion(ffi.Pointer stret) { - objc.useMsgSendVariants - ? _objc_msgSend_940Stret( - stret, this.pointer, _sel_operatingSystemVersion) - : stret.ref = - _objc_msgSend_940(this.pointer, _sel_operatingSystemVersion); - } + /// Constructs a [NSRegularExpression] that points to the same underlying object as [other]. + NSRegularExpression.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - int get processorCount { - return _objc_msgSend_10(this.pointer, _sel_processorCount); - } + /// 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); - int get activeProcessorCount { - return _objc_msgSend_10(this.pointer, _sel_activeProcessorCount); + /// Returns whether [obj] is an instance of [NSRegularExpression]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSRegularExpression); } - int get physicalMemory { - return _objc_msgSend_164(this.pointer, _sel_physicalMemory); + static NSRegularExpression? regularExpressionWithPattern_options_error_( + objc.NSString pattern, + int options, + ffi.Pointer> error) { + final _ret = _objc_msgSend_495( + _class_NSRegularExpression, + _sel_regularExpressionWithPattern_options_error_, + pattern.pointer, + options, + error); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - bool isOperatingSystemAtLeastVersion_(NSOperatingSystemVersion version) { - return _objc_msgSend_941( - this.pointer, _sel_isOperatingSystemAtLeastVersion_, version); + NSRegularExpression? initWithPattern_options_error_(objc.NSString pattern, + int options, ffi.Pointer> error) { + final _ret = _objc_msgSend_496(this.pointer, + _sel_initWithPattern_options_error_, pattern.pointer, options, error); + return _ret.address == 0 + ? null + : NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - double get systemUptime { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_systemUptime) - : _objc_msgSend_165(this.pointer, _sel_systemUptime); + objc.NSString get pattern { + final _ret = _objc_msgSend_12(this.pointer, _sel_pattern); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void disableSuddenTermination() { - _objc_msgSend_1(this.pointer, _sel_disableSuddenTermination); + int get options { + return _objc_msgSend_497(this.pointer, _sel_options); } - void enableSuddenTermination() { - _objc_msgSend_1(this.pointer, _sel_enableSuddenTermination); + int get numberOfCaptureGroups { + return _objc_msgSend_29(this.pointer, _sel_numberOfCaptureGroups); } - void disableAutomaticTermination_(NSString reason) { - _objc_msgSend_247( - this.pointer, _sel_disableAutomaticTermination_, reason.pointer); + static objc.NSString escapedPatternForString_(objc.NSString string) { + final _ret = _objc_msgSend_297(_class_NSRegularExpression, + _sel_escapedPatternForString_, string.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void enableAutomaticTermination_(NSString reason) { - _objc_msgSend_247( - this.pointer, _sel_enableAutomaticTermination_, reason.pointer); + void enumerateMatchesInString_options_range_usingBlock_( + objc.NSString string, + int options, + _NSRange range, + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool block) { + _objc_msgSend_498( + this.pointer, + _sel_enumerateMatchesInString_options_range_usingBlock_, + string.pointer, + options, + range, + block.pointer); } - bool get automaticTerminationSupportEnabled { - return _objc_msgSend_12( - this.pointer, _sel_automaticTerminationSupportEnabled); + objc.NSArray matchesInString_options_range_( + objc.NSString string, int options, _NSRange range) { + final _ret = _objc_msgSend_499(this.pointer, + _sel_matchesInString_options_range_, string.pointer, options, range); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set automaticTerminationSupportEnabled(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAutomaticTerminationSupportEnabled_, value); + int numberOfMatchesInString_options_range_( + objc.NSString string, int options, _NSRange range) { + return _objc_msgSend_500( + this.pointer, + _sel_numberOfMatchesInString_options_range_, + string.pointer, + options, + range); } - NSObject beginActivityWithOptions_reason_(int options, NSString reason) { - final _ret = _objc_msgSend_942(this.pointer, - _sel_beginActivityWithOptions_reason_, options, reason.pointer); - return NSObject._(_ret, retain: true, release: true); + NSTextCheckingResult? firstMatchInString_options_range_( + objc.NSString string, int options, _NSRange range) { + final _ret = _objc_msgSend_501(this.pointer, + _sel_firstMatchInString_options_range_, string.pointer, options, range); + return _ret.address == 0 + ? null + : NSTextCheckingResult.castFromPointer(_ret, + retain: true, release: true); } - void endActivity_(NSObject activity) { - _objc_msgSend_15(this.pointer, _sel_endActivity_, activity.pointer); + void rangeOfFirstMatchInString_options_range_(ffi.Pointer<_NSRange> stret, + objc.NSString string, int options, _NSRange range) { + objc.useMsgSendVariants + ? _objc_msgSend_502Stret( + stret, + this.pointer, + _sel_rangeOfFirstMatchInString_options_range_, + string.pointer, + options, + range) + : stret.ref = _objc_msgSend_502( + this.pointer, + _sel_rangeOfFirstMatchInString_options_range_, + string.pointer, + options, + range); } - void performActivityWithOptions_reason_usingBlock_( - int options, NSString reason, ObjCBlock_ffiVoid block) { - _objc_msgSend_943( + objc.NSString stringByReplacingMatchesInString_options_range_withTemplate_( + objc.NSString string, int options, _NSRange range, objc.NSString templ) { + final _ret = _objc_msgSend_503( this.pointer, - _sel_performActivityWithOptions_reason_usingBlock_, + _sel_stringByReplacingMatchesInString_options_range_withTemplate_, + string.pointer, options, - reason.pointer, - block.pointer); + range, + templ.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void performExpiringActivityWithReason_usingBlock_( - NSString reason, ObjCBlock_ffiVoid_bool block) { - _objc_msgSend_944( + int replaceMatchesInString_options_range_withTemplate_( + objc.NSMutableString string, + int options, + _NSRange range, + objc.NSString templ) { + return _objc_msgSend_504( this.pointer, - _sel_performExpiringActivityWithReason_usingBlock_, - reason.pointer, - block.pointer); - } - - NSString get userName { - final _ret = _objc_msgSend_21(this.pointer, _sel_userName); - return NSString._(_ret, retain: true, release: true); - } - - NSString get fullUserName { - final _ret = _objc_msgSend_21(this.pointer, _sel_fullUserName); - return NSString._(_ret, retain: true, release: true); - } - - int get thermalState { - return _objc_msgSend_945(this.pointer, _sel_thermalState); - } - - bool get lowPowerModeEnabled { - return _objc_msgSend_12(this.pointer, _sel_isLowPowerModeEnabled); + _sel_replaceMatchesInString_options_range_withTemplate_, + string.pointer, + options, + range, + templ.pointer); } - bool get macCatalystApp { - return _objc_msgSend_12(this.pointer, _sel_isMacCatalystApp); + objc.NSString replacementStringForResult_inString_offset_template_( + NSTextCheckingResult result, + objc.NSString string, + int offset, + objc.NSString templ) { + final _ret = _objc_msgSend_505( + this.pointer, + _sel_replacementStringForResult_inString_offset_template_, + result.pointer, + string.pointer, + offset, + templ.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - bool get iOSAppOnMac { - return _objc_msgSend_12(this.pointer, _sel_isiOSAppOnMac); + static objc.NSString escapedTemplateForString_(objc.NSString string) { + final _ret = _objc_msgSend_297(_class_NSRegularExpression, + _sel_escapedTemplateForString_, string.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } @override - NSProcessInfo init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSProcessInfo._(_ret, retain: true, release: true); + NSRegularExpression init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSRegularExpression.castFromPointer(_ret, + retain: true, release: true); } - static NSProcessInfo new1() { - final _ret = _objc_msgSend_2(_class_NSProcessInfo, _sel_new); - return NSProcessInfo._(_ret, retain: false, release: true); + static NSRegularExpression new1() { + final _ret = _objc_msgSend_40(_class_NSRegularExpression, _sel_new); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } - static NSProcessInfo allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSRegularExpression allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSProcessInfo, _sel_allocWithZone_, zone); - return NSProcessInfo._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSRegularExpression, _sel_allocWithZone_, zone); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } - static NSProcessInfo alloc() { - final _ret = _objc_msgSend_2(_class_NSProcessInfo, _sel_alloc); - return NSProcessInfo._(_ret, retain: false, release: true); + static NSRegularExpression alloc() { + final _ret = _objc_msgSend_40(_class_NSRegularExpression, _sel_alloc); + return NSRegularExpression.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSProcessInfo, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSRegularExpression, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSProcessInfo, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSRegularExpression, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSProcessInfo, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSRegularExpression, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSProcessInfo, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSRegularExpression, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSProcessInfo, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSRegularExpression, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSProcessInfo, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSRegularExpression, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSProcessInfo, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSRegularExpression, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSProcessInfo, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSRegularExpression, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSProcessInfo, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSRegularExpression, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSProcessInfo = objc.getClass("NSProcessInfo"); -late final _sel_processInfo = objc.registerName("processInfo"); -final _objc_msgSend_939 = objc.msgSendPointer +late final _class_NSRegularExpression = objc.getClass("NSRegularExpression"); + +abstract class NSRegularExpressionOptions { + static const int NSRegularExpressionCaseInsensitive = 1; + static const int NSRegularExpressionAllowCommentsAndWhitespace = 2; + static const int NSRegularExpressionIgnoreMetacharacters = 4; + static const int NSRegularExpressionDotMatchesLineSeparators = 8; + static const int NSRegularExpressionAnchorsMatchLines = 16; + static const int NSRegularExpressionUseUnixLineSeparators = 32; + static const int NSRegularExpressionUseUnicodeWordBoundaries = 64; +} + +late final _sel_regularExpressionWithPattern_options_error_ = + objc.registerName("regularExpressionWithPattern:options:error:"); +final _objc_msgSend_495 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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_496 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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_497 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 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:"); + +abstract class NSMatchingOptions { + static const int NSMatchingReportProgress = 1; + static const int NSMatchingReportCompletion = 2; + static const int NSMatchingAnchored = 4; + static const int NSMatchingWithTransparentBounds = 8; + static const int NSMatchingWithoutAnchoringBounds = 16; +} + +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.Int32 arg1, ffi.Pointer arg2)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( + void Function(ffi.Pointer, int, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ + id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) { + return ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( + pointer, + retain: retain, + release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Int32 arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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?, int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : NSTextCheckingResult.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool.listener( + void Function(NSTextCheckingResult?, int, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : NSTextCheckingResult.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSTextCheckingResult? arg0, int arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Int32 arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2); +} + +abstract class NSMatchingFlags { + static const int NSMatchingProgress = 1; + static const int NSMatchingCompleted = 2; + static const int NSMatchingHitEnd = 4; + static const int NSMatchingRequiredEnd = 8; + static const int NSMatchingInternalError = 16; +} + +late final _sel_enumerateMatchesInString_options_range_usingBlock_ = + objc.registerName("enumerateMatchesInString:options:range:usingBlock:"); +final _objc_msgSend_498 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _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_499 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _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_500 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _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_501 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _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_502 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +final _objc_msgSend_502Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _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_503 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _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_504 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _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_505 = 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_506 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -46736,1049 +23270,917 @@ final _objc_msgSend_939 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_environment = objc.registerName("environment"); -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_940 = objc.msgSendPointer +late final _sel_phoneNumber = objc.registerName("phoneNumber"); +late final _sel_numberOfRanges = objc.registerName("numberOfRanges"); +late final _sel_rangeAtIndex_ = objc.registerName("rangeAtIndex:"); +final _objc_msgSend_507 = objc.msgSendPointer .cast< ffi.NativeFunction< - NSOperatingSystemVersion Function(ffi.Pointer, - ffi.Pointer)>>() + _NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() .asFunction< - NSOperatingSystemVersion Function( - ffi.Pointer, ffi.Pointer)>(); -final _objc_msgSend_940Stret = objc.msgSendStretPointer + _NSRange Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_507Stret = objc.msgSendStretPointer .cast< ffi.NativeFunction< ffi.Void Function( - ffi.Pointer, + ffi.Pointer<_NSRange>, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + ffi.UnsignedLong)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_processorCount = objc.registerName("processorCount"); -late final _sel_activeProcessorCount = - objc.registerName("activeProcessorCount"); -late final _sel_physicalMemory = objc.registerName("physicalMemory"); -late final _sel_isOperatingSystemAtLeastVersion_ = - objc.registerName("isOperatingSystemAtLeastVersion:"); -final _objc_msgSend_941 = objc.msgSendPointer + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_rangeWithName_ = objc.registerName("rangeWithName:"); +final _objc_msgSend_508 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function(ffi.Pointer, - ffi.Pointer, NSOperatingSystemVersion)>>() + _NSRange 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:"); - -abstract class NSActivityOptions { - static const int NSActivityIdleDisplaySleepDisabled = 1099511627776; - static const int NSActivityIdleSystemSleepDisabled = 1048576; - static const int NSActivitySuddenTerminationDisabled = 16384; - static const int NSActivityAutomaticTerminationDisabled = 32768; - static const int NSActivityAnimationTrackingEnabled = 35184372088832; - static const int NSActivityTrackingEnabled = 70368744177664; - static const int NSActivityUserInitiated = 16777215; - static const int NSActivityUserInitiatedAllowingIdleSystemSleep = 15728639; - static const int NSActivityBackground = 255; - static const int NSActivityLatencyCritical = 1095216660480; - static const int NSActivityUserInteractive = 1095233437695; -} - -late final _sel_beginActivityWithOptions_reason_ = - objc.registerName("beginActivityWithOptions:reason:"); -final _objc_msgSend_942 = objc.msgSendPointer + _NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_508Stret = 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_509 = 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_510 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, + _NSRange, ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - int, + _NSRange, ffi.Pointer)>(); -late final _sel_endActivity_ = objc.registerName("endActivity:"); -late final _sel_performActivityWithOptions_reason_usingBlock_ = - objc.registerName("performActivityWithOptions:reason:usingBlock:"); -final _objc_msgSend_943 = objc.msgSendPointer +late final _sel_spellCheckingResultWithRange_ = + objc.registerName("spellCheckingResultWithRange:"); +final _objc_msgSend_511 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + 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_512 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Int32, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_dateCheckingResultWithRange_date_ = + objc.registerName("dateCheckingResultWithRange:date:"); +final _objc_msgSend_513 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - int, + _NSRange, + ffi.Pointer)>(); +late final _sel_dateCheckingResultWithRange_date_timeZone_duration_ = + objc.registerName("dateCheckingResultWithRange:date:timeZone:duration:"); +final _objc_msgSend_514 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer, + ffi.Double)>>() + .asFunction< + ffi.Pointer Function( ffi.Pointer, - ffi.Pointer)>(); -void _ObjCBlock_ffiVoid_bool_fnPtrTrampoline( - ffi.Pointer block, bool arg0) => - block.ref.target - .cast>() - .asFunction()(arg0); -final _ObjCBlock_ffiVoid_bool_closureRegistry = {}; -int _ObjCBlock_ffiVoid_bool_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_bool_registerClosure( - void Function(bool) fn) { - final id = ++_ObjCBlock_ffiVoid_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_bool_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_bool_closureTrampoline( - ffi.Pointer block, bool arg0) => - _ObjCBlock_ffiVoid_bool_closureRegistry[block.ref.target.address]!(arg0); - -class ObjCBlock_ffiVoid_bool extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_bool._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_bool castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_bool._(pointer, retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_bool.fromFunctionPointer( - ffi.Pointer> ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Bool)>(_ObjCBlock_ffiVoid_bool_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_bool.fromFunction(void Function(bool) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Bool)>(_ObjCBlock_ffiVoid_bool_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_bool_registerClosure((bool arg0) => fn(arg0)))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_bool.listener(void Function(bool) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Bool)>.listener( - _ObjCBlock_ffiVoid_bool_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_bool_registerClosure((bool arg0) => fn(arg0)))); - static ffi - .NativeCallable, ffi.Bool)>? - _dartFuncListenerTrampoline; - - void call(bool arg0) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, ffi.Bool arg0)>>() - .asFunction, bool)>()( - pointer, arg0); -} - -late final _sel_performExpiringActivityWithReason_usingBlock_ = - objc.registerName("performExpiringActivityWithReason:usingBlock:"); -final _objc_msgSend_944 = objc.msgSendPointer + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer, + double)>(); +late final _sel_addressCheckingResultWithRange_components_ = + objc.registerName("addressCheckingResultWithRange:components:"); +final _objc_msgSend_515 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_linkCheckingResultWithRange_URL_ = + objc.registerName("linkCheckingResultWithRange:URL:"); +final _objc_msgSend_516 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_quoteCheckingResultWithRange_replacementString_ = + objc.registerName("quoteCheckingResultWithRange:replacementString:"); +final _objc_msgSend_517 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( ffi.Pointer, - ffi.Pointer)>(); -late final _sel_userName = objc.registerName("userName"); -late final _sel_fullUserName = objc.registerName("fullUserName"); - -abstract class NSProcessInfoThermalState { - static const int NSProcessInfoThermalStateNominal = 0; - static const int NSProcessInfoThermalStateFair = 1; - static const int NSProcessInfoThermalStateSerious = 2; - static const int NSProcessInfoThermalStateCritical = 3; -} - -late final _sel_thermalState = objc.registerName("thermalState"); -final _objc_msgSend_945 = objc.msgSendPointer + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_dashCheckingResultWithRange_replacementString_ = + objc.registerName("dashCheckingResultWithRange:replacementString:"); +late final _sel_replacementCheckingResultWithRange_replacementString_ = + objc.registerName("replacementCheckingResultWithRange:replacementString:"); +late final _sel_correctionCheckingResultWithRange_replacementString_ = + objc.registerName("correctionCheckingResultWithRange:replacementString:"); +late final _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_ = + objc.registerName( + "correctionCheckingResultWithRange:replacementString:alternativeStrings:"); +final _objc_msgSend_518 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + 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"); + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_ = + objc.registerName( + "regularExpressionCheckingResultWithRanges:count:regularExpression:"); +final _objc_msgSend_519 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_NSRange>, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<_NSRange>, + int, + ffi.Pointer)>(); +late final _sel_phoneNumberCheckingResultWithRange_phoneNumber_ = + objc.registerName("phoneNumberCheckingResultWithRange:phoneNumber:"); +late final _sel_transitInformationCheckingResultWithRange_components_ = + objc.registerName("transitInformationCheckingResultWithRange:components:"); -class NSTextCheckingResult extends NSObject { - NSTextCheckingResult._(ffi.Pointer pointer, +class NSURLCache extends objc.NSObject { + NSURLCache._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSTextCheckingResult] that points to the same underlying object as [other]. - static NSTextCheckingResult castFrom(T other) { - return NSTextCheckingResult._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSTextCheckingResult] that wraps the given raw object pointer. - static NSTextCheckingResult castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSTextCheckingResult._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSTextCheckingResult]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSTextCheckingResult); - } - - int get resultType { - return _objc_msgSend_946(this.pointer, _sel_resultType); - } - - void getRange(ffi.Pointer<_NSRange> stret) { - objc.useMsgSendVariants - ? _objc_msgSend_54Stret(stret, this.pointer, _sel_range) - : stret.ref = _objc_msgSend_54(this.pointer, _sel_range); - } - - NSOrthography? get orthography { - final _ret = _objc_msgSend_947(this.pointer, _sel_orthography); - return _ret.address == 0 - ? null - : NSOrthography._(_ret, retain: true, release: true); - } - - NSArray? get grammarDetails { - final _ret = _objc_msgSend_84(this.pointer, _sel_grammarDetails); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSDate? get date { - final _ret = _objc_msgSend_183(this.pointer, _sel_date); - return _ret.address == 0 - ? null - : NSDate._(_ret, retain: true, release: true); - } + : super.castFromPointer(pointer, retain: retain, release: release); - NSTimeZone? get timeZone { - final _ret = _objc_msgSend_773(this.pointer, _sel_timeZone); - return _ret.address == 0 - ? null - : NSTimeZone._(_ret, retain: true, release: true); - } - - double get duration { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_duration) - : _objc_msgSend_165(this.pointer, _sel_duration); - } - - NSDictionary? get components { - final _ret = _objc_msgSend_390(this.pointer, _sel_components); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSURL? get URL { - final _ret = _objc_msgSend_45(this.pointer, _sel_URL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } + /// Constructs a [NSURLCache] that points to the same underlying object as [other]. + NSURLCache.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSString? get replacementString { - final _ret = _objc_msgSend_44(this.pointer, _sel_replacementString); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSArray? get alternativeStrings { - final _ret = _objc_msgSend_84(this.pointer, _sel_alternativeStrings); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - NSRegularExpression? get regularExpression { - final _ret = _objc_msgSend_959(this.pointer, _sel_regularExpression); - return _ret.address == 0 - ? null - : NSRegularExpression._(_ret, 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); - NSString? get phoneNumber { - final _ret = _objc_msgSend_44(this.pointer, _sel_phoneNumber); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + /// Returns whether [obj] is an instance of [NSURLCache]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSURLCache); } - int get numberOfRanges { - return _objc_msgSend_10(this.pointer, _sel_numberOfRanges); + static NSURLCache getSharedURLCache() { + final _ret = _objc_msgSend_520(_class_NSURLCache, _sel_sharedURLCache); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - void rangeAtIndex_(ffi.Pointer<_NSRange> stret, int idx) { - objc.useMsgSendVariants - ? _objc_msgSend_347Stret(stret, this.pointer, _sel_rangeAtIndex_, idx) - : stret.ref = _objc_msgSend_347(this.pointer, _sel_rangeAtIndex_, idx); + static void setSharedURLCache(NSURLCache value) { + return _objc_msgSend_521( + _class_NSURLCache, _sel_setSharedURLCache_, value.pointer); } - void rangeWithName_(ffi.Pointer<_NSRange> stret, NSString name) { - objc.useMsgSendVariants - ? _objc_msgSend_340Stret( - stret, this.pointer, _sel_rangeWithName_, name.pointer) - : stret.ref = - _objc_msgSend_340(this.pointer, _sel_rangeWithName_, name.pointer); + NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( + int memoryCapacity, int diskCapacity, objc.NSString? path) { + final _ret = _objc_msgSend_522( + this.pointer, + _sel_initWithMemoryCapacity_diskCapacity_diskPath_, + memoryCapacity, + diskCapacity, + path?.pointer ?? ffi.nullptr); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - NSTextCheckingResult resultByAdjustingRangesWithOffset_(int offset) { - final _ret = _objc_msgSend_960( - this.pointer, _sel_resultByAdjustingRangesWithOffset_, offset); - return NSTextCheckingResult._(_ret, retain: true, release: true); + NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( + int memoryCapacity, int diskCapacity, objc.NSURL? directoryURL) { + final _ret = _objc_msgSend_523( + this.pointer, + _sel_initWithMemoryCapacity_diskCapacity_directoryURL_, + memoryCapacity, + diskCapacity, + directoryURL?.pointer ?? ffi.nullptr); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? get addressComponents { - final _ret = _objc_msgSend_390(this.pointer, _sel_addressComponents); + NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_528( + this.pointer, _sel_cachedResponseForRequest_, request.pointer); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - static NSTextCheckingResult orthographyCheckingResultWithRange_orthography_( - _NSRange range, NSOrthography orthography) { - final _ret = _objc_msgSend_961( - _class_NSTextCheckingResult, - _sel_orthographyCheckingResultWithRange_orthography_, - range, - orthography.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); - } - - static NSTextCheckingResult spellCheckingResultWithRange_(_NSRange range) { - final _ret = _objc_msgSend_962( - _class_NSTextCheckingResult, _sel_spellCheckingResultWithRange_, range); - return NSTextCheckingResult._(_ret, retain: true, release: true); + : NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - static NSTextCheckingResult grammarCheckingResultWithRange_details_( - _NSRange range, NSArray details) { - final _ret = _objc_msgSend_963(_class_NSTextCheckingResult, - _sel_grammarCheckingResultWithRange_details_, range, details.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + void storeCachedResponse_forRequest_( + NSCachedURLResponse cachedResponse, NSURLRequest request) { + _objc_msgSend_529(this.pointer, _sel_storeCachedResponse_forRequest_, + cachedResponse.pointer, request.pointer); } - static NSTextCheckingResult dateCheckingResultWithRange_date_( - _NSRange range, NSDate date) { - final _ret = _objc_msgSend_964(_class_NSTextCheckingResult, - _sel_dateCheckingResultWithRange_date_, range, date.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + void removeCachedResponseForRequest_(NSURLRequest request) { + _objc_msgSend_530( + this.pointer, _sel_removeCachedResponseForRequest_, request.pointer); } - static NSTextCheckingResult - dateCheckingResultWithRange_date_timeZone_duration_( - _NSRange range, NSDate date, NSTimeZone timeZone, double duration) { - final _ret = _objc_msgSend_965( - _class_NSTextCheckingResult, - _sel_dateCheckingResultWithRange_date_timeZone_duration_, - range, - date.pointer, - timeZone.pointer, - duration); - return NSTextCheckingResult._(_ret, retain: true, release: true); + void removeAllCachedResponses() { + _objc_msgSend_82(this.pointer, _sel_removeAllCachedResponses); } - static NSTextCheckingResult addressCheckingResultWithRange_components_( - _NSRange range, NSDictionary components) { - final _ret = _objc_msgSend_966( - _class_NSTextCheckingResult, - _sel_addressCheckingResultWithRange_components_, - range, - components.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + void removeCachedResponsesSinceDate_(objc.NSDate date) { + _objc_msgSend_246( + this.pointer, _sel_removeCachedResponsesSinceDate_, date.pointer); } - static NSTextCheckingResult linkCheckingResultWithRange_URL_( - _NSRange range, NSURL url) { - final _ret = _objc_msgSend_967(_class_NSTextCheckingResult, - _sel_linkCheckingResultWithRange_URL_, range, url.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + int get memoryCapacity { + return _objc_msgSend_29(this.pointer, _sel_memoryCapacity); } - static NSTextCheckingResult quoteCheckingResultWithRange_replacementString_( - _NSRange range, NSString replacementString) { - final _ret = _objc_msgSend_968( - _class_NSTextCheckingResult, - _sel_quoteCheckingResultWithRange_replacementString_, - range, - replacementString.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + set memoryCapacity(int value) { + return _objc_msgSend_125(this.pointer, _sel_setMemoryCapacity_, value); } - static NSTextCheckingResult dashCheckingResultWithRange_replacementString_( - _NSRange range, NSString replacementString) { - final _ret = _objc_msgSend_968( - _class_NSTextCheckingResult, - _sel_dashCheckingResultWithRange_replacementString_, - range, - replacementString.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + int get diskCapacity { + return _objc_msgSend_29(this.pointer, _sel_diskCapacity); } - static NSTextCheckingResult - replacementCheckingResultWithRange_replacementString_( - _NSRange range, NSString replacementString) { - final _ret = _objc_msgSend_968( - _class_NSTextCheckingResult, - _sel_replacementCheckingResultWithRange_replacementString_, - range, - replacementString.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + set diskCapacity(int value) { + return _objc_msgSend_125(this.pointer, _sel_setDiskCapacity_, value); } - static NSTextCheckingResult - correctionCheckingResultWithRange_replacementString_( - _NSRange range, NSString replacementString) { - final _ret = _objc_msgSend_968( - _class_NSTextCheckingResult, - _sel_correctionCheckingResultWithRange_replacementString_, - range, - replacementString.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + int get currentMemoryUsage { + return _objc_msgSend_29(this.pointer, _sel_currentMemoryUsage); } - static NSTextCheckingResult - correctionCheckingResultWithRange_replacementString_alternativeStrings_( - _NSRange range, - NSString replacementString, - NSArray alternativeStrings) { - final _ret = _objc_msgSend_969( - _class_NSTextCheckingResult, - _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_, - range, - replacementString.pointer, - alternativeStrings.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + int get currentDiskUsage { + return _objc_msgSend_29(this.pointer, _sel_currentDiskUsage); } - static NSTextCheckingResult - regularExpressionCheckingResultWithRanges_count_regularExpression_( - ffi.Pointer<_NSRange> ranges, - int count, - NSRegularExpression regularExpression) { - final _ret = _objc_msgSend_970( - _class_NSTextCheckingResult, - _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_, - ranges, - count, - regularExpression.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + void storeCachedResponse_forDataTask_( + NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { + _objc_msgSend_531(this.pointer, _sel_storeCachedResponse_forDataTask_, + cachedResponse.pointer, dataTask.pointer); } - static NSTextCheckingResult phoneNumberCheckingResultWithRange_phoneNumber_( - _NSRange range, NSString phoneNumber) { - final _ret = _objc_msgSend_968( - _class_NSTextCheckingResult, - _sel_phoneNumberCheckingResultWithRange_phoneNumber_, - range, - phoneNumber.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + void getCachedResponseForDataTask_completionHandler_( + NSURLSessionDataTask dataTask, + ObjCBlock_ffiVoid_NSCachedURLResponse completionHandler) { + _objc_msgSend_532( + this.pointer, + _sel_getCachedResponseForDataTask_completionHandler_, + dataTask.pointer, + completionHandler.pointer); } - static NSTextCheckingResult - transitInformationCheckingResultWithRange_components_( - _NSRange range, NSDictionary components) { - final _ret = _objc_msgSend_966( - _class_NSTextCheckingResult, - _sel_transitInformationCheckingResultWithRange_components_, - range, - components.pointer); - return NSTextCheckingResult._(_ret, retain: true, release: true); + void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { + _objc_msgSend_533( + this.pointer, _sel_removeCachedResponseForDataTask_, dataTask.pointer); } @override - NSTextCheckingResult init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSTextCheckingResult._(_ret, retain: true, release: true); + NSURLCache init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLCache.castFromPointer(_ret, retain: true, release: true); } - static NSTextCheckingResult new1() { - final _ret = _objc_msgSend_2(_class_NSTextCheckingResult, _sel_new); - return NSTextCheckingResult._(_ret, retain: false, release: true); + static NSURLCache new1() { + final _ret = _objc_msgSend_40(_class_NSURLCache, _sel_new); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } - static NSTextCheckingResult allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSTextCheckingResult, _sel_allocWithZone_, zone); - return NSTextCheckingResult._(_ret, retain: false, release: true); + static NSURLCache allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSURLCache, _sel_allocWithZone_, zone); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } - static NSTextCheckingResult alloc() { - final _ret = _objc_msgSend_2(_class_NSTextCheckingResult, _sel_alloc); - return NSTextCheckingResult._(_ret, retain: false, release: true); + static NSURLCache alloc() { + final _ret = _objc_msgSend_40(_class_NSURLCache, _sel_alloc); + return NSURLCache.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSTextCheckingResult, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLCache, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSTextCheckingResult, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLCache, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSTextCheckingResult, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLCache, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSTextCheckingResult, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSURLCache, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSTextCheckingResult, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLCache, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSTextCheckingResult, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLCache, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSTextCheckingResult, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLCache, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSTextCheckingResult, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSURLCache, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSTextCheckingResult, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLCache, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSTextCheckingResult = objc.getClass("NSTextCheckingResult"); - -abstract class NSTextCheckingType { - static const int NSTextCheckingTypeOrthography = 1; - static const int NSTextCheckingTypeSpelling = 2; - static const int NSTextCheckingTypeGrammar = 4; - static const int NSTextCheckingTypeDate = 8; - static const int NSTextCheckingTypeAddress = 16; - static const int NSTextCheckingTypeLink = 32; - static const int NSTextCheckingTypeQuote = 64; - static const int NSTextCheckingTypeDash = 128; - static const int NSTextCheckingTypeReplacement = 256; - static const int NSTextCheckingTypeCorrection = 512; - static const int NSTextCheckingTypeRegularExpression = 1024; - static const int NSTextCheckingTypePhoneNumber = 2048; - static const int NSTextCheckingTypeTransitInformation = 4096; -} - -late final _sel_resultType = objc.registerName("resultType"); -final _objc_msgSend_946 = objc.msgSendPointer +late final _class_NSURLCache = objc.getClass("NSURLCache"); +late final _sel_sharedURLCache = objc.registerName("sharedURLCache"); +final _objc_msgSend_520 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_range = objc.registerName("range"); -late final _sel_orthography = objc.registerName("orthography"); -final _objc_msgSend_947 = objc.msgSendPointer +late final _sel_setSharedURLCache_ = objc.registerName("setSharedURLCache:"); +final _objc_msgSend_521 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + 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"); + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithMemoryCapacity_diskCapacity_diskPath_ = + objc.registerName("initWithMemoryCapacity:diskCapacity:diskPath:"); +final _objc_msgSend_522 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_ = + objc.registerName("initWithMemoryCapacity:diskCapacity:directoryURL:"); +final _objc_msgSend_523 = 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)>(); -class NSRegularExpression extends NSObject { - NSRegularExpression._(ffi.Pointer pointer, +class NSCachedURLResponse extends objc.NSObject { + NSCachedURLResponse._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSRegularExpression] that points to the same underlying object as [other]. - static NSRegularExpression castFrom(T other) { - return NSRegularExpression._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSCachedURLResponse] that points to the same underlying object as [other]. + NSCachedURLResponse.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSRegularExpression] that wraps the given raw object pointer. - static NSRegularExpression castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSRegularExpression._(other, retain: retain, release: release); - } + /// Constructs a [NSCachedURLResponse] that wraps the given raw object pointer. + NSCachedURLResponse.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSRegularExpression]. + /// Returns whether [obj] is an instance of [NSCachedURLResponse]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSRegularExpression); + obj.pointer, _sel_isKindOfClass_, _class_NSCachedURLResponse); } - static NSRegularExpression? regularExpressionWithPattern_options_error_( - NSString pattern, - int options, - ffi.Pointer> error) { - final _ret = _objc_msgSend_948( - _class_NSRegularExpression, - _sel_regularExpressionWithPattern_options_error_, - pattern.pointer, - options, - error); - return _ret.address == 0 - ? null - : NSRegularExpression._(_ret, retain: true, release: true); + NSCachedURLResponse initWithResponse_data_( + NSURLResponse response, objc.NSData data) { + final _ret = _objc_msgSend_524(this.pointer, _sel_initWithResponse_data_, + response.pointer, data.pointer); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - NSRegularExpression? initWithPattern_options_error_(NSString pattern, - int options, ffi.Pointer> error) { - final _ret = _objc_msgSend_949(this.pointer, - _sel_initWithPattern_options_error_, pattern.pointer, options, error); + NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( + NSURLResponse response, + objc.NSData data, + objc.NSDictionary? userInfo, + int storagePolicy) { + final _ret = _objc_msgSend_525( + this.pointer, + _sel_initWithResponse_data_userInfo_storagePolicy_, + response.pointer, + data.pointer, + userInfo?.pointer ?? ffi.nullptr, + storagePolicy); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLResponse get response { + final _ret = _objc_msgSend_526(this.pointer, _sel_response); + return NSURLResponse.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSData get data { + final _ret = _objc_msgSend_104(this.pointer, _sel_data); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSDictionary? get userInfo { + final _ret = _objc_msgSend_65(this.pointer, _sel_userInfo); return _ret.address == 0 ? null - : NSRegularExpression._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSString get pattern { - final _ret = _objc_msgSend_21(this.pointer, _sel_pattern); - return NSString._(_ret, retain: true, release: true); + int get storagePolicy { + return _objc_msgSend_527(this.pointer, _sel_storagePolicy); } - int get options { - return _objc_msgSend_950(this.pointer, _sel_options); + @override + NSCachedURLResponse init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - int get numberOfCaptureGroups { - return _objc_msgSend_10(this.pointer, _sel_numberOfCaptureGroups); + static NSCachedURLResponse new1() { + final _ret = _objc_msgSend_40(_class_NSCachedURLResponse, _sel_new); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } - static NSString escapedPatternForString_(NSString string) { - final _ret = _objc_msgSend_69(_class_NSRegularExpression, - _sel_escapedPatternForString_, string.pointer); - return NSString._(_ret, retain: true, release: true); + static NSCachedURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSCachedURLResponse, _sel_allocWithZone_, zone); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } - void enumerateMatchesInString_options_range_usingBlock_( - NSString string, - int options, - _NSRange range, - ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool block) { - _objc_msgSend_951( - this.pointer, - _sel_enumerateMatchesInString_options_range_usingBlock_, - string.pointer, - options, - range, - block.pointer); + static NSCachedURLResponse alloc() { + final _ret = _objc_msgSend_40(_class_NSCachedURLResponse, _sel_alloc); + return NSCachedURLResponse.castFromPointer(_ret, + retain: false, release: true); } - NSArray matchesInString_options_range_( - NSString string, int options, _NSRange range) { - final _ret = _objc_msgSend_952(this.pointer, - _sel_matchesInString_options_range_, string.pointer, options, range); - return NSArray._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSCachedURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - int numberOfMatchesInString_options_range_( - NSString string, int options, _NSRange range) { - return _objc_msgSend_953( - this.pointer, - _sel_numberOfMatchesInString_options_range_, - string.pointer, - options, - range); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSCachedURLResponse, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSTextCheckingResult? firstMatchInString_options_range_( - NSString string, int options, _NSRange range) { - final _ret = _objc_msgSend_954(this.pointer, - _sel_firstMatchInString_options_range_, string.pointer, options, range); - return _ret.address == 0 - ? null - : NSTextCheckingResult._(_ret, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSCachedURLResponse, _sel_accessInstanceVariablesDirectly); } - void rangeOfFirstMatchInString_options_range_(ffi.Pointer<_NSRange> stret, - NSString string, int options, _NSRange range) { - objc.useMsgSendVariants - ? _objc_msgSend_955Stret( - stret, - this.pointer, - _sel_rangeOfFirstMatchInString_options_range_, - string.pointer, - options, - range) - : stret.ref = _objc_msgSend_955( - this.pointer, - _sel_rangeOfFirstMatchInString_options_range_, - string.pointer, - options, - range); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSCachedURLResponse, _sel_useStoredAccessor); } - NSString stringByReplacingMatchesInString_options_range_withTemplate_( - NSString string, int options, _NSRange range, NSString templ) { - final _ret = _objc_msgSend_956( - this.pointer, - _sel_stringByReplacingMatchesInString_options_range_withTemplate_, - string.pointer, - options, - range, - templ.pointer); - return NSString._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSCachedURLResponse, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - int replaceMatchesInString_options_range_withTemplate_( - NSMutableString string, int options, _NSRange range, NSString templ) { - return _objc_msgSend_957( - this.pointer, - _sel_replaceMatchesInString_options_range_withTemplate_, - string.pointer, - options, - range, - templ.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSCachedURLResponse, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSString replacementStringForResult_inString_offset_template_( - NSTextCheckingResult result, - NSString string, - int offset, - NSString templ) { - final _ret = _objc_msgSend_958( - this.pointer, - _sel_replacementStringForResult_inString_offset_template_, - result.pointer, - string.pointer, - offset, - templ.pointer); - return NSString._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSCachedURLResponse, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSString escapedTemplateForString_(NSString string) { - final _ret = _objc_msgSend_69(_class_NSRegularExpression, - _sel_escapedTemplateForString_, string.pointer); - return NSString._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSCachedURLResponse, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSCachedURLResponse, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSCachedURLResponse = objc.getClass("NSCachedURLResponse"); +late final _sel_initWithResponse_data_ = + objc.registerName("initWithResponse:data:"); +final _objc_msgSend_524 = 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)>(); + +abstract class NSURLCacheStoragePolicy { + static const int NSURLCacheStorageAllowed = 0; + static const int NSURLCacheStorageAllowedInMemoryOnly = 1; + static const int NSURLCacheStorageNotAllowed = 2; +} + +late final _sel_initWithResponse_data_userInfo_storagePolicy_ = + objc.registerName("initWithResponse:data:userInfo:storagePolicy:"); +final _objc_msgSend_525 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +final _objc_msgSend_526 = 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_527 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cachedResponseForRequest_ = + objc.registerName("cachedResponseForRequest:"); +final _objc_msgSend_528 = 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_529 = 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_530 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_removeAllCachedResponses = + objc.registerName("removeAllCachedResponses"); +late final _sel_removeCachedResponsesSinceDate_ = + objc.registerName("removeCachedResponsesSinceDate:"); +late final _sel_memoryCapacity = objc.registerName("memoryCapacity"); +late final _sel_setMemoryCapacity_ = objc.registerName("setMemoryCapacity:"); +late final _sel_diskCapacity = objc.registerName("diskCapacity"); +late final _sel_setDiskCapacity_ = objc.registerName("setDiskCapacity:"); +late final _sel_currentMemoryUsage = objc.registerName("currentMemoryUsage"); +late final _sel_currentDiskUsage = objc.registerName("currentDiskUsage"); + +class NSURLSessionDataTask extends NSURLSessionTask { + NSURLSessionDataTask._(ffi.Pointer pointer, + {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.pointer, retain: true, release: true); + + /// Constructs a [NSURLSessionDataTask] that wraps the given raw object pointer. + NSURLSessionDataTask.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionDataTask); } @override - NSRegularExpression init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSRegularExpression._(_ret, retain: true, release: true); + NSURLSessionDataTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - static NSRegularExpression new1() { - final _ret = _objc_msgSend_2(_class_NSRegularExpression, _sel_new); - return NSRegularExpression._(_ret, retain: false, release: true); + static NSURLSessionDataTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDataTask, _sel_new); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } - static NSRegularExpression allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSRegularExpression, _sel_allocWithZone_, zone); - return NSRegularExpression._(_ret, retain: false, release: true); + static NSURLSessionDataTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionDataTask, _sel_allocWithZone_, zone); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } - static NSRegularExpression alloc() { - final _ret = _objc_msgSend_2(_class_NSRegularExpression, _sel_alloc); - return NSRegularExpression._(_ret, retain: false, release: true); + static NSURLSessionDataTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDataTask, _sel_alloc); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSRegularExpression, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionDataTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSRegularExpression, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionDataTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSRegularExpression, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLSessionDataTask, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSRegularExpression, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSURLSessionDataTask, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSRegularExpression, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionDataTask, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSRegularExpression, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionDataTask, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSRegularExpression, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionDataTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSRegularExpression, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionDataTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSRegularExpression, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionDataTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSRegularExpression = objc.getClass("NSRegularExpression"); - -abstract class NSRegularExpressionOptions { - static const int NSRegularExpressionCaseInsensitive = 1; - static const int NSRegularExpressionAllowCommentsAndWhitespace = 2; - static const int NSRegularExpressionIgnoreMetacharacters = 4; - static const int NSRegularExpressionDotMatchesLineSeparators = 8; - static const int NSRegularExpressionAnchorsMatchLines = 16; - static const int NSRegularExpressionUseUnixLineSeparators = 32; - static const int NSRegularExpressionUseUnicodeWordBoundaries = 64; -} - -late final _sel_regularExpressionWithPattern_options_error_ = - objc.registerName("regularExpressionWithPattern:options:error:"); -final _objc_msgSend_948 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_949 = objc.msgSendPointer +late final _class_NSURLSessionDataTask = objc.getClass("NSURLSessionDataTask"); +late final _sel_storeCachedResponse_forDataTask_ = + objc.registerName("storeCachedResponse:forDataTask:"); +final _objc_msgSend_531 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() + ffi.Pointer)>>() .asFunction< - instancetype Function( + void 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_950 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 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:"); - -abstract class NSMatchingOptions { - static const int NSMatchingReportProgress = 1; - static const int NSMatchingReportCompletion = 2; - static const int NSMatchingAnchored = 4; - static const int NSMatchingWithTransparentBounds = 8; - static const int NSMatchingWithoutAnchoringBounds = 16; -} - -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.Int32 arg1, ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, int, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry = - , int, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( - void Function(ffi.Pointer, int, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ - id] = fn; + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - int arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[ + block.ref.target.address]!(arg0); -class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool - extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) +class ObjCBlock_ffiVoid_NSCachedURLResponse extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSCachedURLResponse._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool - castFromPointer(ffi.Pointer pointer, - {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool._( - pointer, - retain: retain, - release: release); + static ObjCBlock_ffiVoid_NSCachedURLResponse castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSCachedURLResponse._(pointer, + retain: retain, release: release); } /// Creates a block from a C function pointer. @@ -47786,20 +24188,16 @@ class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool /// This block must be invoked by native 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( + ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Int32 arg1, ffi.Pointer arg2)>> + ffi.Void Function(ffi.Pointer arg0)>> ptr) : this._(objc.newBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_fnPtrTrampoline) + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; @@ -47809,21 +24207,18 @@ class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool /// This block must be invoked by native 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?, int, ffi.Pointer) fn) + ObjCBlock_ffiVoid_NSCachedURLResponse.fromFunction( + void Function(NSCachedURLResponse?) fn) : this._(objc.newBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) .cast(), - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( - (ffi.Pointer arg0, int arg1, - ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSTextCheckingResult._(arg0, retain: true, release: true), arg1, arg2)))); + _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -47835,230 +24230,316 @@ class ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool /// /// 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?, int, ffi.Pointer) fn) + ObjCBlock_ffiVoid_NSCachedURLResponse.listener(void Function(NSCachedURLResponse?) fn) : this._(objc.newBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_closureTrampoline) + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), - _ObjCBlock_ffiVoid_NSTextCheckingResult_NSMatchingFlags_bool_registerClosure( - (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => - fn(arg0.address == 0 ? null : NSTextCheckingResult._(arg0, retain: true, release: true), arg1, arg2)))); + _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : NSCachedURLResponse.castFromPointer(arg0, retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer)>? _dartFuncListenerTrampoline; - - void call(NSTextCheckingResult? arg0, int arg1, ffi.Pointer arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Int32 arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2); -} + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; -abstract class NSMatchingFlags { - static const int NSMatchingProgress = 1; - static const int NSMatchingCompleted = 2; - static const int NSMatchingHitEnd = 4; - static const int NSMatchingRequiredEnd = 8; - static const int NSMatchingInternalError = 16; + void call(NSCachedURLResponse? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); } -late final _sel_enumerateMatchesInString_options_range_usingBlock_ = - objc.registerName("enumerateMatchesInString:options:range:usingBlock:"); -final _objc_msgSend_951 = objc.msgSendPointer +late final _sel_getCachedResponseForDataTask_completionHandler_ = + objc.registerName("getCachedResponseForDataTask:completionHandler:"); +final _objc_msgSend_532 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - _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_952 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _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_953 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.UnsignedLong Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _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_954 = objc.msgSendPointer +late final _sel_removeCachedResponseForDataTask_ = + objc.registerName("removeCachedResponseForDataTask:"); +final _objc_msgSend_533 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _NSRange)>>() + ffi.Pointer)>>() .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_955 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSURLConnection extends objc.NSObject { + NSURLConnection._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLConnection] that points to the same underlying object as [other]. + NSURLConnection.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLConnection] that wraps the given raw object pointer. + NSURLConnection.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLConnection]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLConnection); + } + + NSURLConnection? initWithRequest_delegate_startImmediately_( + NSURLRequest request, objc.NSObject? delegate, bool startImmediately) { + final _ret = _objc_msgSend_534( + 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); + } + + NSURLConnection? initWithRequest_delegate_( + NSURLRequest request, objc.NSObject? delegate) { + final _ret = _objc_msgSend_535(this.pointer, _sel_initWithRequest_delegate_, + request.pointer, delegate?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURLConnection.castFromPointer(_ret, retain: true, release: true); + } + + static NSURLConnection? connectionWithRequest_delegate_( + NSURLRequest request, objc.NSObject? delegate) { + final _ret = _objc_msgSend_536( + _class_NSURLConnection, + _sel_connectionWithRequest_delegate_, + request.pointer, + delegate?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURLConnection.castFromPointer(_ret, retain: true, release: true); + } + + NSURLRequest get originalRequest { + final _ret = _objc_msgSend_537(this.pointer, _sel_originalRequest); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + NSURLRequest get currentRequest { + final _ret = _objc_msgSend_537(this.pointer, _sel_currentRequest); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + void start() { + _objc_msgSend_82(this.pointer, _sel_start); + } + + void cancel() { + _objc_msgSend_82(this.pointer, _sel_cancel); + } + + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); + } + + void unscheduleFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_unscheduleFromRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); + } + + void setDelegateQueue_(NSOperationQueue? queue) { + _objc_msgSend_538( + this.pointer, _sel_setDelegateQueue_, queue?.pointer ?? ffi.nullptr); + } + + static bool canHandleRequest_(NSURLRequest request) { + return _objc_msgSend_539( + _class_NSURLConnection, _sel_canHandleRequest_, request.pointer); + } + + static objc.NSData? sendSynchronousRequest_returningResponse_error_( + NSURLRequest request, + ffi.Pointer> response, + ffi.Pointer> error) { + final _ret = _objc_msgSend_540( + _class_NSURLConnection, + _sel_sendSynchronousRequest_returningResponse_error_, + request.pointer, + response, + error); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + static void sendAsynchronousRequest_queue_completionHandler_( + NSURLRequest request, + NSOperationQueue queue, + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError handler) { + _objc_msgSend_541( + _class_NSURLConnection, + _sel_sendAsynchronousRequest_queue_completionHandler_, + request.pointer, + queue.pointer, + handler.pointer); + } + + @override + NSURLConnection init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLConnection.castFromPointer(_ret, retain: true, release: true); + } + + static NSURLConnection new1() { + final _ret = _objc_msgSend_40(_class_NSURLConnection, _sel_new); + return NSURLConnection.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLConnection, _sel_allocWithZone_, zone); + return NSURLConnection.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLConnection alloc() { + final _ret = _objc_msgSend_40(_class_NSURLConnection, _sel_alloc); + return NSURLConnection.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLConnection, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLConnection, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLConnection, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLConnection, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLConnection, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLConnection, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLConnection, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLConnection, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLConnection, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_534 = objc.msgSendPointer .cast< ffi.NativeFunction< - _NSRange Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - _NSRange)>>() - .asFunction< - _NSRange Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - _NSRange)>(); -final _objc_msgSend_955Stret = objc.msgSendStretPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer<_NSRange>, - ffi.Pointer, - ffi.Pointer, ffi.Pointer, - ffi.Int32, - _NSRange)>>() + ffi.Bool)>>() .asFunction< - void Function( - ffi.Pointer<_NSRange>, + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int, - _NSRange)>(); -late final _sel_stringByReplacingMatchesInString_options_range_withTemplate_ = - objc.registerName( - "stringByReplacingMatchesInString:options:range:withTemplate:"); -final _objc_msgSend_956 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - _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_957 = objc.msgSendPointer + bool)>(); +late final _sel_initWithRequest_delegate_ = + objc.registerName("initWithRequest:delegate:"); +final _objc_msgSend_535 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.UnsignedLong Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32, - _NSRange, ffi.Pointer)>>() .asFunction< - int Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int, - _NSRange, + ffi.Pointer, ffi.Pointer)>(); -late final _sel_replacementStringForResult_inString_offset_template_ = - objc.registerName("replacementStringForResult:inString:offset:template:"); -final _objc_msgSend_958 = objc.msgSendPointer +late final _sel_connectionWithRequest_delegate_ = + objc.registerName("connectionWithRequest:delegate:"); +final _objc_msgSend_536 = 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_959 = objc.msgSendPointer +final _objc_msgSend_537 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -48066,670 +24547,1071 @@ final _objc_msgSend_959 = objc.msgSendPointer .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:"); -late final _sel_rangeWithName_ = objc.registerName("rangeWithName:"); -late final _sel_resultByAdjustingRangesWithOffset_ = - objc.registerName("resultByAdjustingRangesWithOffset:"); -final _objc_msgSend_960 = 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_961 = objc.msgSendPointer +late final _sel_unscheduleFromRunLoop_forMode_ = + objc.registerName("unscheduleFromRunLoop:forMode:"); +late final _sel_setDelegateQueue_ = objc.registerName("setDelegateQueue:"); +final _objc_msgSend_538 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void 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_962 = 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_963 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_canHandleRequest_ = objc.registerName("canHandleRequest:"); +final _objc_msgSend_539 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_dateCheckingResultWithRange_date_ = - objc.registerName("dateCheckingResultWithRange:date:"); -final _objc_msgSend_964 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sendSynchronousRequest_returningResponse_error_ = + objc.registerName("sendSynchronousRequest:returningResponse:error:"); +final _objc_msgSend_540 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - _NSRange, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_dateCheckingResultWithRange_date_timeZone_duration_ = - objc.registerName("dateCheckingResultWithRange:date:timeZone:duration:"); -final _objc_msgSend_965 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>)>(); +void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunction( + void Function(NSURLResponse?, objc.NSData?, objc.NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 ? null : NSURLResponse.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : objc.NSData.castFromPointer(arg1, retain: true, release: true), + arg2.address == 0 ? null : objc.NSError.castFromPointer(arg2, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.listener( + void Function(NSURLResponse?, objc.NSData?, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( + (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.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURLResponse? arg0, objc.NSData? arg1, objc.NSError? arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, + arg0?.pointer ?? ffi.nullptr, + arg1?.pointer ?? ffi.nullptr, + arg2?.pointer ?? ffi.nullptr); +} + +late final _sel_sendAsynchronousRequest_queue_completionHandler_ = + objc.registerName("sendAsynchronousRequest:queue:completionHandler:"); +final _objc_msgSend_541 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer, ffi.Pointer, - ffi.Double)>>() + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, - _NSRange, ffi.Pointer, ffi.Pointer, - double)>(); -late final _sel_addressCheckingResultWithRange_components_ = - objc.registerName("addressCheckingResultWithRange:components:"); -final _objc_msgSend_966 = objc.msgSendPointer + ffi.Pointer)>(); + +class NSURLCredential extends objc.NSObject { + NSURLCredential._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLCredential] that points to the same underlying object as [other]. + NSURLCredential.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLCredential] that wraps the given raw object pointer. + NSURLCredential.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLCredential]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLCredential); + } + + int get persistence { + return _objc_msgSend_542(this.pointer, _sel_persistence); + } + + NSURLCredential initWithUser_password_persistence_( + objc.NSString user, objc.NSString password, int persistence) { + final _ret = _objc_msgSend_543( + this.pointer, + _sel_initWithUser_password_persistence_, + user.pointer, + password.pointer, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + static NSURLCredential credentialWithUser_password_persistence_( + objc.NSString user, objc.NSString password, int persistence) { + final _ret = _objc_msgSend_544( + _class_NSURLCredential, + _sel_credentialWithUser_password_persistence_, + user.pointer, + password.pointer, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString? get user { + final _ret = _objc_msgSend_13(this.pointer, _sel_user); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString? get password { + final _ret = _objc_msgSend_13(this.pointer, _sel_password); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool get hasPassword { + return _objc_msgSend_7(this.pointer, _sel_hasPassword); + } + + NSURLCredential initWithIdentity_certificates_persistence_( + ffi.Pointer<__SecIdentity> identity, + objc.NSArray? certArray, + int persistence) { + final _ret = _objc_msgSend_545( + this.pointer, + _sel_initWithIdentity_certificates_persistence_, + identity, + certArray?.pointer ?? ffi.nullptr, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + static NSURLCredential credentialWithIdentity_certificates_persistence_( + ffi.Pointer<__SecIdentity> identity, + objc.NSArray? certArray, + int persistence) { + final _ret = _objc_msgSend_546( + _class_NSURLCredential, + _sel_credentialWithIdentity_certificates_persistence_, + identity, + certArray?.pointer ?? ffi.nullptr, + persistence); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + ffi.Pointer<__SecIdentity> get identity { + return _objc_msgSend_547(this.pointer, _sel_identity); + } + + objc.NSArray get certificates { + final _ret = _objc_msgSend_6(this.pointer, _sel_certificates); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSURLCredential initWithTrust_(ffi.Pointer<__SecTrust> trust) { + final _ret = _objc_msgSend_548(this.pointer, _sel_initWithTrust_, trust); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + static NSURLCredential credentialForTrust_(ffi.Pointer<__SecTrust> trust) { + final _ret = _objc_msgSend_549( + _class_NSURLCredential, _sel_credentialForTrust_, trust); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSURLCredential init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLCredential.castFromPointer(_ret, retain: true, release: true); + } + + static NSURLCredential new1() { + final _ret = _objc_msgSend_40(_class_NSURLCredential, _sel_new); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLCredential allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSURLCredential, _sel_allocWithZone_, zone); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLCredential alloc() { + final _ret = _objc_msgSend_40(_class_NSURLCredential, _sel_alloc); + return NSURLCredential.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLCredential, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLCredential, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLCredential, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLCredential, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLCredential, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLCredential, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLCredential, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLCredential, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLCredential, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSURLCredential = objc.getClass("NSURLCredential"); + +abstract class NSURLCredentialPersistence { + static const int NSURLCredentialPersistenceNone = 0; + static const int NSURLCredentialPersistenceForSession = 1; + static const int NSURLCredentialPersistencePermanent = 2; + static const int NSURLCredentialPersistenceSynchronizable = 3; +} + +late final _sel_persistence = objc.registerName("persistence"); +final _objc_msgSend_542 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - _NSRange, - ffi.Pointer)>>() + ffi.Int32 Function(ffi.Pointer, + 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_967 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithUser_password_persistence_ = + objc.registerName("initWithUser:password:persistence:"); +final _objc_msgSend_543 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - _NSRange, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_quoteCheckingResultWithRange_replacementString_ = - objc.registerName("quoteCheckingResultWithRange:replacementString:"); -final _objc_msgSend_968 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_credentialWithUser_password_persistence_ = + objc.registerName("credentialWithUser:password:persistence:"); +final _objc_msgSend_544 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - _NSRange, - ffi.Pointer)>>() + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - _NSRange, - ffi.Pointer)>(); -late final _sel_dashCheckingResultWithRange_replacementString_ = - objc.registerName("dashCheckingResultWithRange:replacementString:"); -late final _sel_replacementCheckingResultWithRange_replacementString_ = - objc.registerName("replacementCheckingResultWithRange:replacementString:"); -late final _sel_correctionCheckingResultWithRange_replacementString_ = - objc.registerName("correctionCheckingResultWithRange:replacementString:"); -late final _sel_correctionCheckingResultWithRange_replacementString_alternativeStrings_ = - objc.registerName( - "correctionCheckingResultWithRange:replacementString:alternativeStrings:"); -final _objc_msgSend_969 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_user = objc.registerName("user"); +late final _sel_password = objc.registerName("password"); +late final _sel_hasPassword = objc.registerName("hasPassword"); + +final class __SecIdentity extends ffi.Opaque {} + +late final _sel_initWithIdentity_certificates_persistence_ = + objc.registerName("initWithIdentity:certificates:persistence:"); +final _objc_msgSend_545 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - _NSRange, + ffi.Pointer<__SecIdentity>, ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - _NSRange, + ffi.Pointer<__SecIdentity>, ffi.Pointer, - ffi.Pointer)>(); -late final _sel_regularExpressionCheckingResultWithRanges_count_regularExpression_ = - objc.registerName( - "regularExpressionCheckingResultWithRanges:count:regularExpression:"); -final _objc_msgSend_970 = objc.msgSendPointer + int)>(); +late final _sel_credentialWithIdentity_certificates_persistence_ = + objc.registerName("credentialWithIdentity:certificates:persistence:"); +final _objc_msgSend_546 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSRange>, - ffi.UnsignedLong, - ffi.Pointer)>>() + ffi.Pointer<__SecIdentity>, + ffi.Pointer, + ffi.Int32)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer<_NSRange>, - int, - ffi.Pointer)>(); -late final _sel_phoneNumberCheckingResultWithRange_phoneNumber_ = - objc.registerName("phoneNumberCheckingResultWithRange:phoneNumber:"); -late final _sel_transitInformationCheckingResultWithRange_components_ = - objc.registerName("transitInformationCheckingResultWithRange:components:"); + ffi.Pointer<__SecIdentity>, + ffi.Pointer, + int)>(); +late final _sel_identity = objc.registerName("identity"); +final _objc_msgSend_547 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer<__SecIdentity> Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer<__SecIdentity> Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_certificates = objc.registerName("certificates"); + +final class __SecTrust extends ffi.Opaque {} + +late final _sel_initWithTrust_ = objc.registerName("initWithTrust:"); +final _objc_msgSend_548 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer<__SecTrust>)>(); +late final _sel_credentialForTrust_ = objc.registerName("credentialForTrust:"); +final _objc_msgSend_549 = 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>)>(); -class NSURLCache extends NSObject { - NSURLCache._(ffi.Pointer pointer, +class NSURLProtectionSpace extends objc.NSObject { + NSURLProtectionSpace._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLCache] that points to the same underlying object as [other]. - static NSURLCache castFrom(T other) { - return NSURLCache._(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.pointer, retain: true, release: true); - /// Returns a [NSURLCache] that wraps the given raw object pointer. - static NSURLCache castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCache._(other, retain: retain, release: release); - } + /// 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 [NSURLCache]. + /// Returns whether [obj] is an instance of [NSURLProtectionSpace]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSURLCache); - } - - static NSURLCache getSharedURLCache() { - final _ret = _objc_msgSend_971(_class_NSURLCache, _sel_sharedURLCache); - return NSURLCache._(_ret, retain: true, release: true); - } - - static void setSharedURLCache(NSURLCache value) { - return _objc_msgSend_972( - _class_NSURLCache, _sel_setSharedURLCache_, value.pointer); + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLProtectionSpace); } - NSURLCache initWithMemoryCapacity_diskCapacity_diskPath_( - int memoryCapacity, int diskCapacity, NSString? path) { - final _ret = _objc_msgSend_973( + NSURLProtectionSpace initWithHost_port_protocol_realm_authenticationMethod_( + objc.NSString host, + int port, + objc.NSString? protocol, + objc.NSString? realm, + objc.NSString? authenticationMethod) { + final _ret = _objc_msgSend_550( this.pointer, - _sel_initWithMemoryCapacity_diskCapacity_diskPath_, - memoryCapacity, - diskCapacity, - path?.pointer ?? ffi.nullptr); - return NSURLCache._(_ret, retain: true, release: true); + _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); } - NSURLCache initWithMemoryCapacity_diskCapacity_directoryURL_( - int memoryCapacity, int diskCapacity, NSURL? directoryURL) { - final _ret = _objc_msgSend_974( + NSURLProtectionSpace initWithProxyHost_port_type_realm_authenticationMethod_( + objc.NSString host, + int port, + objc.NSString? type, + objc.NSString? realm, + objc.NSString? authenticationMethod) { + final _ret = _objc_msgSend_550( this.pointer, - _sel_initWithMemoryCapacity_diskCapacity_directoryURL_, - memoryCapacity, - diskCapacity, - directoryURL?.pointer ?? ffi.nullptr); - return NSURLCache._(_ret, retain: true, release: true); + _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); } - NSCachedURLResponse? cachedResponseForRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_979( - this.pointer, _sel_cachedResponseForRequest_, request.pointer); + objc.NSString? get realm { + final _ret = _objc_msgSend_13(this.pointer, _sel_realm); return _ret.address == 0 ? null - : NSCachedURLResponse._(_ret, retain: true, release: true); - } - - void storeCachedResponse_forRequest_( - NSCachedURLResponse cachedResponse, NSURLRequest request) { - _objc_msgSend_980(this.pointer, _sel_storeCachedResponse_forRequest_, - cachedResponse.pointer, request.pointer); - } - - void removeCachedResponseForRequest_(NSURLRequest request) { - _objc_msgSend_981( - this.pointer, _sel_removeCachedResponseForRequest_, request.pointer); - } - - void removeAllCachedResponses() { - _objc_msgSend_1(this.pointer, _sel_removeAllCachedResponses); - } - - void removeCachedResponsesSinceDate_(NSDate date) { - _objc_msgSend_540( - this.pointer, _sel_removeCachedResponsesSinceDate_, date.pointer); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get memoryCapacity { - return _objc_msgSend_10(this.pointer, _sel_memoryCapacity); + bool get receivesCredentialSecurely { + return _objc_msgSend_7(this.pointer, _sel_receivesCredentialSecurely); } - set memoryCapacity(int value) { - return _objc_msgSend_516(this.pointer, _sel_setMemoryCapacity_, value); + bool get isProxy { + return _objc_msgSend_7(this.pointer, _sel_isProxy); } - int get diskCapacity { - return _objc_msgSend_10(this.pointer, _sel_diskCapacity); + objc.NSString get host { + final _ret = _objc_msgSend_12(this.pointer, _sel_host); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set diskCapacity(int value) { - return _objc_msgSend_516(this.pointer, _sel_setDiskCapacity_, value); + int get port { + return _objc_msgSend_114(this.pointer, _sel_port); } - int get currentMemoryUsage { - return _objc_msgSend_10(this.pointer, _sel_currentMemoryUsage); + objc.NSString? get proxyType { + final _ret = _objc_msgSend_13(this.pointer, _sel_proxyType); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get currentDiskUsage { - return _objc_msgSend_10(this.pointer, _sel_currentDiskUsage); + objc.NSString? get protocol { + final _ret = _objc_msgSend_13(this.pointer, _sel_protocol); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void storeCachedResponse_forDataTask_( - NSCachedURLResponse cachedResponse, NSURLSessionDataTask dataTask) { - _objc_msgSend_982(this.pointer, _sel_storeCachedResponse_forDataTask_, - cachedResponse.pointer, dataTask.pointer); + objc.NSString get authenticationMethod { + final _ret = _objc_msgSend_12(this.pointer, _sel_authenticationMethod); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void getCachedResponseForDataTask_completionHandler_( - NSURLSessionDataTask dataTask, - ObjCBlock_ffiVoid_NSCachedURLResponse completionHandler) { - _objc_msgSend_983( - this.pointer, - _sel_getCachedResponseForDataTask_completionHandler_, - dataTask.pointer, - completionHandler.pointer); + objc.NSArray? get distinguishedNames { + final _ret = _objc_msgSend_69(this.pointer, _sel_distinguishedNames); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - void removeCachedResponseForDataTask_(NSURLSessionDataTask dataTask) { - _objc_msgSend_984( - this.pointer, _sel_removeCachedResponseForDataTask_, dataTask.pointer); + ffi.Pointer<__SecTrust> get serverTrust { + return _objc_msgSend_551(this.pointer, _sel_serverTrust); } @override - NSURLCache init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLCache._(_ret, retain: true, release: true); + NSURLProtectionSpace init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: true, release: true); } - static NSURLCache new1() { - final _ret = _objc_msgSend_2(_class_NSURLCache, _sel_new); - return NSURLCache._(_ret, retain: false, release: true); + static NSURLProtectionSpace new1() { + final _ret = _objc_msgSend_40(_class_NSURLProtectionSpace, _sel_new); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } - static NSURLCache allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSURLCache, _sel_allocWithZone_, zone); - return NSURLCache._(_ret, retain: false, release: true); + static NSURLProtectionSpace allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLProtectionSpace, _sel_allocWithZone_, zone); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } - static NSURLCache alloc() { - final _ret = _objc_msgSend_2(_class_NSURLCache, _sel_alloc); - return NSURLCache._(_ret, retain: false, release: true); + static NSURLProtectionSpace alloc() { + final _ret = _objc_msgSend_40(_class_NSURLProtectionSpace, _sel_alloc); + return NSURLProtectionSpace.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLCache, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLProtectionSpace, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLCache, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLProtectionSpace, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLCache, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLProtectionSpace, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLCache, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSURLProtectionSpace, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLCache, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLProtectionSpace, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLCache, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLProtectionSpace, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLCache, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLProtectionSpace, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLCache, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLProtectionSpace, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSURLCache, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLProtectionSpace, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSURLCache = objc.getClass("NSURLCache"); -late final _sel_sharedURLCache = objc.registerName("sharedURLCache"); -final _objc_msgSend_971 = 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_972 = 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_973 = objc.msgSendPointer +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_550 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, + ffi.Pointer, + ffi.Long, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< instancetype Function( ffi.Pointer, ffi.Pointer, + ffi.Pointer, int, - int, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -late final _sel_initWithMemoryCapacity_diskCapacity_directoryURL_ = - objc.registerName("initWithMemoryCapacity:diskCapacity:directoryURL:"); -final _objc_msgSend_974 = objc.msgSendPointer +late final _sel_initWithProxyHost_port_type_realm_authenticationMethod_ = objc + .registerName("initWithProxyHost:port:type:realm:authenticationMethod:"); +late final _sel_realm = objc.registerName("realm"); +late final _sel_receivesCredentialSecurely = + objc.registerName("receivesCredentialSecurely"); +late final _sel_isProxy = objc.registerName("isProxy"); +late final _sel_host = objc.registerName("host"); +late final _sel_proxyType = objc.registerName("proxyType"); +late final _sel_protocol = objc.registerName("protocol"); +late final _sel_authenticationMethod = + objc.registerName("authenticationMethod"); +late final _sel_distinguishedNames = objc.registerName("distinguishedNames"); +late final _sel_serverTrust = objc.registerName("serverTrust"); +final _objc_msgSend_551 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Pointer)>>() + ffi.Pointer<__SecTrust> Function(ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - int, - int, - ffi.Pointer)>(); + ffi.Pointer<__SecTrust> Function( + ffi.Pointer, ffi.Pointer)>(); -class NSCachedURLResponse extends NSObject { - NSCachedURLResponse._(ffi.Pointer pointer, +class NSURLCredentialStorage extends objc.NSObject { + NSURLCredentialStorage._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSCachedURLResponse] that points to the same underlying object as [other]. - static NSCachedURLResponse castFrom(T other) { - return NSCachedURLResponse._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSURLCredentialStorage] that points to the same underlying object as [other]. + NSURLCredentialStorage.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSCachedURLResponse] that wraps the given raw object pointer. - static NSCachedURLResponse castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSCachedURLResponse._(other, retain: retain, release: release); - } + /// 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 [NSCachedURLResponse]. + /// Returns whether [obj] is an instance of [NSURLCredentialStorage]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSCachedURLResponse); + obj.pointer, _sel_isKindOfClass_, _class_NSURLCredentialStorage); } - NSCachedURLResponse initWithResponse_data_( - NSURLResponse response, NSData data) { - final _ret = _objc_msgSend_975(this.pointer, _sel_initWithResponse_data_, - response.pointer, data.pointer); - return NSCachedURLResponse._(_ret, retain: true, release: true); + static NSURLCredentialStorage getSharedCredentialStorage() { + final _ret = _objc_msgSend_552( + _class_NSURLCredentialStorage, _sel_sharedCredentialStorage); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } - NSCachedURLResponse initWithResponse_data_userInfo_storagePolicy_( - NSURLResponse response, - NSData data, - NSDictionary? userInfo, - int storagePolicy) { - final _ret = _objc_msgSend_976( - this.pointer, - _sel_initWithResponse_data_userInfo_storagePolicy_, - response.pointer, - data.pointer, - userInfo?.pointer ?? ffi.nullptr, - storagePolicy); - return NSCachedURLResponse._(_ret, retain: true, release: true); + objc.NSDictionary? credentialsForProtectionSpace_( + NSURLProtectionSpace space) { + final _ret = _objc_msgSend_553( + this.pointer, _sel_credentialsForProtectionSpace_, space.pointer); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - NSURLResponse get response { - final _ret = _objc_msgSend_977(this.pointer, _sel_response); - return NSURLResponse._(_ret, retain: true, release: true); + objc.NSDictionary get allCredentials { + final _ret = _objc_msgSend_112(this.pointer, _sel_allCredentials); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + void setCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_554(this.pointer, _sel_setCredential_forProtectionSpace_, + credential.pointer, space.pointer); + } + + void removeCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_554(this.pointer, _sel_removeCredential_forProtectionSpace_, + credential.pointer, space.pointer); } - NSData get data { - final _ret = _objc_msgSend_43(this.pointer, _sel_data); - return NSData._(_ret, retain: true, release: true); + void removeCredential_forProtectionSpace_options_(NSURLCredential credential, + NSURLProtectionSpace space, objc.NSDictionary? options) { + _objc_msgSend_555( + this.pointer, + _sel_removeCredential_forProtectionSpace_options_, + credential.pointer, + space.pointer, + options?.pointer ?? ffi.nullptr); } - NSDictionary? get userInfo { - final _ret = _objc_msgSend_390(this.pointer, _sel_userInfo); + NSURLCredential? defaultCredentialForProtectionSpace_( + NSURLProtectionSpace space) { + final _ret = _objc_msgSend_556( + this.pointer, _sel_defaultCredentialForProtectionSpace_, space.pointer); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : NSURLCredential.castFromPointer(_ret, retain: true, release: true); } - int get storagePolicy { - return _objc_msgSend_978(this.pointer, _sel_storagePolicy); + void setDefaultCredential_forProtectionSpace_( + NSURLCredential credential, NSURLProtectionSpace space) { + _objc_msgSend_554( + this.pointer, + _sel_setDefaultCredential_forProtectionSpace_, + credential.pointer, + space.pointer); + } + + void getCredentialsForProtectionSpace_task_completionHandler_( + NSURLProtectionSpace protectionSpace, + NSURLSessionTask task, + ObjCBlock_ffiVoid_NSDictionary completionHandler) { + _objc_msgSend_557( + this.pointer, + _sel_getCredentialsForProtectionSpace_task_completionHandler_, + protectionSpace.pointer, + task.pointer, + completionHandler.pointer); + } + + void setCredential_forProtectionSpace_task_(NSURLCredential credential, + NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { + _objc_msgSend_558(this.pointer, _sel_setCredential_forProtectionSpace_task_, + credential.pointer, protectionSpace.pointer, task.pointer); + } + + void removeCredential_forProtectionSpace_options_task_( + NSURLCredential credential, + NSURLProtectionSpace protectionSpace, + objc.NSDictionary? options, + NSURLSessionTask task) { + _objc_msgSend_559( + this.pointer, + _sel_removeCredential_forProtectionSpace_options_task_, + credential.pointer, + protectionSpace.pointer, + options?.pointer ?? ffi.nullptr, + task.pointer); + } + + void getDefaultCredentialForProtectionSpace_task_completionHandler_( + NSURLProtectionSpace space, + NSURLSessionTask task, + ObjCBlock_ffiVoid_NSURLCredential completionHandler) { + _objc_msgSend_560( + this.pointer, + _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_, + space.pointer, + task.pointer, + completionHandler.pointer); + } + + void setDefaultCredential_forProtectionSpace_task_(NSURLCredential credential, + NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { + _objc_msgSend_558( + this.pointer, + _sel_setDefaultCredential_forProtectionSpace_task_, + credential.pointer, + protectionSpace.pointer, + task.pointer); } @override - NSCachedURLResponse init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSCachedURLResponse._(_ret, retain: true, release: true); + NSURLCredentialStorage init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } - static NSCachedURLResponse new1() { - final _ret = _objc_msgSend_2(_class_NSCachedURLResponse, _sel_new); - return NSCachedURLResponse._(_ret, retain: false, release: true); + static NSURLCredentialStorage new1() { + final _ret = _objc_msgSend_40(_class_NSURLCredentialStorage, _sel_new); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); } - static NSCachedURLResponse allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSCachedURLResponse, _sel_allocWithZone_, zone); - return NSCachedURLResponse._(_ret, retain: false, release: true); + static NSURLCredentialStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLCredentialStorage, _sel_allocWithZone_, zone); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); } - static NSCachedURLResponse alloc() { - final _ret = _objc_msgSend_2(_class_NSCachedURLResponse, _sel_alloc); - return NSCachedURLResponse._(_ret, retain: false, release: true); + static NSURLCredentialStorage alloc() { + final _ret = _objc_msgSend_40(_class_NSURLCredentialStorage, _sel_alloc); + return NSURLCredentialStorage.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSCachedURLResponse, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLCredentialStorage, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSCachedURLResponse, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLCredentialStorage, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSCachedURLResponse, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLCredentialStorage, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSCachedURLResponse, _sel_useStoredAccessor); + return _objc_msgSend_7( + _class_NSURLCredentialStorage, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSCachedURLResponse, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLCredentialStorage, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSCachedURLResponse, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLCredentialStorage, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSCachedURLResponse, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLCredentialStorage, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSCachedURLResponse, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLCredentialStorage, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSCachedURLResponse, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLCredentialStorage, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSCachedURLResponse = objc.getClass("NSCachedURLResponse"); -late final _sel_initWithResponse_data_ = - objc.registerName("initWithResponse:data:"); -final _objc_msgSend_975 = objc.msgSendPointer +late final _class_NSURLCredentialStorage = + objc.getClass("NSURLCredentialStorage"); +late final _sel_sharedCredentialStorage = + objc.registerName("sharedCredentialStorage"); +final _objc_msgSend_552 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + 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_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_allCredentials = objc.registerName("allCredentials"); +late final _sel_setCredential_forProtectionSpace_ = + objc.registerName("setCredential:forProtectionSpace:"); +final _objc_msgSend_554 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - instancetype Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); - -abstract class NSURLCacheStoragePolicy { - static const int NSURLCacheStorageAllowed = 0; - static const int NSURLCacheStorageAllowedInMemoryOnly = 1; - static const int NSURLCacheStorageNotAllowed = 2; -} - -late final _sel_initWithResponse_data_userInfo_storagePolicy_ = - objc.registerName("initWithResponse:data:userInfo:storagePolicy:"); -final _objc_msgSend_976 = objc.msgSendPointer +late final _sel_removeCredential_forProtectionSpace_ = + objc.registerName("removeCredential:forProtectionSpace:"); +late final _sel_removeCredential_forProtectionSpace_options_ = + objc.registerName("removeCredential:forProtectionSpace:options:"); +final _objc_msgSend_555 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() + ffi.Pointer)>>() .asFunction< - instancetype Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int)>(); -final _objc_msgSend_977 = 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_978 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_cachedResponseForRequest_ = - objc.registerName("cachedResponseForRequest:"); -final _objc_msgSend_979 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_defaultCredentialForProtectionSpace_ = + objc.registerName("defaultCredentialForProtectionSpace:"); +final _objc_msgSend_556 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -48739,201 +25621,208 @@ final _objc_msgSend_979 = objc.msgSendPointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_storeCachedResponse_forRequest_ = - objc.registerName("storeCachedResponse:forRequest:"); -final _objc_msgSend_980 = objc.msgSendPointer +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); +final _ObjCBlock_ffiVoid_NSDictionary_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[block.ref.target.address]!( + arg0); + +class ObjCBlock_ffiVoid_NSDictionary extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSDictionary._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSDictionary castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSDictionary._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSDictionary.fromFunction(void Function(objc.NSDictionary?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSDictionary.listener(void Function(objc.NSDictionary?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSDictionary_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSDictionary.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(objc.NSDictionary? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); +} + +late final _sel_getCredentialsForProtectionSpace_task_completionHandler_ = objc + .registerName("getCredentialsForProtectionSpace:task:completionHandler:"); +final _objc_msgSend_557 = 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)>(); -late final _sel_removeCachedResponseForRequest_ = - objc.registerName("removeCachedResponseForRequest:"); -final _objc_msgSend_981 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_setCredential_forProtectionSpace_task_ = + objc.registerName("setCredential:forProtectionSpace:task:"); +final _objc_msgSend_558 = 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)>(); -late final _sel_removeAllCachedResponses = - objc.registerName("removeAllCachedResponses"); -late final _sel_removeCachedResponsesSinceDate_ = - objc.registerName("removeCachedResponsesSinceDate:"); -late final _sel_memoryCapacity = objc.registerName("memoryCapacity"); -late final _sel_setMemoryCapacity_ = objc.registerName("setMemoryCapacity:"); -late final _sel_diskCapacity = objc.registerName("diskCapacity"); -late final _sel_setDiskCapacity_ = objc.registerName("setDiskCapacity:"); -late final _sel_currentMemoryUsage = objc.registerName("currentMemoryUsage"); -late final _sel_currentDiskUsage = objc.registerName("currentDiskUsage"); - -class NSURLSessionDataTask extends NSURLSessionTask { - NSURLSessionDataTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSURLSessionDataTask] that points to the same underlying object as [other]. - static NSURLSessionDataTask castFrom(T other) { - return NSURLSessionDataTask._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSURLSessionDataTask] that wraps the given raw object pointer. - static NSURLSessionDataTask castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLSessionDataTask._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSURLSessionDataTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionDataTask); - } - - @override - NSURLSessionDataTask init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionDataTask._(_ret, retain: true, release: true); - } - - static NSURLSessionDataTask new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionDataTask, _sel_new); - return NSURLSessionDataTask._(_ret, retain: false, release: true); - } - - static NSURLSessionDataTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSURLSessionDataTask, _sel_allocWithZone_, zone); - return NSURLSessionDataTask._(_ret, retain: false, release: true); - } - - static NSURLSessionDataTask alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSessionDataTask, _sel_alloc); - return NSURLSessionDataTask._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionDataTask, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionDataTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSessionDataTask, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLSessionDataTask, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionDataTask, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionDataTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionDataTask, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSessionDataTask, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLSessionDataTask, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } -} - -late final _class_NSURLSessionDataTask = objc.getClass("NSURLSessionDataTask"); -late final _sel_storeCachedResponse_forDataTask_ = - objc.registerName("storeCachedResponse:forDataTask:"); -final _objc_msgSend_982 = objc.msgSendPointer + 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_559 = 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_NSCachedURLResponse_fnPtrTrampoline( +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); -final _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry = +final _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry = )>{}; -int _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( +int _ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[id] = fn; + final id = ++_ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline( +void _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureRegistry[ + _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[ block.ref.target.address]!(arg0); -class ObjCBlock_ffiVoid_NSCachedURLResponse extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSCachedURLResponse._(ffi.Pointer pointer, +class ObjCBlock_ffiVoid_NSURLCredential extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSURLCredential._(ffi.Pointer pointer, {bool retain = false, bool release = true}) : super(pointer, retain: retain, release: release); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSCachedURLResponse castFromPointer( + static ObjCBlock_ffiVoid_NSURLCredential castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSCachedURLResponse._(pointer, + return ObjCBlock_ffiVoid_NSURLCredential._(pointer, retain: retain, release: release); } @@ -48942,7 +25831,7 @@ class ObjCBlock_ffiVoid_NSCachedURLResponse extends objc.ObjCBlockBase { /// This block must be invoked by native 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( + ObjCBlock_ffiVoid_NSURLCredential.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function(ffi.Pointer arg0)>> @@ -48951,7 +25840,7 @@ class ObjCBlock_ffiVoid_NSCachedURLResponse extends objc.ObjCBlockBase { _cFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSCachedURLResponse_fnPtrTrampoline) + _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; @@ -48961,18 +25850,18 @@ class ObjCBlock_ffiVoid_NSCachedURLResponse extends objc.ObjCBlockBase { /// This block must be invoked by native 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) + ObjCBlock_ffiVoid_NSURLCredential.fromFunction( + void Function(NSURLCredential?) fn) : this._(objc.newBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< ffi.Void Function(ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) + _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) .cast(), - _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( (ffi.Pointer arg0) => fn(arg0.address == 0 ? null - : NSCachedURLResponse._(arg0, retain: true, release: true))))); + : NSURLCredential.castFromPointer(arg0, retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -48984,26 +25873,25 @@ 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) + ObjCBlock_ffiVoid_NSURLCredential.listener(void Function(NSURLCredential?) fn) : this._(objc.newBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< ffi.Void Function(ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSCachedURLResponse_closureTrampoline) + _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), - _ObjCBlock_ffiVoid_NSCachedURLResponse_registerClosure( + _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( (ffi.Pointer arg0) => fn(arg0.address == 0 ? null - : NSCachedURLResponse._(arg0, retain: true, release: true))))); + : NSURLCredential.castFromPointer(arg0, retain: true, release: true))))); static ffi.NativeCallable< ffi.Void Function( ffi.Pointer, ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(NSCachedURLResponse? arg0) => pointer.ref.invoke + void call(NSURLCredential? arg0) => pointer.ref.invoke .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer block, @@ -49014,1313 +25902,1557 @@ class ObjCBlock_ffiVoid_NSCachedURLResponse extends objc.ObjCBlockBase { pointer, arg0?.pointer ?? ffi.nullptr); } -late final _sel_getCachedResponseForDataTask_completionHandler_ = - objc.registerName("getCachedResponseForDataTask:completionHandler:"); -final _objc_msgSend_983 = objc.msgSendPointer +late final _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_ = + objc.registerName( + "getDefaultCredentialForProtectionSpace:task:completionHandler:"); +final _objc_msgSend_560 = 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_removeCachedResponseForDataTask_ = - objc.registerName("removeCachedResponseForDataTask:"); -final _objc_msgSend_984 = 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_setDefaultCredential_forProtectionSpace_task_ = + objc.registerName("setDefaultCredential:forProtectionSpace:task:"); -class NSURLConnection extends NSObject { - NSURLConnection._(ffi.Pointer pointer, +class NSURLProtocol extends objc.NSObject { + NSURLProtocol._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLConnection] that points to the same underlying object as [other]. - static NSURLConnection castFrom(T other) { - return NSURLConnection._(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.pointer, retain: true, release: true); - /// Returns a [NSURLConnection] that wraps the given raw object pointer. - static NSURLConnection castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLConnection._(other, retain: retain, release: release); - } + /// 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 [NSURLConnection]. + /// Returns whether [obj] is an instance of [NSURLProtocol]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLConnection); + obj.pointer, _sel_isKindOfClass_, _class_NSURLProtocol); } - NSURLConnection? initWithRequest_delegate_startImmediately_( - NSURLRequest request, NSObject? delegate, bool startImmediately) { - final _ret = _objc_msgSend_985( + NSURLProtocol initWithRequest_cachedResponse_client_(NSURLRequest request, + NSCachedURLResponse? cachedResponse, objc.NSObject? client) { + final _ret = _objc_msgSend_561( this.pointer, - _sel_initWithRequest_delegate_startImmediately_, + _sel_initWithRequest_cachedResponse_client_, request.pointer, - delegate?.pointer ?? ffi.nullptr, - startImmediately); - return _ret.address == 0 - ? null - : NSURLConnection._(_ret, retain: true, release: true); + cachedResponse?.pointer ?? ffi.nullptr, + client?.pointer ?? ffi.nullptr); + return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); } - NSURLConnection? initWithRequest_delegate_( - NSURLRequest request, NSObject? delegate) { - final _ret = _objc_msgSend_986(this.pointer, _sel_initWithRequest_delegate_, - request.pointer, delegate?.pointer ?? ffi.nullptr); + objc.NSObject? get client { + final _ret = _objc_msgSend_66(this.pointer, _sel_client); return _ret.address == 0 ? null - : NSURLConnection._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSURLConnection? connectionWithRequest_delegate_( - NSURLRequest request, NSObject? delegate) { - final _ret = _objc_msgSend_987( - _class_NSURLConnection, - _sel_connectionWithRequest_delegate_, - request.pointer, - delegate?.pointer ?? ffi.nullptr); + NSURLRequest get request { + final _ret = _objc_msgSend_537(this.pointer, _sel_request); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); + } + + NSCachedURLResponse? get cachedResponse { + final _ret = _objc_msgSend_562(this.pointer, _sel_cachedResponse); return _ret.address == 0 ? null - : NSURLConnection._(_ret, retain: true, release: true); + : NSCachedURLResponse.castFromPointer(_ret, + retain: true, release: true); } - NSURLRequest get originalRequest { - final _ret = _objc_msgSend_988(this.pointer, _sel_originalRequest); - return NSURLRequest._(_ret, retain: true, release: true); + static bool canInitWithRequest_(NSURLRequest request) { + return _objc_msgSend_539( + _class_NSURLProtocol, _sel_canInitWithRequest_, request.pointer); } - NSURLRequest get currentRequest { - final _ret = _objc_msgSend_988(this.pointer, _sel_currentRequest); - return NSURLRequest._(_ret, retain: true, release: true); + static NSURLRequest canonicalRequestForRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_563(_class_NSURLProtocol, + _sel_canonicalRequestForRequest_, request.pointer); + return NSURLRequest.castFromPointer(_ret, retain: true, release: true); } - void start() { - _objc_msgSend_1(this.pointer, _sel_start); + static bool requestIsCacheEquivalent_toRequest_( + NSURLRequest a, NSURLRequest b) { + return _objc_msgSend_564(_class_NSURLProtocol, + _sel_requestIsCacheEquivalent_toRequest_, a.pointer, b.pointer); } - void cancel() { - _objc_msgSend_1(this.pointer, _sel_cancel); + void startLoading() { + _objc_msgSend_82(this.pointer, _sel_startLoading); } - void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_scheduleInRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); + void stopLoading() { + _objc_msgSend_82(this.pointer, _sel_stopLoading); } - void unscheduleFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_unscheduleFromRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); + static objc.NSObject? propertyForKey_inRequest_( + objc.NSString key, NSURLRequest request) { + final _ret = _objc_msgSend_565(_class_NSURLProtocol, + _sel_propertyForKey_inRequest_, key.pointer, request.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void setDelegateQueue_(NSOperationQueue? queue) { - _objc_msgSend_989( - this.pointer, _sel_setDelegateQueue_, queue?.pointer ?? ffi.nullptr); + static void setProperty_forKey_inRequest_( + objc.NSObject value, objc.NSString key, NSMutableURLRequest request) { + _objc_msgSend_573(_class_NSURLProtocol, _sel_setProperty_forKey_inRequest_, + value.pointer, key.pointer, request.pointer); } - static bool canHandleRequest_(NSURLRequest request) { - return _objc_msgSend_990( - _class_NSURLConnection, _sel_canHandleRequest_, request.pointer); + static void removePropertyForKey_inRequest_( + objc.NSString key, NSMutableURLRequest request) { + _objc_msgSend_574(_class_NSURLProtocol, + _sel_removePropertyForKey_inRequest_, key.pointer, request.pointer); } - static NSData? sendSynchronousRequest_returningResponse_error_( - NSURLRequest request, - ffi.Pointer> response, - ffi.Pointer> error) { - final _ret = _objc_msgSend_991( - _class_NSURLConnection, - _sel_sendSynchronousRequest_returningResponse_error_, - request.pointer, - response, - error); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); + static bool registerClass_(objc.NSObject protocolClass) { + return _objc_msgSend_0( + _class_NSURLProtocol, _sel_registerClass_, protocolClass.pointer); } - static void sendAsynchronousRequest_queue_completionHandler_( - NSURLRequest request, - NSOperationQueue queue, - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError handler) { - _objc_msgSend_992( - _class_NSURLConnection, - _sel_sendAsynchronousRequest_queue_completionHandler_, - request.pointer, - queue.pointer, - handler.pointer); + static void unregisterClass_(objc.NSObject protocolClass) { + _objc_msgSend_49( + _class_NSURLProtocol, _sel_unregisterClass_, protocolClass.pointer); + } + + static bool canInitWithTask_(NSURLSessionTask task) { + return _objc_msgSend_575( + _class_NSURLProtocol, _sel_canInitWithTask_, task.pointer); + } + + NSURLProtocol initWithTask_cachedResponse_client_(NSURLSessionTask task, + NSCachedURLResponse? cachedResponse, objc.NSObject? client) { + final _ret = _objc_msgSend_576( + this.pointer, + _sel_initWithTask_cachedResponse_client_, + task.pointer, + cachedResponse?.pointer ?? ffi.nullptr, + client?.pointer ?? ffi.nullptr); + return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); + } + + NSURLSessionTask? get task { + final _ret = _objc_msgSend_577(this.pointer, _sel_task); + return _ret.address == 0 + ? null + : NSURLSessionTask.castFromPointer(_ret, retain: true, release: true); } @override - NSURLConnection init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLConnection._(_ret, retain: true, release: true); + NSURLProtocol init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLProtocol.castFromPointer(_ret, retain: true, release: true); } - static NSURLConnection new1() { - final _ret = _objc_msgSend_2(_class_NSURLConnection, _sel_new); - return NSURLConnection._(_ret, retain: false, release: true); + static NSURLProtocol new1() { + final _ret = _objc_msgSend_40(_class_NSURLProtocol, _sel_new); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } - static NSURLConnection allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSURLProtocol allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSURLConnection, _sel_allocWithZone_, zone); - return NSURLConnection._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSURLProtocol, _sel_allocWithZone_, zone); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } - static NSURLConnection alloc() { - final _ret = _objc_msgSend_2(_class_NSURLConnection, _sel_alloc); - return NSURLConnection._(_ret, retain: false, release: true); + static NSURLProtocol alloc() { + final _ret = _objc_msgSend_40(_class_NSURLProtocol, _sel_alloc); + return NSURLProtocol.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLConnection, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLProtocol, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLConnection, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLProtocol, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLConnection, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLConnection, _sel_useStoredAccessor); - } - - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLConnection, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); - } - - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLConnection, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); - } - - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLConnection, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } - - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLConnection, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSURLConnection, _sel_classForKeyedUnarchiver); - return NSObject._(_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_985 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_initWithRequest_delegate_ = - objc.registerName("initWithRequest:delegate:"); -final _objc_msgSend_986 = 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_987 = 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_988 = 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_989 = 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_990 = 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_991 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer>)>(); -void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); - -class ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError - extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._( - ffi.Pointer pointer, - {bool retain = false, - bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.fromFunction( - void Function(NSURLResponse?, NSData?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 ? null : NSURLResponse._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSData._(arg1, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError.listener( - void Function(NSURLResponse?, NSData?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURLResponse_NSData_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSURLResponse._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSData._(arg1, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLProtocol, _sel_accessInstanceVariablesDirectly); + } - void call(NSURLResponse? arg0, NSData? arg1, NSError? arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, - arg0?.pointer ?? ffi.nullptr, - arg1?.pointer ?? ffi.nullptr, - arg2?.pointer ?? ffi.nullptr); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSURLProtocol, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLProtocol, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLProtocol, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLProtocol, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLProtocol, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSURLProtocol, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } } -late final _sel_sendAsynchronousRequest_queue_completionHandler_ = - objc.registerName("sendAsynchronousRequest:queue:completionHandler:"); -final _objc_msgSend_992 = objc.msgSendPointer +late final _class_NSURLProtocol = objc.getClass("NSURLProtocol"); +late final _sel_initWithRequest_cachedResponse_client_ = + objc.registerName("initWithRequest:cachedResponse:client:"); +final _objc_msgSend_561 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer)>>() .asFunction< - void Function( + instancetype Function( ffi.Pointer, 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_562 = 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_563 = 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_564 = 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_565 = 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)>(); -class NSURLCredential extends NSObject { - NSURLCredential._(ffi.Pointer pointer, +class NSMutableURLRequest extends NSURLRequest { + NSMutableURLRequest._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLCredential] that points to the same underlying object as [other]. - static NSURLCredential castFrom(T other) { - return NSURLCredential._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSMutableURLRequest] that points to the same underlying object as [other]. + NSMutableURLRequest.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSURLCredential] that wraps the given raw object pointer. - static NSURLCredential castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLCredential._(other, retain: retain, release: release); - } + /// Constructs a [NSMutableURLRequest] that wraps the given raw object pointer. + NSMutableURLRequest.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - /// Returns whether [obj] is an instance of [NSURLCredential]. + /// Returns whether [obj] is an instance of [NSMutableURLRequest]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLCredential); + obj.pointer, _sel_isKindOfClass_, _class_NSMutableURLRequest); } - int get persistence { - return _objc_msgSend_993(this.pointer, _sel_persistence); + @override + objc.NSURL? get URL { + final _ret = _objc_msgSend_10(this.pointer, _sel_URL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - NSURLCredential initWithUser_password_persistence_( - NSString user, NSString password, int persistence) { - final _ret = _objc_msgSend_994( - this.pointer, - _sel_initWithUser_password_persistence_, - user.pointer, - password.pointer, - persistence); - return NSURLCredential._(_ret, retain: true, release: true); + set URL(objc.NSURL? value) { + return _objc_msgSend_566( + this.pointer, _sel_setURL_, value?.pointer ?? ffi.nullptr); } - static NSURLCredential credentialWithUser_password_persistence_( - NSString user, NSString password, int persistence) { - final _ret = _objc_msgSend_995( - _class_NSURLCredential, - _sel_credentialWithUser_password_persistence_, - user.pointer, - password.pointer, - persistence); - return NSURLCredential._(_ret, retain: true, release: true); + @override + int get cachePolicy { + return _objc_msgSend_322(this.pointer, _sel_cachePolicy); + } + + set cachePolicy(int value) { + return _objc_msgSend_567(this.pointer, _sel_setCachePolicy_, value); + } + + @override + double get timeoutInterval { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutInterval) + : _objc_msgSend_115(this.pointer, _sel_timeoutInterval); + } + + set timeoutInterval(double value) { + return _objc_msgSend_212(this.pointer, _sel_setTimeoutInterval_, value); } - NSString? get user { - final _ret = _objc_msgSend_44(this.pointer, _sel_user); + @override + objc.NSURL? get mainDocumentURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_mainDocumentURL); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + set mainDocumentURL(objc.NSURL? value) { + return _objc_msgSend_566( + this.pointer, _sel_setMainDocumentURL_, value?.pointer ?? ffi.nullptr); + } + + @override + int get networkServiceType { + return _objc_msgSend_323(this.pointer, _sel_networkServiceType); + } + + set networkServiceType(int value) { + return _objc_msgSend_568(this.pointer, _sel_setNetworkServiceType_, value); + } + + @override + bool get allowsCellularAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsCellularAccess); + } + + set allowsCellularAccess(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setAllowsCellularAccess_, value); + } + + @override + bool get allowsExpensiveNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsExpensiveNetworkAccess); + } + + set allowsExpensiveNetworkAccess(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); + } + + @override + bool get allowsConstrainedNetworkAccess { + return _objc_msgSend_7(this.pointer, _sel_allowsConstrainedNetworkAccess); + } + + set allowsConstrainedNetworkAccess(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); + } + + @override + bool get assumesHTTP3Capable { + return _objc_msgSend_7(this.pointer, _sel_assumesHTTP3Capable); + } + + set assumesHTTP3Capable(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setAssumesHTTP3Capable_, value); + } + + @override + int get attribution { + return _objc_msgSend_324(this.pointer, _sel_attribution); + } + + set attribution(int value) { + return _objc_msgSend_569(this.pointer, _sel_setAttribution_, value); + } + + @override + bool get requiresDNSSECValidation { + return _objc_msgSend_7(this.pointer, _sel_requiresDNSSECValidation); + } + + set requiresDNSSECValidation(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setRequiresDNSSECValidation_, value); + } + + objc.NSString get HTTPMethod { + final _ret = _objc_msgSend_12(this.pointer, _sel_HTTPMethod); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set HTTPMethod(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setHTTPMethod_, value.pointer); } - NSString? get password { - final _ret = _objc_msgSend_44(this.pointer, _sel_password); + @override + objc.NSDictionary? get allHTTPHeaderFields { + final _ret = _objc_msgSend_65(this.pointer, _sel_allHTTPHeaderFields); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - bool get hasPassword { - return _objc_msgSend_12(this.pointer, _sel_hasPassword); + set allHTTPHeaderFields(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setAllHTTPHeaderFields_, + value?.pointer ?? ffi.nullptr); } - NSURLCredential initWithIdentity_certificates_persistence_( - ffi.Pointer<__SecIdentity> identity, - NSArray? certArray, - int persistence) { - final _ret = _objc_msgSend_996( - this.pointer, - _sel_initWithIdentity_certificates_persistence_, - identity, - certArray?.pointer ?? ffi.nullptr, - persistence); - return NSURLCredential._(_ret, retain: true, release: true); + void setValue_forHTTPHeaderField_(objc.NSString? value, objc.NSString field) { + _objc_msgSend_570(this.pointer, _sel_setValue_forHTTPHeaderField_, + value?.pointer ?? ffi.nullptr, field.pointer); } - static NSURLCredential credentialWithIdentity_certificates_persistence_( - ffi.Pointer<__SecIdentity> identity, - NSArray? certArray, - int persistence) { - final _ret = _objc_msgSend_997( - _class_NSURLCredential, - _sel_credentialWithIdentity_certificates_persistence_, - identity, - certArray?.pointer ?? ffi.nullptr, - persistence); - return NSURLCredential._(_ret, retain: true, release: true); + void addValue_forHTTPHeaderField_(objc.NSString value, objc.NSString field) { + _objc_msgSend_201(this.pointer, _sel_addValue_forHTTPHeaderField_, + value.pointer, field.pointer); } - ffi.Pointer<__SecIdentity> get identity { - return _objc_msgSend_998(this.pointer, _sel_identity); + @override + objc.NSData? get HTTPBody { + final _ret = _objc_msgSend_325(this.pointer, _sel_HTTPBody); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - NSArray get certificates { - final _ret = _objc_msgSend_85(this.pointer, _sel_certificates); - return NSArray._(_ret, retain: true, release: true); + set HTTPBody(objc.NSData? value) { + return _objc_msgSend_571( + this.pointer, _sel_setHTTPBody_, value?.pointer ?? ffi.nullptr); } - NSURLCredential initWithTrust_(ffi.Pointer<__SecTrust> trust) { - final _ret = _objc_msgSend_999(this.pointer, _sel_initWithTrust_, trust); - return NSURLCredential._(_ret, retain: true, release: true); + @override + NSInputStream? get HTTPBodyStream { + final _ret = _objc_msgSend_342(this.pointer, _sel_HTTPBodyStream); + return _ret.address == 0 + ? null + : NSInputStream.castFromPointer(_ret, retain: true, release: true); } - static NSURLCredential credentialForTrust_(ffi.Pointer<__SecTrust> trust) { - final _ret = _objc_msgSend_1000( - _class_NSURLCredential, _sel_credentialForTrust_, trust); - return NSURLCredential._(_ret, retain: true, release: true); + set HTTPBodyStream(NSInputStream? value) { + return _objc_msgSend_572( + this.pointer, _sel_setHTTPBodyStream_, value?.pointer ?? ffi.nullptr); } @override - NSURLCredential init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLCredential._(_ret, retain: true, release: true); + bool get HTTPShouldHandleCookies { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldHandleCookies); } - static NSURLCredential new1() { - final _ret = _objc_msgSend_2(_class_NSURLCredential, _sel_new); - return NSURLCredential._(_ret, retain: false, release: true); + set HTTPShouldHandleCookies(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHTTPShouldHandleCookies_, value); } - static NSURLCredential allocWithZone_(ffi.Pointer<_NSZone> zone) { + @override + bool get HTTPShouldUsePipelining { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldUsePipelining); + } + + set HTTPShouldUsePipelining(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHTTPShouldUsePipelining_, value); + } + + static NSMutableURLRequest requestWithURL_(objc.NSURL URL) { + final _ret = _objc_msgSend_320( + _class_NSMutableURLRequest, _sel_requestWithURL_, URL.pointer); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); + } + + static bool getSupportsSecureCoding() { + return _objc_msgSend_7( + _class_NSMutableURLRequest, _sel_supportsSecureCoding); + } + + static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + _class_NSMutableURLRequest, + _sel_requestWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableURLRequest initWithURL_(objc.NSURL URL) { final _ret = - _objc_msgSend_3(_class_NSURLCredential, _sel_allocWithZone_, zone); - return NSURLCredential._(_ret, retain: false, release: true); + _objc_msgSend_320(this.pointer, _sel_initWithURL_, URL.pointer); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); } - static NSURLCredential alloc() { - final _ret = _objc_msgSend_2(_class_NSURLCredential, _sel_alloc); - return NSURLCredential._(_ret, retain: false, release: true); + @override + NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_( + objc.NSURL URL, int cachePolicy, double timeoutInterval) { + final _ret = _objc_msgSend_321( + this.pointer, + _sel_initWithURL_cachePolicy_timeoutInterval_, + URL.pointer, + cachePolicy, + timeoutInterval); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableURLRequest init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSMutableURLRequest.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableURLRequest new1() { + final _ret = _objc_msgSend_40(_class_NSMutableURLRequest, _sel_new); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); + } + + static NSMutableURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSMutableURLRequest, _sel_allocWithZone_, zone); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); + } + + static NSMutableURLRequest alloc() { + final _ret = _objc_msgSend_40(_class_NSMutableURLRequest, _sel_alloc); + return NSMutableURLRequest.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLCredential, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSMutableURLRequest, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLCredential, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSMutableURLRequest, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLCredential, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSMutableURLRequest, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLCredential, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSMutableURLRequest, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLCredential, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSMutableURLRequest, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLCredential, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSMutableURLRequest, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLCredential, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSMutableURLRequest, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLCredential, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSMutableURLRequest, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSURLCredential, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSMutableURLRequest, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSURLCredential = objc.getClass("NSURLCredential"); - -abstract class NSURLCredentialPersistence { - static const int NSURLCredentialPersistenceNone = 0; - static const int NSURLCredentialPersistenceForSession = 1; - static const int NSURLCredentialPersistencePermanent = 2; - static const int NSURLCredentialPersistenceSynchronizable = 3; -} - -late final _sel_persistence = objc.registerName("persistence"); -final _objc_msgSend_993 = objc.msgSendPointer +late final _class_NSMutableURLRequest = objc.getClass("NSMutableURLRequest"); +late final _sel_setURL_ = objc.registerName("setURL:"); +final _objc_msgSend_566 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + 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_994 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setCachePolicy_ = objc.registerName("setCachePolicy:"); +final _objc_msgSend_567 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_568 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_569 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_570 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Int32)>>() + ffi.Pointer)>>() .asFunction< - instancetype Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - int)>(); -late final _sel_credentialWithUser_password_persistence_ = - objc.registerName("credentialWithUser:password:persistence:"); -final _objc_msgSend_995 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_addValue_forHTTPHeaderField_ = + objc.registerName("addValue:forHTTPHeaderField:"); +late final _sel_setHTTPBody_ = objc.registerName("setHTTPBody:"); +final _objc_msgSend_571 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + 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_572 = 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_573 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Int32)>>() + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer, - int)>(); -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_996 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_removePropertyForKey_inRequest_ = + objc.registerName("removePropertyForKey:inRequest:"); +final _objc_msgSend_574 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer<__SecIdentity>, ffi.Pointer, - ffi.Int32)>>() + ffi.Pointer)>>() .asFunction< - instancetype Function( + void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer<__SecIdentity>, ffi.Pointer, - int)>(); -late final _sel_credentialWithIdentity_certificates_persistence_ = - objc.registerName("credentialWithIdentity:certificates:persistence:"); -final _objc_msgSend_997 = objc.msgSendPointer + 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_575 = 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_576 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer<__SecIdentity>, ffi.Pointer, - ffi.Int32)>>() + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer<__SecIdentity>, ffi.Pointer, - int)>(); -late final _sel_identity = objc.registerName("identity"); -final _objc_msgSend_998 = objc.msgSendPointer + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_task = objc.registerName("task"); +final _objc_msgSend_577 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer<__SecIdentity> Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer<__SecIdentity> Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_certificates = objc.registerName("certificates"); - -final class __SecTrust extends ffi.Opaque {} - -late final _sel_initWithTrust_ = objc.registerName("initWithTrust:"); -final _objc_msgSend_999 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<__SecTrust>)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer<__SecTrust>)>(); -late final _sel_credentialForTrust_ = objc.registerName("credentialForTrust:"); -final _objc_msgSend_1000 = 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>)>(); -class NSURLProtectionSpace extends NSObject { - NSURLProtectionSpace._(ffi.Pointer pointer, +class NSXMLParser extends objc.NSObject { + NSXMLParser._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLProtectionSpace] that points to the same underlying object as [other]. - static NSURLProtectionSpace castFrom(T other) { - return NSURLProtectionSpace._(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.pointer, retain: true, release: true); - /// Returns a [NSURLProtectionSpace] that wraps the given raw object pointer. - static NSURLProtectionSpace castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLProtectionSpace._(other, retain: retain, release: release); - } + /// 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 [NSURLProtectionSpace]. + /// Returns whether [obj] is an instance of [NSXMLParser]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLProtectionSpace); + obj.pointer, _sel_isKindOfClass_, _class_NSXMLParser); } - NSURLProtectionSpace initWithHost_port_protocol_realm_authenticationMethod_( - NSString host, - int port, - NSString? protocol, - NSString? realm, - NSString? authenticationMethod) { - final _ret = _objc_msgSend_1001( - 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._(_ret, retain: true, release: true); + NSXMLParser? initWithContentsOfURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_3(this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSXMLParser.castFromPointer(_ret, retain: true, release: true); } - NSURLProtectionSpace initWithProxyHost_port_type_realm_authenticationMethod_( - NSString host, - int port, - NSString? type, - NSString? realm, - NSString? authenticationMethod) { - final _ret = _objc_msgSend_1001( - 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._(_ret, retain: true, release: true); + NSXMLParser initWithData_(objc.NSData data) { + final _ret = + _objc_msgSend_340(this.pointer, _sel_initWithData_, data.pointer); + return NSXMLParser.castFromPointer(_ret, retain: true, release: true); + } + + NSXMLParser initWithStream_(NSInputStream stream) { + final _ret = + _objc_msgSend_578(this.pointer, _sel_initWithStream_, stream.pointer); + return NSXMLParser.castFromPointer(_ret, retain: true, release: true); } - NSString? get realm { - final _ret = _objc_msgSend_44(this.pointer, _sel_realm); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool get receivesCredentialSecurely { - return _objc_msgSend_12(this.pointer, _sel_receivesCredentialSecurely); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - bool get isProxy { - return _objc_msgSend_12(this.pointer, _sel_isProxy); + bool get shouldProcessNamespaces { + return _objc_msgSend_7(this.pointer, _sel_shouldProcessNamespaces); } - NSString get host { - final _ret = _objc_msgSend_21(this.pointer, _sel_host); - return NSString._(_ret, retain: true, release: true); + set shouldProcessNamespaces(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldProcessNamespaces_, value); } - int get port { - return _objc_msgSend_83(this.pointer, _sel_port); + bool get shouldReportNamespacePrefixes { + return _objc_msgSend_7(this.pointer, _sel_shouldReportNamespacePrefixes); + } + + set shouldReportNamespacePrefixes(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldReportNamespacePrefixes_, value); + } + + int get externalEntityResolvingPolicy { + return _objc_msgSend_579(this.pointer, _sel_externalEntityResolvingPolicy); + } + + set externalEntityResolvingPolicy(int value) { + return _objc_msgSend_580( + this.pointer, _sel_setExternalEntityResolvingPolicy_, value); } - NSString? get proxyType { - final _ret = _objc_msgSend_44(this.pointer, _sel_proxyType); + objc.NSSet? get allowedExternalEntityURLs { + final _ret = + _objc_msgSend_581(this.pointer, _sel_allowedExternalEntityURLs); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + set allowedExternalEntityURLs(objc.NSSet? value) { + return _objc_msgSend_582(this.pointer, _sel_setAllowedExternalEntityURLs_, + value?.pointer ?? ffi.nullptr); + } + + bool parse() { + return _objc_msgSend_7(this.pointer, _sel_parse); + } + + void abortParsing() { + _objc_msgSend_82(this.pointer, _sel_abortParsing); } - NSString? get protocol { - final _ret = _objc_msgSend_44(this.pointer, _sel_protocol); + objc.NSError? get parserError { + final _ret = _objc_msgSend_328(this.pointer, _sel_parserError); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSError.castFromPointer(_ret, retain: true, release: true); + } + + bool get shouldResolveExternalEntities { + return _objc_msgSend_7(this.pointer, _sel_shouldResolveExternalEntities); } - NSString get authenticationMethod { - final _ret = _objc_msgSend_21(this.pointer, _sel_authenticationMethod); - return NSString._(_ret, retain: true, release: true); + set shouldResolveExternalEntities(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldResolveExternalEntities_, value); } - NSArray? get distinguishedNames { - final _ret = _objc_msgSend_84(this.pointer, _sel_distinguishedNames); + objc.NSString? get publicID { + final _ret = _objc_msgSend_13(this.pointer, _sel_publicID); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - ffi.Pointer<__SecTrust> get serverTrust { - return _objc_msgSend_1002(this.pointer, _sel_serverTrust); + objc.NSString? get systemID { + final _ret = _objc_msgSend_13(this.pointer, _sel_systemID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + int get lineNumber { + return _objc_msgSend_114(this.pointer, _sel_lineNumber); + } + + int get columnNumber { + return _objc_msgSend_114(this.pointer, _sel_columnNumber); } @override - NSURLProtectionSpace init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLProtectionSpace._(_ret, retain: true, release: true); + NSXMLParser init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLParser.castFromPointer(_ret, retain: true, release: true); } - static NSURLProtectionSpace new1() { - final _ret = _objc_msgSend_2(_class_NSURLProtectionSpace, _sel_new); - return NSURLProtectionSpace._(_ret, retain: false, release: true); + static NSXMLParser new1() { + final _ret = _objc_msgSend_40(_class_NSXMLParser, _sel_new); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } - static NSURLProtectionSpace allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSXMLParser allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSURLProtectionSpace, _sel_allocWithZone_, zone); - return NSURLProtectionSpace._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSXMLParser, _sel_allocWithZone_, zone); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } - static NSURLProtectionSpace alloc() { - final _ret = _objc_msgSend_2(_class_NSURLProtectionSpace, _sel_alloc); - return NSURLProtectionSpace._(_ret, retain: false, release: true); + static NSXMLParser alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLParser, _sel_alloc); + return NSXMLParser.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLProtectionSpace, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLParser, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLProtectionSpace, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLParser, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLProtectionSpace, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSXMLParser, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLProtectionSpace, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSXMLParser, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLProtectionSpace, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLParser, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLProtectionSpace, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLParser, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLProtectionSpace, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLParser, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLProtectionSpace, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLParser, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLProtectionSpace, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLParser, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSURLProtectionSpace = objc.getClass("NSURLProtectionSpace"); -late final _sel_initWithHost_port_protocol_realm_authenticationMethod_ = - objc.registerName("initWithHost:port:protocol:realm:authenticationMethod:"); -final _objc_msgSend_1001 = objc.msgSendPointer +late final _class_NSXMLParser = objc.getClass("NSXMLParser"); +late final _sel_initWithContentsOfURL_ = + objc.registerName("initWithContentsOfURL:"); +late final _sel_initWithStream_ = objc.registerName("initWithStream:"); +final _objc_msgSend_578 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Long, - ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_initWithProxyHost_port_type_realm_authenticationMethod_ = objc - .registerName("initWithProxyHost:port:type:realm:authenticationMethod:"); -late final _sel_realm = objc.registerName("realm"); -late final _sel_receivesCredentialSecurely = - objc.registerName("receivesCredentialSecurely"); -late final _sel_isProxy = objc.registerName("isProxy"); -late final _sel_proxyType = objc.registerName("proxyType"); -late final _sel_protocol = objc.registerName("protocol"); -late final _sel_authenticationMethod = - objc.registerName("authenticationMethod"); -late final _sel_distinguishedNames = objc.registerName("distinguishedNames"); -late final _sel_serverTrust = objc.registerName("serverTrust"); -final _objc_msgSend_1002 = objc.msgSendPointer + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_shouldProcessNamespaces = + objc.registerName("shouldProcessNamespaces"); +late final _sel_setShouldProcessNamespaces_ = + objc.registerName("setShouldProcessNamespaces:"); +late final _sel_shouldReportNamespacePrefixes = + objc.registerName("shouldReportNamespacePrefixes"); +late final _sel_setShouldReportNamespacePrefixes_ = + objc.registerName("setShouldReportNamespacePrefixes:"); + +abstract class NSXMLParserExternalEntityResolvingPolicy { + static const int NSXMLParserResolveExternalEntitiesNever = 0; + static const int NSXMLParserResolveExternalEntitiesNoNetwork = 1; + static const int NSXMLParserResolveExternalEntitiesSameOriginOnly = 2; + static const int NSXMLParserResolveExternalEntitiesAlways = 3; +} + +late final _sel_externalEntityResolvingPolicy = + objc.registerName("externalEntityResolvingPolicy"); +final _objc_msgSend_579 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer<__SecTrust> Function(ffi.Pointer, + ffi.Int32 Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer<__SecTrust> Function( + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setExternalEntityResolvingPolicy_ = + objc.registerName("setExternalEntityResolvingPolicy:"); +final _objc_msgSend_580 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_allowedExternalEntityURLs = + objc.registerName("allowedExternalEntityURLs"); +final _objc_msgSend_581 = 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_582 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_parse = objc.registerName("parse"); +late final _sel_abortParsing = objc.registerName("abortParsing"); +late final _sel_parserError = objc.registerName("parserError"); +late final _sel_shouldResolveExternalEntities = + objc.registerName("shouldResolveExternalEntities"); +late final _sel_setShouldResolveExternalEntities_ = + objc.registerName("setShouldResolveExternalEntities:"); +late final _sel_publicID = objc.registerName("publicID"); +late final _sel_systemID = objc.registerName("systemID"); +late final _sel_lineNumber = objc.registerName("lineNumber"); +late final _sel_columnNumber = objc.registerName("columnNumber"); -class NSURLCredentialStorage extends NSObject { - NSURLCredentialStorage._(ffi.Pointer pointer, +class NSFileWrapper extends objc.NSObject { + NSFileWrapper._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLCredentialStorage] that points to the same underlying object as [other]. - static NSURLCredentialStorage castFrom( - T other) { - return NSURLCredentialStorage._(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.pointer, retain: true, release: true); - /// Returns a [NSURLCredentialStorage] that wraps the given raw object pointer. - static NSURLCredentialStorage castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLCredentialStorage._(other, retain: retain, release: release); - } + /// 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 [NSURLCredentialStorage]. + /// Returns whether [obj] is an instance of [NSFileWrapper]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLCredentialStorage); + obj.pointer, _sel_isKindOfClass_, _class_NSFileWrapper); } - static NSURLCredentialStorage getSharedCredentialStorage() { - final _ret = _objc_msgSend_1003( - _class_NSURLCredentialStorage, _sel_sharedCredentialStorage); - return NSURLCredentialStorage._(_ret, retain: true, release: true); + NSFileWrapper? initWithURL_options_error_(objc.NSURL url, int options, + ffi.Pointer> outError) { + final _ret = _objc_msgSend_583(this.pointer, + _sel_initWithURL_options_error_, url.pointer, options, outError); + return _ret.address == 0 + ? null + : NSFileWrapper.castFromPointer(_ret, retain: true, release: true); } - NSDictionary? credentialsForProtectionSpace_(NSURLProtectionSpace space) { - final _ret = _objc_msgSend_1004( - this.pointer, _sel_credentialsForProtectionSpace_, space.pointer); + NSFileWrapper initDirectoryWithFileWrappers_( + objc.NSDictionary childrenByPreferredName) { + final _ret = _objc_msgSend_409(this.pointer, + _sel_initDirectoryWithFileWrappers_, childrenByPreferredName.pointer); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } + + NSFileWrapper initRegularFileWithContents_(objc.NSData contents) { + final _ret = _objc_msgSend_340( + this.pointer, _sel_initRegularFileWithContents_, contents.pointer); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } + + NSFileWrapper initSymbolicLinkWithDestinationURL_(objc.NSURL url) { + final _ret = _objc_msgSend_320( + this.pointer, _sel_initSymbolicLinkWithDestinationURL_, url.pointer); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); + } + + NSFileWrapper? initWithSerializedRepresentation_( + objc.NSData serializeRepresentation) { + final _ret = _objc_msgSend_341( + this.pointer, + _sel_initWithSerializedRepresentation_, + serializeRepresentation.pointer); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : NSFileWrapper.castFromPointer(_ret, retain: true, release: true); } - NSDictionary get allCredentials { - final _ret = _objc_msgSend_181(this.pointer, _sel_allCredentials); - return NSDictionary._(_ret, retain: true, release: true); + NSFileWrapper? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); + return _ret.address == 0 + ? null + : NSFileWrapper.castFromPointer(_ret, retain: true, release: true); } - void setCredential_forProtectionSpace_( - NSURLCredential credential, NSURLProtectionSpace space) { - _objc_msgSend_1005(this.pointer, _sel_setCredential_forProtectionSpace_, - credential.pointer, space.pointer); + bool get directory { + return _objc_msgSend_7(this.pointer, _sel_isDirectory); } - void removeCredential_forProtectionSpace_( - NSURLCredential credential, NSURLProtectionSpace space) { - _objc_msgSend_1005(this.pointer, _sel_removeCredential_forProtectionSpace_, - credential.pointer, space.pointer); + bool get regularFile { + return _objc_msgSend_7(this.pointer, _sel_isRegularFile); } - void removeCredential_forProtectionSpace_options_(NSURLCredential credential, - NSURLProtectionSpace space, NSDictionary? options) { - _objc_msgSend_1006( - this.pointer, - _sel_removeCredential_forProtectionSpace_options_, - credential.pointer, - space.pointer, - options?.pointer ?? ffi.nullptr); + bool get symbolicLink { + return _objc_msgSend_7(this.pointer, _sel_isSymbolicLink); } - NSURLCredential? defaultCredentialForProtectionSpace_( - NSURLProtectionSpace space) { - final _ret = _objc_msgSend_1007( - this.pointer, _sel_defaultCredentialForProtectionSpace_, space.pointer); + objc.NSString? get preferredFilename { + final _ret = _objc_msgSend_13(this.pointer, _sel_preferredFilename); return _ret.address == 0 ? null - : NSURLCredential._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void setDefaultCredential_forProtectionSpace_( - NSURLCredential credential, NSURLProtectionSpace space) { - _objc_msgSend_1005( - this.pointer, - _sel_setDefaultCredential_forProtectionSpace_, - credential.pointer, - space.pointer); + set preferredFilename(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setPreferredFilename_, + value?.pointer ?? ffi.nullptr); } - void getCredentialsForProtectionSpace_task_completionHandler_( - NSURLProtectionSpace protectionSpace, - NSURLSessionTask task, - ObjCBlock_ffiVoid_NSDictionary completionHandler) { - _objc_msgSend_1008( - this.pointer, - _sel_getCredentialsForProtectionSpace_task_completionHandler_, - protectionSpace.pointer, - task.pointer, - completionHandler.pointer); + objc.NSString? get filename { + final _ret = _objc_msgSend_13(this.pointer, _sel_filename); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void setCredential_forProtectionSpace_task_(NSURLCredential credential, - NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { - _objc_msgSend_1009( + set filename(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setFilename_, value?.pointer ?? ffi.nullptr); + } + + objc.NSDictionary get fileAttributes { + final _ret = _objc_msgSend_112(this.pointer, _sel_fileAttributes); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + set fileAttributes(objc.NSDictionary value) { + return _objc_msgSend_113( + this.pointer, _sel_setFileAttributes_, value.pointer); + } + + bool matchesContentsOfURL_(objc.NSURL url) { + return _objc_msgSend_305( + this.pointer, _sel_matchesContentsOfURL_, url.pointer); + } + + bool readFromURL_options_error_(objc.NSURL url, int options, + ffi.Pointer> outError) { + return _objc_msgSend_584(this.pointer, _sel_readFromURL_options_error_, + url.pointer, options, outError); + } + + bool writeToURL_options_originalContentsURL_error_( + objc.NSURL url, + int options, + objc.NSURL? originalContentsURL, + ffi.Pointer> outError) { + return _objc_msgSend_585( this.pointer, - _sel_setCredential_forProtectionSpace_task_, - credential.pointer, - protectionSpace.pointer, - task.pointer); + _sel_writeToURL_options_originalContentsURL_error_, + url.pointer, + options, + originalContentsURL?.pointer ?? ffi.nullptr, + outError); } - void removeCredential_forProtectionSpace_options_task_( - NSURLCredential credential, - NSURLProtectionSpace protectionSpace, - NSDictionary? options, - NSURLSessionTask task) { - _objc_msgSend_1010( + objc.NSData? get serializedRepresentation { + final _ret = _objc_msgSend_325(this.pointer, _sel_serializedRepresentation); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString addFileWrapper_(NSFileWrapper child) { + final _ret = + _objc_msgSend_586(this.pointer, _sel_addFileWrapper_, child.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString addRegularFileWithContents_preferredFilename_( + objc.NSData data, objc.NSString fileName) { + final _ret = _objc_msgSend_587( this.pointer, - _sel_removeCredential_forProtectionSpace_options_task_, - credential.pointer, - protectionSpace.pointer, - options?.pointer ?? ffi.nullptr, - task.pointer); + _sel_addRegularFileWithContents_preferredFilename_, + data.pointer, + fileName.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void getDefaultCredentialForProtectionSpace_task_completionHandler_( - NSURLProtectionSpace space, - NSURLSessionTask task, - ObjCBlock_ffiVoid_NSURLCredential completionHandler) { - _objc_msgSend_1011( + void removeFileWrapper_(NSFileWrapper child) { + _objc_msgSend_588(this.pointer, _sel_removeFileWrapper_, child.pointer); + } + + objc.NSDictionary? get fileWrappers { + final _ret = _objc_msgSend_65(this.pointer, _sel_fileWrappers); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString? keyForFileWrapper_(NSFileWrapper child) { + final _ret = + _objc_msgSend_589(this.pointer, _sel_keyForFileWrapper_, child.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSData? get regularFileContents { + final _ret = _objc_msgSend_325(this.pointer, _sel_regularFileContents); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSURL? get symbolicLinkDestinationURL { + final _ret = + _objc_msgSend_10(this.pointer, _sel_symbolicLinkDestinationURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? initWithPath_(objc.NSString path) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithPath_, path.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject initSymbolicLinkWithDestination_(objc.NSString path) { + final _ret = _objc_msgSend_35( + this.pointer, _sel_initSymbolicLinkWithDestination_, path.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool needsToBeUpdatedFromPath_(objc.NSString path) { + return _objc_msgSend_51( + this.pointer, _sel_needsToBeUpdatedFromPath_, path.pointer); + } + + bool updateFromPath_(objc.NSString path) { + return _objc_msgSend_51(this.pointer, _sel_updateFromPath_, path.pointer); + } + + bool writeToFile_atomically_updateFilenames_( + objc.NSString path, bool atomicFlag, bool updateFilenamesFlag) { + return _objc_msgSend_590( this.pointer, - _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_, - space.pointer, - task.pointer, - completionHandler.pointer); + _sel_writeToFile_atomically_updateFilenames_, + path.pointer, + atomicFlag, + updateFilenamesFlag); } - void setDefaultCredential_forProtectionSpace_task_(NSURLCredential credential, - NSURLProtectionSpace protectionSpace, NSURLSessionTask task) { - _objc_msgSend_1009( + objc.NSString addFileWithPath_(objc.NSString path) { + final _ret = + _objc_msgSend_297(this.pointer, _sel_addFileWithPath_, path.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString addSymbolicLinkWithDestination_preferredFilename_( + objc.NSString path, objc.NSString filename) { + final _ret = _objc_msgSend_591( this.pointer, - _sel_setDefaultCredential_forProtectionSpace_task_, - credential.pointer, - protectionSpace.pointer, - task.pointer); + _sel_addSymbolicLinkWithDestination_preferredFilename_, + path.pointer, + filename.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString symbolicLinkDestination() { + final _ret = _objc_msgSend_12(this.pointer, _sel_symbolicLinkDestination); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } @override - NSURLCredentialStorage init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLCredentialStorage._(_ret, retain: true, release: true); + NSFileWrapper init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSFileWrapper.castFromPointer(_ret, retain: true, release: true); } - static NSURLCredentialStorage new1() { - final _ret = _objc_msgSend_2(_class_NSURLCredentialStorage, _sel_new); - return NSURLCredentialStorage._(_ret, retain: false, release: true); + static NSFileWrapper new1() { + final _ret = _objc_msgSend_40(_class_NSFileWrapper, _sel_new); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } - static NSURLCredentialStorage allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSURLCredentialStorage, _sel_allocWithZone_, zone); - return NSURLCredentialStorage._(_ret, retain: false, release: true); + static NSFileWrapper allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSFileWrapper, _sel_allocWithZone_, zone); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } - static NSURLCredentialStorage alloc() { - final _ret = _objc_msgSend_2(_class_NSURLCredentialStorage, _sel_alloc); - return NSURLCredentialStorage._(_ret, retain: false, release: true); + static NSFileWrapper alloc() { + final _ret = _objc_msgSend_40(_class_NSFileWrapper, _sel_alloc); + return NSFileWrapper.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLCredentialStorage, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSFileWrapper, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLCredentialStorage, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSFileWrapper, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLCredentialStorage, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSFileWrapper, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLCredentialStorage, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSFileWrapper, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLCredentialStorage, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSFileWrapper, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLCredentialStorage, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSFileWrapper, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLCredentialStorage, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSFileWrapper, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLCredentialStorage, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSFileWrapper, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLCredentialStorage, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSFileWrapper, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSURLCredentialStorage = - objc.getClass("NSURLCredentialStorage"); -late final _sel_sharedCredentialStorage = - objc.registerName("sharedCredentialStorage"); -final _objc_msgSend_1003 = objc.msgSendPointer +late final _class_NSFileWrapper = objc.getClass("NSFileWrapper"); + +abstract class NSFileWrapperReadingOptions { + static const int NSFileWrapperReadingImmediate = 1; + static const int NSFileWrapperReadingWithoutMapping = 2; +} + +late final _sel_initWithURL_options_error_ = + objc.registerName("initWithURL:options:error:"); +final _objc_msgSend_583 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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_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_584 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + +abstract class NSFileWrapperWritingOptions { + static const int NSFileWrapperWritingAtomic = 1; + static const int NSFileWrapperWritingWithNameUpdating = 2; +} + +late final _sel_writeToURL_options_originalContentsURL_error_ = + objc.registerName("writeToURL:options:originalContentsURL:error:"); +final _objc_msgSend_585 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer>)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_credentialsForProtectionSpace_ = - objc.registerName("credentialsForProtectionSpace:"); -final _objc_msgSend_1004 = objc.msgSendPointer + 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:"); +final _objc_msgSend_586 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -50330,46 +27462,36 @@ final _objc_msgSend_1004 = objc.msgSendPointer .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_1005 = objc.msgSendPointer +late final _sel_addRegularFileWithContents_preferredFilename_ = + objc.registerName("addRegularFileWithContents:preferredFilename:"); +final _objc_msgSend_587 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( + ffi.Pointer 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_1006 = objc.msgSendPointer +late final _sel_removeFileWrapper_ = objc.registerName("removeFileWrapper:"); +final _objc_msgSend_588 = 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_1007 = objc.msgSendPointer + 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_589 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -50379,544 +27501,445 @@ final _objc_msgSend_1007 = objc.msgSendPointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDefaultCredential_forProtectionSpace_ = - objc.registerName("setDefaultCredential:forProtectionSpace:"); -void _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - block.ref.target - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSDictionary_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSDictionary_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSDictionary_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSDictionary_closureRegistry[block.ref.target.address]!( - arg0); - -class ObjCBlock_ffiVoid_NSDictionary extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSDictionary._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) - : super(pointer, retain: retain, release: release); - - /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSDictionary castFromPointer( - ffi.Pointer pointer, - {bool retain = false, - bool release = false}) { - return ObjCBlock_ffiVoid_NSDictionary._(pointer, - retain: retain, release: release); - } - - /// Creates a block from a C function pointer. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; - - /// Creates a block from a Dart function. - /// - /// This block must be invoked by native code running on the same thread as - /// the isolate that registered it. Invoking the block on the wrong thread - /// will result in a crash. - ObjCBlock_ffiVoid_NSDictionary.fromFunction(void Function(NSDictionary?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSDictionary._(arg0, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; - - /// Creates a listener block from a Dart function. - /// - /// This is based on FFI's NativeCallable.listener, and has the same - /// capabilities and limitations. This block can be invoked from any thread, - /// but only supports void functions, and is not run synchronously. See - /// NativeCallable.listener for more details. - /// - /// Note that unlike the default behavior of NativeCallable.listener, listener - /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSDictionary.listener(void Function(NSDictionary?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSDictionary_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSDictionary_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSDictionary._(arg0, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSDictionary? arg0) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr); -} - -late final _sel_getCredentialsForProtectionSpace_task_completionHandler_ = objc - .registerName("getCredentialsForProtectionSpace:task:completionHandler:"); -final _objc_msgSend_1008 = 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_1009 = objc.msgSendPointer +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_updateFromPath_ = objc.registerName("updateFromPath:"); +late final _sel_writeToFile_atomically_updateFilenames_ = + objc.registerName("writeToFile:atomically:updateFilenames:"); +final _objc_msgSend_590 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Bool Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool, + ffi.Bool)>>() .asFunction< - void Function( + bool 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_1010 = objc.msgSendPointer + bool, + bool)>(); +late final _sel_addFileWithPath_ = objc.registerName("addFileWithPath:"); +late final _sel_addSymbolicLinkWithDestination_preferredFilename_ = + objc.registerName("addSymbolicLinkWithDestination:preferredFilename:"); +final _objc_msgSend_591 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function( + ffi.Pointer 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); -final _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSURLCredential_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} +late final _sel_symbolicLinkDestination = + objc.registerName("symbolicLinkDestination"); -void _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSURLCredential_closureRegistry[ - block.ref.target.address]!(arg0); +class NSURLSession extends objc.NSObject { + NSURLSession._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); -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); + /// Constructs a [NSURLSession] that points to the same underlying object as [other]. + NSURLSession.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// 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); + /// 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 [NSURLSession]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSession); } - /// 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.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLCredential_fnPtrTrampoline) - .cast(), - ptr.cast())); - static ffi.Pointer? _cFuncTrampoline; + static NSURLSession getSharedSession() { + final _ret = _objc_msgSend_592(_class_NSURLSession, _sel_sharedSession); + return NSURLSession.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. - ObjCBlock_ffiVoid_NSURLCredential.fromFunction( - void Function(NSURLCredential?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSURLCredential._(arg0, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; + static NSURLSession sessionWithConfiguration_( + NSURLSessionConfiguration configuration) { + final _ret = _objc_msgSend_608(_class_NSURLSession, + _sel_sessionWithConfiguration_, configuration.pointer); + return NSURLSession.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_NSURLCredential.listener(void Function(NSURLCredential?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURLCredential_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURLCredential_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSURLCredential._(arg0, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; + static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( + NSURLSessionConfiguration configuration, + objc.NSObject? delegate, + NSOperationQueue? queue) { + final _ret = _objc_msgSend_609( + _class_NSURLSession, + _sel_sessionWithConfiguration_delegate_delegateQueue_, + configuration.pointer, + delegate?.pointer ?? ffi.nullptr, + queue?.pointer ?? ffi.nullptr); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); + } - void call(NSURLCredential? arg0) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr); -} + NSOperationQueue get delegateQueue { + final _ret = _objc_msgSend_460(this.pointer, _sel_delegateQueue); + return NSOperationQueue.castFromPointer(_ret, retain: true, release: true); + } -late final _sel_getDefaultCredentialForProtectionSpace_task_completionHandler_ = - objc.registerName( - "getDefaultCredentialForProtectionSpace:task:completionHandler:"); -final _objc_msgSend_1011 = 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:"); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } -class NSURLProtocol extends NSObject { - NSURLProtocol._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + NSURLSessionConfiguration get configuration { + final _ret = _objc_msgSend_593(this.pointer, _sel_configuration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); + } - /// Returns a [NSURLProtocol] that points to the same underlying object as [other]. - static NSURLProtocol castFrom(T other) { - return NSURLProtocol._(other.pointer, retain: true, release: true); + objc.NSString? get sessionDescription { + final _ret = _objc_msgSend_13(this.pointer, _sel_sessionDescription); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns a [NSURLProtocol] that wraps the given raw object pointer. - static NSURLProtocol castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLProtocol._(other, retain: retain, release: release); + set sessionDescription(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setSessionDescription_, + value?.pointer ?? ffi.nullptr); } - /// Returns whether [obj] is an instance of [NSURLProtocol]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLProtocol); + void finishTasksAndInvalidate() { + _objc_msgSend_82(this.pointer, _sel_finishTasksAndInvalidate); } - NSURLProtocol initWithRequest_cachedResponse_client_(NSURLRequest request, - NSCachedURLResponse? cachedResponse, NSObject? client) { - final _ret = _objc_msgSend_1012( + void invalidateAndCancel() { + _objc_msgSend_82(this.pointer, _sel_invalidateAndCancel); + } + + void resetWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { + _objc_msgSend_249(this.pointer, _sel_resetWithCompletionHandler_, + completionHandler.pointer); + } + + void flushWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { + _objc_msgSend_249(this.pointer, _sel_flushWithCompletionHandler_, + completionHandler.pointer); + } + + void getTasksWithCompletionHandler_( + ObjCBlock_ffiVoid_NSArray_NSArray_NSArray completionHandler) { + _objc_msgSend_610(this.pointer, _sel_getTasksWithCompletionHandler_, + completionHandler.pointer); + } + + void getAllTasksWithCompletionHandler_( + ObjCBlock_ffiVoid_NSArray1 completionHandler) { + _objc_msgSend_611(this.pointer, _sel_getAllTasksWithCompletionHandler_, + completionHandler.pointer); + } + + NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_612( + this.pointer, _sel_dataTaskWithRequest_, request.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionDataTask dataTaskWithURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_613(this.pointer, _sel_dataTaskWithURL_, url.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( + NSURLRequest request, objc.NSURL fileURL) { + final _ret = _objc_msgSend_615(this.pointer, + _sel_uploadTaskWithRequest_fromFile_, request.pointer, fileURL.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionUploadTask uploadTaskWithRequest_fromData_( + NSURLRequest request, objc.NSData bodyData) { + final _ret = _objc_msgSend_616( this.pointer, - _sel_initWithRequest_cachedResponse_client_, + _sel_uploadTaskWithRequest_fromData_, request.pointer, - cachedResponse?.pointer ?? ffi.nullptr, - client?.pointer ?? ffi.nullptr); - return NSURLProtocol._(_ret, retain: true, release: true); + bodyData.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - NSObject? get client { - final _ret = _objc_msgSend_17(this.pointer, _sel_client); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + NSURLSessionUploadTask uploadTaskWithResumeData_(objc.NSData resumeData) { + final _ret = _objc_msgSend_617( + this.pointer, _sel_uploadTaskWithResumeData_, resumeData.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - NSURLRequest get request { - final _ret = _objc_msgSend_988(this.pointer, _sel_request); - return NSURLRequest._(_ret, retain: true, release: true); + NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_618( + this.pointer, _sel_uploadTaskWithStreamedRequest_, request.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - NSCachedURLResponse? get cachedResponse { - final _ret = _objc_msgSend_1013(this.pointer, _sel_cachedResponse); - return _ret.address == 0 - ? null - : NSCachedURLResponse._(_ret, retain: true, release: true); + NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_619( + this.pointer, _sel_downloadTaskWithRequest_, request.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - static bool canInitWithRequest_(NSURLRequest request) { - return _objc_msgSend_990( - _class_NSURLProtocol, _sel_canInitWithRequest_, request.pointer); + NSURLSessionDownloadTask downloadTaskWithURL_(objc.NSURL url) { + final _ret = + _objc_msgSend_620(this.pointer, _sel_downloadTaskWithURL_, url.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - static NSURLRequest canonicalRequestForRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_1014(_class_NSURLProtocol, - _sel_canonicalRequestForRequest_, request.pointer); - return NSURLRequest._(_ret, retain: true, release: true); + NSURLSessionDownloadTask downloadTaskWithResumeData_(objc.NSData resumeData) { + final _ret = _objc_msgSend_621( + this.pointer, _sel_downloadTaskWithResumeData_, resumeData.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - static bool requestIsCacheEquivalent_toRequest_( - NSURLRequest a, NSURLRequest b) { - return _objc_msgSend_1015(_class_NSURLProtocol, - _sel_requestIsCacheEquivalent_toRequest_, a.pointer, b.pointer); + NSURLSessionStreamTask streamTaskWithHostName_port_( + objc.NSString hostname, int port) { + final _ret = _objc_msgSend_624(this.pointer, + _sel_streamTaskWithHostName_port_, hostname.pointer, port); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } - void startLoading() { - _objc_msgSend_1(this.pointer, _sel_startLoading); + NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { + final _ret = _objc_msgSend_633( + this.pointer, _sel_streamTaskWithNetService_, service.pointer); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } - void stopLoading() { - _objc_msgSend_1(this.pointer, _sel_stopLoading); + NSURLSessionWebSocketTask webSocketTaskWithURL_(objc.NSURL url) { + final _ret = _objc_msgSend_640( + this.pointer, _sel_webSocketTaskWithURL_, url.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - static NSObject? propertyForKey_inRequest_( - NSString key, NSURLRequest request) { - final _ret = _objc_msgSend_1016(_class_NSURLProtocol, - _sel_propertyForKey_inRequest_, key.pointer, request.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( + objc.NSURL url, objc.NSArray protocols) { + final _ret = _objc_msgSend_641(this.pointer, + _sel_webSocketTaskWithURL_protocols_, url.pointer, protocols.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - static void setProperty_forKey_inRequest_( - NSObject value, NSString key, NSMutableURLRequest request) { - _objc_msgSend_1023(_class_NSURLProtocol, _sel_setProperty_forKey_inRequest_, - value.pointer, key.pointer, request.pointer); + NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { + final _ret = _objc_msgSend_642( + this.pointer, _sel_webSocketTaskWithRequest_, request.pointer); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - static void removePropertyForKey_inRequest_( - NSString key, NSMutableURLRequest request) { - _objc_msgSend_1024(_class_NSURLProtocol, - _sel_removePropertyForKey_inRequest_, key.pointer, request.pointer); + @override + NSURLSession init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSession.castFromPointer(_ret, retain: true, release: true); } - static bool registerClass_(NSObject protocolClass) { - return _objc_msgSend_0( - _class_NSURLProtocol, _sel_registerClass_, protocolClass.pointer); + static NSURLSession new1() { + final _ret = _objc_msgSend_40(_class_NSURLSession, _sel_new); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); + } + + NSURLSessionDataTask dataTaskWithRequest_completionHandler_( + NSURLRequest request, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_643( + this.pointer, + _sel_dataTaskWithRequest_completionHandler_, + request.pointer, + completionHandler.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); + } + + NSURLSessionDataTask dataTaskWithURL_completionHandler_(objc.NSURL url, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_644( + this.pointer, + _sel_dataTaskWithURL_completionHandler_, + url.pointer, + completionHandler.pointer); + return NSURLSessionDataTask.castFromPointer(_ret, + retain: true, release: true); } - static void unregisterClass_(NSObject protocolClass) { - _objc_msgSend_15( - _class_NSURLProtocol, _sel_unregisterClass_, protocolClass.pointer); + NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( + NSURLRequest request, + objc.NSURL fileURL, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_645( + this.pointer, + _sel_uploadTaskWithRequest_fromFile_completionHandler_, + request.pointer, + fileURL.pointer, + completionHandler.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - static bool canInitWithTask_(NSURLSessionTask task) { - return _objc_msgSend_1025( - _class_NSURLProtocol, _sel_canInitWithTask_, task.pointer); + NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( + NSURLRequest request, + objc.NSData? bodyData, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_646( + this.pointer, + _sel_uploadTaskWithRequest_fromData_completionHandler_, + request.pointer, + bodyData?.pointer ?? ffi.nullptr, + completionHandler.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - NSURLProtocol initWithTask_cachedResponse_client_(NSURLSessionTask task, - NSCachedURLResponse? cachedResponse, NSObject? client) { - final _ret = _objc_msgSend_1026( + NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_( + objc.NSData resumeData, + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_647( this.pointer, - _sel_initWithTask_cachedResponse_client_, - task.pointer, - cachedResponse?.pointer ?? ffi.nullptr, - client?.pointer ?? ffi.nullptr); - return NSURLProtocol._(_ret, retain: true, release: true); + _sel_uploadTaskWithResumeData_completionHandler_, + resumeData.pointer, + completionHandler.pointer); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - NSURLSessionTask? get task { - final _ret = _objc_msgSend_1027(this.pointer, _sel_task); - return _ret.address == 0 - ? null - : NSURLSessionTask._(_ret, retain: true, release: true); + NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( + NSURLRequest request, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_648( + this.pointer, + _sel_downloadTaskWithRequest_completionHandler_, + request.pointer, + completionHandler.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - @override - NSURLProtocol init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLProtocol._(_ret, retain: true, release: true); + NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_( + objc.NSURL url, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_649( + this.pointer, + _sel_downloadTaskWithURL_completionHandler_, + url.pointer, + completionHandler.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - static NSURLProtocol new1() { - final _ret = _objc_msgSend_2(_class_NSURLProtocol, _sel_new); - return NSURLProtocol._(_ret, retain: false, release: true); + NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( + objc.NSData resumeData, + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { + final _ret = _objc_msgSend_650( + this.pointer, + _sel_downloadTaskWithResumeData_completionHandler_, + resumeData.pointer, + completionHandler.pointer); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - static NSURLProtocol allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSURLSession allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSURLProtocol, _sel_allocWithZone_, zone); - return NSURLProtocol._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSURLSession, _sel_allocWithZone_, zone); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); } - static NSURLProtocol alloc() { - final _ret = _objc_msgSend_2(_class_NSURLProtocol, _sel_alloc); - return NSURLProtocol._(_ret, retain: false, release: true); + static NSURLSession alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSession, _sel_alloc); + return NSURLSession.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLProtocol, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSession, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLProtocol, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSession, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLProtocol, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLSession, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLProtocol, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSURLSession, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLProtocol, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSession, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLProtocol, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSession, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLProtocol, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSession, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLProtocol, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSession, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSURLProtocol, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSURLSession, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_1012 = 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_1013 = objc.msgSendPointer +late final _class_NSURLSession = objc.getClass("NSURLSession"); +late final _sel_sharedSession = objc.registerName("sharedSession"); +final _objc_msgSend_592 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -50924,393 +27947,512 @@ final _objc_msgSend_1013 = objc.msgSendPointer .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_1014 = 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_1015 = 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_1016 = 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)>(); -class NSMutableURLRequest extends NSURLRequest { - NSMutableURLRequest._(ffi.Pointer pointer, +class NSURLSessionConfiguration extends objc.NSObject { + NSURLSessionConfiguration._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSMutableURLRequest] that points to the same underlying object as [other]. - static NSMutableURLRequest castFrom(T other) { - return NSMutableURLRequest._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSURLSessionConfiguration] that points to the same underlying object as [other]. + NSURLSessionConfiguration.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSMutableURLRequest] that wraps the given raw object pointer. - static NSMutableURLRequest castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSMutableURLRequest._(other, retain: retain, release: release); - } + /// 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); - /// Returns whether [obj] is an instance of [NSMutableURLRequest]. + /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSMutableURLRequest); + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionConfiguration); } - @override - NSURL? get URL { - final _ret = _objc_msgSend_45(this.pointer, _sel_URL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + static NSURLSessionConfiguration getDefaultSessionConfiguration() { + final _ret = _objc_msgSend_593( + _class_NSURLSessionConfiguration, _sel_defaultSessionConfiguration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - set URL(NSURL? value) { - return _objc_msgSend_671( - this.pointer, _sel_setURL_, value?.pointer ?? ffi.nullptr); + static NSURLSessionConfiguration getEphemeralSessionConfiguration() { + final _ret = _objc_msgSend_593( + _class_NSURLSessionConfiguration, _sel_ephemeralSessionConfiguration); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - @override - int get cachePolicy { - return _objc_msgSend_859(this.pointer, _sel_cachePolicy); + static NSURLSessionConfiguration + backgroundSessionConfigurationWithIdentifier_(objc.NSString identifier) { + final _ret = _objc_msgSend_594(_class_NSURLSessionConfiguration, + _sel_backgroundSessionConfigurationWithIdentifier_, identifier.pointer); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - set cachePolicy(int value) { - return _objc_msgSend_1017(this.pointer, _sel_setCachePolicy_, value); + objc.NSString? get identifier { + final _ret = _objc_msgSend_13(this.pointer, _sel_identifier); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - double get timeoutInterval { + int get requestCachePolicy { + return _objc_msgSend_322(this.pointer, _sel_requestCachePolicy); + } + + set requestCachePolicy(int value) { + return _objc_msgSend_567(this.pointer, _sel_setRequestCachePolicy_, value); + } + + double get timeoutIntervalForRequest { return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_timeoutInterval) - : _objc_msgSend_165(this.pointer, _sel_timeoutInterval); + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutIntervalForRequest) + : _objc_msgSend_115(this.pointer, _sel_timeoutIntervalForRequest); } - set timeoutInterval(double value) { - return _objc_msgSend_542(this.pointer, _sel_setTimeoutInterval_, value); + set timeoutIntervalForRequest(double value) { + return _objc_msgSend_212( + this.pointer, _sel_setTimeoutIntervalForRequest_, value); } - @override - NSURL? get mainDocumentURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_mainDocumentURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + double get timeoutIntervalForResource { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_timeoutIntervalForResource) + : _objc_msgSend_115(this.pointer, _sel_timeoutIntervalForResource); } - set mainDocumentURL(NSURL? value) { - return _objc_msgSend_671( - this.pointer, _sel_setMainDocumentURL_, value?.pointer ?? ffi.nullptr); + set timeoutIntervalForResource(double value) { + return _objc_msgSend_212( + this.pointer, _sel_setTimeoutIntervalForResource_, value); } - @override int get networkServiceType { - return _objc_msgSend_860(this.pointer, _sel_networkServiceType); + return _objc_msgSend_323(this.pointer, _sel_networkServiceType); } set networkServiceType(int value) { - return _objc_msgSend_1018(this.pointer, _sel_setNetworkServiceType_, value); + return _objc_msgSend_568(this.pointer, _sel_setNetworkServiceType_, value); } - @override bool get allowsCellularAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsCellularAccess); + return _objc_msgSend_7(this.pointer, _sel_allowsCellularAccess); } set allowsCellularAccess(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAllowsCellularAccess_, value); + return _objc_msgSend_41(this.pointer, _sel_setAllowsCellularAccess_, value); } - @override bool get allowsExpensiveNetworkAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsExpensiveNetworkAccess); + return _objc_msgSend_7(this.pointer, _sel_allowsExpensiveNetworkAccess); } set allowsExpensiveNetworkAccess(bool value) { - return _objc_msgSend_527( + return _objc_msgSend_41( this.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); } - @override bool get allowsConstrainedNetworkAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsConstrainedNetworkAccess); + return _objc_msgSend_7(this.pointer, _sel_allowsConstrainedNetworkAccess); } set allowsConstrainedNetworkAccess(bool value) { - return _objc_msgSend_527( + return _objc_msgSend_41( this.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); } - @override - bool get assumesHTTP3Capable { - return _objc_msgSend_12(this.pointer, _sel_assumesHTTP3Capable); + bool get requiresDNSSECValidation { + return _objc_msgSend_7(this.pointer, _sel_requiresDNSSECValidation); } - set assumesHTTP3Capable(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setAssumesHTTP3Capable_, value); + set requiresDNSSECValidation(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setRequiresDNSSECValidation_, value); } - @override - int get attribution { - return _objc_msgSend_861(this.pointer, _sel_attribution); + bool get waitsForConnectivity { + return _objc_msgSend_7(this.pointer, _sel_waitsForConnectivity); } - set attribution(int value) { - return _objc_msgSend_1019(this.pointer, _sel_setAttribution_, value); + set waitsForConnectivity(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setWaitsForConnectivity_, value); } - @override - bool get requiresDNSSECValidation { - return _objc_msgSend_12(this.pointer, _sel_requiresDNSSECValidation); + bool get discretionary { + return _objc_msgSend_7(this.pointer, _sel_isDiscretionary); } - set requiresDNSSECValidation(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setRequiresDNSSECValidation_, value); + set discretionary(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setDiscretionary_, value); } - NSString get HTTPMethod { - final _ret = _objc_msgSend_21(this.pointer, _sel_HTTPMethod); - return NSString._(_ret, retain: true, release: true); + objc.NSString? get sharedContainerIdentifier { + final _ret = _objc_msgSend_13(this.pointer, _sel_sharedContainerIdentifier); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set HTTPMethod(NSString value) { - return _objc_msgSend_646(this.pointer, _sel_setHTTPMethod_, value.pointer); + set sharedContainerIdentifier(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setSharedContainerIdentifier_, + value?.pointer ?? ffi.nullptr); } - @override - NSDictionary? get allHTTPHeaderFields { - final _ret = _objc_msgSend_390(this.pointer, _sel_allHTTPHeaderFields); + bool get sessionSendsLaunchEvents { + return _objc_msgSend_7(this.pointer, _sel_sessionSendsLaunchEvents); + } + + set sessionSendsLaunchEvents(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setSessionSendsLaunchEvents_, value); + } + + objc.NSDictionary? get connectionProxyDictionary { + final _ret = _objc_msgSend_65(this.pointer, _sel_connectionProxyDictionary); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set allHTTPHeaderFields(NSDictionary? value) { - return _objc_msgSend_634(this.pointer, _sel_setAllHTTPHeaderFields_, + set connectionProxyDictionary(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setConnectionProxyDictionary_, value?.pointer ?? ffi.nullptr); } - void setValue_forHTTPHeaderField_(NSString? value, NSString field) { - _objc_msgSend_1020(this.pointer, _sel_setValue_forHTTPHeaderField_, - value?.pointer ?? ffi.nullptr, field.pointer); + int get TLSMinimumSupportedProtocol { + return _objc_msgSend_595(this.pointer, _sel_TLSMinimumSupportedProtocol); } - void addValue_forHTTPHeaderField_(NSString value, NSString field) { - _objc_msgSend_551(this.pointer, _sel_addValue_forHTTPHeaderField_, - value.pointer, field.pointer); + set TLSMinimumSupportedProtocol(int value) { + return _objc_msgSend_596( + this.pointer, _sel_setTLSMinimumSupportedProtocol_, value); } - @override - NSData? get HTTPBody { - final _ret = _objc_msgSend_286(this.pointer, _sel_HTTPBody); + int get TLSMaximumSupportedProtocol { + return _objc_msgSend_595(this.pointer, _sel_TLSMaximumSupportedProtocol); + } + + set TLSMaximumSupportedProtocol(int value) { + return _objc_msgSend_596( + this.pointer, _sel_setTLSMaximumSupportedProtocol_, value); + } + + int get TLSMinimumSupportedProtocolVersion { + return _objc_msgSend_597( + this.pointer, _sel_TLSMinimumSupportedProtocolVersion); + } + + set TLSMinimumSupportedProtocolVersion(int value) { + return _objc_msgSend_598( + this.pointer, _sel_setTLSMinimumSupportedProtocolVersion_, value); + } + + int get TLSMaximumSupportedProtocolVersion { + return _objc_msgSend_597( + this.pointer, _sel_TLSMaximumSupportedProtocolVersion); + } + + set TLSMaximumSupportedProtocolVersion(int value) { + return _objc_msgSend_598( + this.pointer, _sel_setTLSMaximumSupportedProtocolVersion_, value); + } + + bool get HTTPShouldUsePipelining { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldUsePipelining); + } + + set HTTPShouldUsePipelining(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setHTTPShouldUsePipelining_, value); + } + + bool get HTTPShouldSetCookies { + return _objc_msgSend_7(this.pointer, _sel_HTTPShouldSetCookies); + } + + set HTTPShouldSetCookies(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setHTTPShouldSetCookies_, value); + } + + int get HTTPCookieAcceptPolicy { + return _objc_msgSend_318(this.pointer, _sel_HTTPCookieAcceptPolicy); + } + + set HTTPCookieAcceptPolicy(int value) { + return _objc_msgSend_319( + this.pointer, _sel_setHTTPCookieAcceptPolicy_, value); + } + + objc.NSDictionary? get HTTPAdditionalHeaders { + final _ret = _objc_msgSend_65(this.pointer, _sel_HTTPAdditionalHeaders); return _ret.address == 0 ? null - : NSData._(_ret, retain: true, release: true); + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set HTTPBody(NSData? value) { - return _objc_msgSend_1021( - this.pointer, _sel_setHTTPBody_, value?.pointer ?? ffi.nullptr); + set HTTPAdditionalHeaders(objc.NSDictionary? value) { + return _objc_msgSend_173(this.pointer, _sel_setHTTPAdditionalHeaders_, + value?.pointer ?? ffi.nullptr); } - @override - NSInputStream? get HTTPBodyStream { - final _ret = _objc_msgSend_875(this.pointer, _sel_HTTPBodyStream); + int get HTTPMaximumConnectionsPerHost { + return _objc_msgSend_114(this.pointer, _sel_HTTPMaximumConnectionsPerHost); + } + + set HTTPMaximumConnectionsPerHost(int value) { + return _objc_msgSend_134( + this.pointer, _sel_setHTTPMaximumConnectionsPerHost_, value); + } + + NSHTTPCookieStorage? get HTTPCookieStorage { + final _ret = _objc_msgSend_599(this.pointer, _sel_HTTPCookieStorage); return _ret.address == 0 ? null - : NSInputStream._(_ret, retain: true, release: true); + : NSHTTPCookieStorage.castFromPointer(_ret, + retain: true, release: true); } - set HTTPBodyStream(NSInputStream? value) { - return _objc_msgSend_1022( - this.pointer, _sel_setHTTPBodyStream_, value?.pointer ?? ffi.nullptr); + set HTTPCookieStorage(NSHTTPCookieStorage? value) { + return _objc_msgSend_600(this.pointer, _sel_setHTTPCookieStorage_, + value?.pointer ?? ffi.nullptr); } - @override - bool get HTTPShouldHandleCookies { - return _objc_msgSend_12(this.pointer, _sel_HTTPShouldHandleCookies); + NSURLCredentialStorage? get URLCredentialStorage { + final _ret = _objc_msgSend_601(this.pointer, _sel_URLCredentialStorage); + return _ret.address == 0 + ? null + : NSURLCredentialStorage.castFromPointer(_ret, + retain: true, release: true); } - set HTTPShouldHandleCookies(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setHTTPShouldHandleCookies_, value); + set URLCredentialStorage(NSURLCredentialStorage? value) { + return _objc_msgSend_602(this.pointer, _sel_setURLCredentialStorage_, + value?.pointer ?? ffi.nullptr); } - @override - bool get HTTPShouldUsePipelining { - return _objc_msgSend_12(this.pointer, _sel_HTTPShouldUsePipelining); + NSURLCache? get URLCache { + final _ret = _objc_msgSend_603(this.pointer, _sel_URLCache); + return _ret.address == 0 + ? null + : NSURLCache.castFromPointer(_ret, retain: true, release: true); } - set HTTPShouldUsePipelining(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setHTTPShouldUsePipelining_, value); + set URLCache(NSURLCache? value) { + return _objc_msgSend_604( + this.pointer, _sel_setURLCache_, value?.pointer ?? ffi.nullptr); } - static NSMutableURLRequest requestWithURL_(NSURL URL) { - final _ret = _objc_msgSend_262( - _class_NSMutableURLRequest, _sel_requestWithURL_, URL.pointer); - return NSMutableURLRequest._(_ret, retain: true, release: true); + bool get shouldUseExtendedBackgroundIdleMode { + return _objc_msgSend_7( + this.pointer, _sel_shouldUseExtendedBackgroundIdleMode); } - static bool getSupportsSecureCoding() { - return _objc_msgSend_12( - _class_NSMutableURLRequest, _sel_supportsSecureCoding); + set shouldUseExtendedBackgroundIdleMode(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setShouldUseExtendedBackgroundIdleMode_, value); } - static NSMutableURLRequest requestWithURL_cachePolicy_timeoutInterval_( - NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _objc_msgSend_858( - _class_NSMutableURLRequest, - _sel_requestWithURL_cachePolicy_timeoutInterval_, - URL.pointer, - cachePolicy, - timeoutInterval); - return NSMutableURLRequest._(_ret, retain: true, release: true); + objc.NSArray? get protocolClasses { + final _ret = _objc_msgSend_69(this.pointer, _sel_protocolClasses); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - @override - NSMutableURLRequest initWithURL_(NSURL URL) { - final _ret = - _objc_msgSend_262(this.pointer, _sel_initWithURL_, URL.pointer); - return NSMutableURLRequest._(_ret, retain: true, release: true); + set protocolClasses(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setProtocolClasses_, value?.pointer ?? ffi.nullptr); } - @override - NSMutableURLRequest initWithURL_cachePolicy_timeoutInterval_( - NSURL URL, int cachePolicy, double timeoutInterval) { - final _ret = _objc_msgSend_858( - this.pointer, - _sel_initWithURL_cachePolicy_timeoutInterval_, - URL.pointer, - cachePolicy, - timeoutInterval); - return NSMutableURLRequest._(_ret, retain: true, release: true); + int get multipathServiceType { + return _objc_msgSend_606(this.pointer, _sel_multipathServiceType); + } + + set multipathServiceType(int value) { + return _objc_msgSend_607( + this.pointer, _sel_setMultipathServiceType_, value); } @override - NSMutableURLRequest init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSMutableURLRequest._(_ret, retain: true, release: true); + NSURLSessionConfiguration init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - static NSMutableURLRequest new1() { - final _ret = _objc_msgSend_2(_class_NSMutableURLRequest, _sel_new); - return NSMutableURLRequest._(_ret, retain: false, release: true); + static NSURLSessionConfiguration new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionConfiguration, _sel_new); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } - static NSMutableURLRequest allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSMutableURLRequest, _sel_allocWithZone_, zone); - return NSMutableURLRequest._(_ret, retain: false, release: true); + static NSURLSessionConfiguration backgroundSessionConfiguration_( + objc.NSString identifier) { + final _ret = _objc_msgSend_594(_class_NSURLSessionConfiguration, + _sel_backgroundSessionConfiguration_, identifier.pointer); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: true, release: true); } - static NSMutableURLRequest alloc() { - final _ret = _objc_msgSend_2(_class_NSMutableURLRequest, _sel_alloc); - return NSMutableURLRequest._(_ret, retain: false, release: true); + static NSURLSessionConfiguration allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionConfiguration, _sel_allocWithZone_, zone); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); + } + + static NSURLSessionConfiguration alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionConfiguration, _sel_alloc); + return NSURLSessionConfiguration.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSMutableURLRequest, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionConfiguration, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSMutableURLRequest, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionConfiguration, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSMutableURLRequest, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLSessionConfiguration, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSMutableURLRequest, _sel_useStoredAccessor); + return _objc_msgSend_7( + _class_NSURLSessionConfiguration, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSMutableURLRequest, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionConfiguration, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSMutableURLRequest, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionConfiguration, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSMutableURLRequest, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionConfiguration, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSMutableURLRequest, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionConfiguration, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSMutableURLRequest, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionConfiguration, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSMutableURLRequest = objc.getClass("NSMutableURLRequest"); -late final _sel_setURL_ = objc.registerName("setURL:"); -late final _sel_setCachePolicy_ = objc.registerName("setCachePolicy:"); -final _objc_msgSend_1017 = objc.msgSendPointer +late final _class_NSURLSessionConfiguration = + objc.getClass("NSURLSessionConfiguration"); +late final _sel_defaultSessionConfiguration = + objc.registerName("defaultSessionConfiguration"); +final _objc_msgSend_593 = 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_594 = 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:"); + +abstract class SSLProtocol { + static const int kSSLProtocolUnknown = 0; + static const int kTLSProtocol1 = 4; + static const int kTLSProtocol11 = 7; + static const int kTLSProtocol12 = 8; + static const int kDTLSProtocol1 = 9; + static const int kTLSProtocol13 = 10; + static const int kDTLSProtocol12 = 11; + static const int kTLSProtocolMaxSupported = 999; + static const int kSSLProtocol2 = 1; + static const int kSSLProtocol3 = 2; + static const int kSSLProtocol3Only = 3; + static const int kTLSProtocol1Only = 5; + static const int kSSLProtocolAll = 6; +} + +late final _sel_TLSMinimumSupportedProtocol = + objc.registerName("TLSMinimumSupportedProtocol"); +final _objc_msgSend_595 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocol_ = + objc.registerName("setTLSMinimumSupportedProtocol:"); +final _objc_msgSend_596 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, @@ -51318,11 +28460,33 @@ final _objc_msgSend_1017 = objc.msgSendPointer .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_1018 = objc.msgSendPointer +late final _sel_TLSMaximumSupportedProtocol = + objc.registerName("TLSMaximumSupportedProtocol"); +late final _sel_setTLSMaximumSupportedProtocol_ = + objc.registerName("setTLSMaximumSupportedProtocol:"); + +abstract class tls_protocol_version_t { + static const int tls_protocol_version_TLSv10 = 769; + static const int tls_protocol_version_TLSv11 = 770; + static const int tls_protocol_version_TLSv12 = 771; + static const int tls_protocol_version_TLSv13 = 772; + static const int tls_protocol_version_DTLSv10 = -257; + static const int tls_protocol_version_DTLSv12 = -259; +} + +late final _sel_TLSMinimumSupportedProtocolVersion = + objc.registerName("TLSMinimumSupportedProtocolVersion"); +final _objc_msgSend_597 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTLSMinimumSupportedProtocolVersion_ = + objc.registerName("setTLSMinimumSupportedProtocolVersion:"); +final _objc_msgSend_598 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, @@ -51330,48 +28494,60 @@ final _objc_msgSend_1018 = objc.msgSendPointer .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_1019 = objc.msgSendPointer +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_599 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() .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_1020 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setHTTPCookieStorage_ = + objc.registerName("setHTTPCookieStorage:"); +final _objc_msgSend_600 = 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_1021 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_URLCredentialStorage = + objc.registerName("URLCredentialStorage"); +final _objc_msgSend_601 = 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_602 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -51381,8 +28557,17 @@ final _objc_msgSend_1021 = objc.msgSendPointer .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_setHTTPBodyStream_ = objc.registerName("setHTTPBodyStream:"); -final _objc_msgSend_1022 = objc.msgSendPointer +late final _sel_URLCache = objc.registerName("URLCache"); +final _objc_msgSend_603 = 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_604 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -51392,816 +28577,655 @@ final _objc_msgSend_1022 = objc.msgSendPointer .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_1023 = objc.msgSendPointer +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_605 = 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_1024 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSURLSessionMultipathServiceType { + static const int NSURLSessionMultipathServiceTypeNone = 0; + static const int NSURLSessionMultipathServiceTypeHandover = 1; + static const int NSURLSessionMultipathServiceTypeInteractive = 2; + static const int NSURLSessionMultipathServiceTypeAggregate = 3; +} + +late final _sel_multipathServiceType = + objc.registerName("multipathServiceType"); +final _objc_msgSend_606 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32 Function(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_1025 = objc.msgSendPointer + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setMultipathServiceType_ = + objc.registerName("setMultipathServiceType:"); +final _objc_msgSend_607 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_608 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + 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_initWithTask_cachedResponse_client_ = - objc.registerName("initWithTask:cachedResponse:client:"); -final _objc_msgSend_1026 = objc.msgSendPointer +late final _sel_sessionWithConfiguration_delegate_delegateQueue_ = + objc.registerName("sessionWithConfiguration:delegate:delegateQueue:"); +final _objc_msgSend_609 = 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_task = objc.registerName("task"); -final _objc_msgSend_1027 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); - -class NSXMLParser extends NSObject { - NSXMLParser._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSXMLParser] that points to the same underlying object as [other]. - static NSXMLParser castFrom(T other) { - return NSXMLParser._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSXMLParser] that wraps the given raw object pointer. - static NSXMLParser castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLParser._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSXMLParser]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSXMLParser); - } - - NSXMLParser? initWithContentsOfURL_(NSURL url) { - final _ret = _objc_msgSend_277( - this.pointer, _sel_initWithContentsOfURL_, url.pointer); - return _ret.address == 0 - ? null - : NSXMLParser._(_ret, retain: true, release: true); - } - - NSXMLParser initWithData_(NSData data) { - final _ret = - _objc_msgSend_279(this.pointer, _sel_initWithData_, data.pointer); - return NSXMLParser._(_ret, retain: true, release: true); - } - - NSXMLParser initWithStream_(NSInputStream stream) { - final _ret = - _objc_msgSend_1028(this.pointer, _sel_initWithStream_, stream.pointer); - return NSXMLParser._(_ret, retain: true, release: true); - } - - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - set delegate(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); - } - - bool get shouldProcessNamespaces { - return _objc_msgSend_12(this.pointer, _sel_shouldProcessNamespaces); - } - - set shouldProcessNamespaces(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setShouldProcessNamespaces_, value); - } - - bool get shouldReportNamespacePrefixes { - return _objc_msgSend_12(this.pointer, _sel_shouldReportNamespacePrefixes); - } - - set shouldReportNamespacePrefixes(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setShouldReportNamespacePrefixes_, value); - } - - int get externalEntityResolvingPolicy { - return _objc_msgSend_1029(this.pointer, _sel_externalEntityResolvingPolicy); - } - - set externalEntityResolvingPolicy(int value) { - return _objc_msgSend_1030( - this.pointer, _sel_setExternalEntityResolvingPolicy_, value); - } - - NSSet? get allowedExternalEntityURLs { - final _ret = - _objc_msgSend_319(this.pointer, _sel_allowedExternalEntityURLs); - return _ret.address == 0 - ? null - : NSSet._(_ret, retain: true, release: true); - } - - set allowedExternalEntityURLs(NSSet? value) { - return _objc_msgSend_1031(this.pointer, _sel_setAllowedExternalEntityURLs_, - value?.pointer ?? ffi.nullptr); - } - - bool parse() { - return _objc_msgSend_12(this.pointer, _sel_parse); - } - - void abortParsing() { - _objc_msgSend_1(this.pointer, _sel_abortParsing); - } - - NSError? get parserError { - final _ret = _objc_msgSend_322(this.pointer, _sel_parserError); - return _ret.address == 0 - ? null - : NSError._(_ret, retain: true, release: true); - } - - bool get shouldResolveExternalEntities { - return _objc_msgSend_12(this.pointer, _sel_shouldResolveExternalEntities); - } - - set shouldResolveExternalEntities(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setShouldResolveExternalEntities_, value); - } - - NSString? get publicID { - final _ret = _objc_msgSend_44(this.pointer, _sel_publicID); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSString? get systemID { - final _ret = _objc_msgSend_44(this.pointer, _sel_systemID); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } +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_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< + 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); +final _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - int get lineNumber { - return _objc_msgSend_83(this.pointer, _sel_lineNumber); - } +void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); - int get columnNumber { - return _objc_msgSend_83(this.pointer, _sel_columnNumber); - } +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); - @override - NSXMLParser init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSXMLParser._(_ret, retain: true, release: true); + /// 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 NSXMLParser new1() { - final _ret = _objc_msgSend_2(_class_NSXMLParser, _sel_new); - return NSXMLParser._(_ret, retain: false, 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_NSArray_NSArray_NSArray.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _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 NSXMLParser allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSXMLParser, _sel_allocWithZone_, zone); - return NSXMLParser._(_ret, 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.newBlock( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + (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 NSXMLParser alloc() { - final _ret = _objc_msgSend_2(_class_NSXMLParser, _sel_alloc); - return NSXMLParser._(_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_NSArray_NSArray_NSArray.listener( + void Function(objc.NSArray, objc.NSArray, objc.NSArray) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + (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.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSXMLParser, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } + void call(objc.NSArray arg0, objc.NSArray arg1, objc.NSArray arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer, arg2.pointer); +} - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSXMLParser, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } +late final _sel_getTasksWithCompletionHandler_ = + objc.registerName("getTasksWithCompletionHandler:"); +final _objc_msgSend_610 = 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) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSArray1_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSArray1_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSXMLParser, _sel_accessInstanceVariablesDirectly); - } +void _ObjCBlock_ffiVoid_NSArray1_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSArray1_closureRegistry[block.ref.target.address]!( + arg0); - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSXMLParser, _sel_useStoredAccessor); - } +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); - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSXMLParser, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + /// 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 bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSXMLParser, - _sel_automaticallyNotifiesObserversForKey_, key.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_NSArray1.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSXMLParser, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); - } + /// 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.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSArray1_registerClosure( + (ffi.Pointer arg0) => fn( + objc.NSArray.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSXMLParser, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_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_NSArray1.listener(void Function(objc.NSArray) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSArray1_registerClosure( + (ffi.Pointer arg0) => fn( + objc.NSArray.castFromPointer(arg0, + retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSXMLParser, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); - } + 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 _class_NSXMLParser = objc.getClass("NSXMLParser"); -late final _sel_initWithStream_ = objc.registerName("initWithStream:"); -final _objc_msgSend_1028 = objc.msgSendPointer +late final _sel_getAllTasksWithCompletionHandler_ = + objc.registerName("getAllTasksWithCompletionHandler:"); +final _objc_msgSend_611 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + 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_612 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_shouldProcessNamespaces = - objc.registerName("shouldProcessNamespaces"); -late final _sel_setShouldProcessNamespaces_ = - objc.registerName("setShouldProcessNamespaces:"); -late final _sel_shouldReportNamespacePrefixes = - objc.registerName("shouldReportNamespacePrefixes"); -late final _sel_setShouldReportNamespacePrefixes_ = - objc.registerName("setShouldReportNamespacePrefixes:"); - -abstract class NSXMLParserExternalEntityResolvingPolicy { - static const int NSXMLParserResolveExternalEntitiesNever = 0; - static const int NSXMLParserResolveExternalEntitiesNoNetwork = 1; - static const int NSXMLParserResolveExternalEntitiesSameOriginOnly = 2; - static const int NSXMLParserResolveExternalEntitiesAlways = 3; -} - -late final _sel_externalEntityResolvingPolicy = - objc.registerName("externalEntityResolvingPolicy"); -final _objc_msgSend_1029 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setExternalEntityResolvingPolicy_ = - objc.registerName("setExternalEntityResolvingPolicy:"); -final _objc_msgSend_1030 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_allowedExternalEntityURLs = - objc.registerName("allowedExternalEntityURLs"); -late final _sel_setAllowedExternalEntityURLs_ = - objc.registerName("setAllowedExternalEntityURLs:"); -final _objc_msgSend_1031 = objc.msgSendPointer +late final _sel_dataTaskWithURL_ = objc.registerName("dataTaskWithURL:"); +final _objc_msgSend_613 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_parse = objc.registerName("parse"); -late final _sel_abortParsing = objc.registerName("abortParsing"); -late final _sel_parserError = objc.registerName("parserError"); -late final _sel_shouldResolveExternalEntities = - objc.registerName("shouldResolveExternalEntities"); -late final _sel_setShouldResolveExternalEntities_ = - objc.registerName("setShouldResolveExternalEntities:"); -late final _sel_publicID = objc.registerName("publicID"); -late final _sel_systemID = objc.registerName("systemID"); -late final _sel_lineNumber = objc.registerName("lineNumber"); -late final _sel_columnNumber = objc.registerName("columnNumber"); -class NSFileWrapper extends NSObject { - NSFileWrapper._(ffi.Pointer pointer, +class NSURLSessionUploadTask extends NSURLSessionDataTask { + NSURLSessionUploadTask._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSFileWrapper] that points to the same underlying object as [other]. - static NSFileWrapper castFrom(T other) { - return NSFileWrapper._(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.pointer, retain: true, release: true); - /// Returns a [NSFileWrapper] that wraps the given raw object pointer. - static NSFileWrapper castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSFileWrapper._(other, retain: retain, release: release); - } + /// 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 [NSFileWrapper]. + /// Returns whether [obj] is an instance of [NSURLSessionUploadTask]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSFileWrapper); - } - - NSFileWrapper? initWithURL_options_error_(NSURL url, int options, - ffi.Pointer> outError) { - final _ret = _objc_msgSend_1032(this.pointer, - _sel_initWithURL_options_error_, url.pointer, options, outError); - return _ret.address == 0 - ? null - : NSFileWrapper._(_ret, retain: true, release: true); - } - - NSFileWrapper initDirectoryWithFileWrappers_( - NSDictionary childrenByPreferredName) { - final _ret = _objc_msgSend_159(this.pointer, - _sel_initDirectoryWithFileWrappers_, childrenByPreferredName.pointer); - return NSFileWrapper._(_ret, retain: true, release: true); - } - - NSFileWrapper initRegularFileWithContents_(NSData contents) { - final _ret = _objc_msgSend_279( - this.pointer, _sel_initRegularFileWithContents_, contents.pointer); - return NSFileWrapper._(_ret, retain: true, release: true); - } - - NSFileWrapper initSymbolicLinkWithDestinationURL_(NSURL url) { - final _ret = _objc_msgSend_262( - this.pointer, _sel_initSymbolicLinkWithDestinationURL_, url.pointer); - return NSFileWrapper._(_ret, retain: true, release: true); - } - - NSFileWrapper? initWithSerializedRepresentation_( - NSData serializeRepresentation) { - final _ret = _objc_msgSend_874( - this.pointer, - _sel_initWithSerializedRepresentation_, - serializeRepresentation.pointer); - return _ret.address == 0 - ? null - : NSFileWrapper._(_ret, retain: true, release: true); - } - - NSFileWrapper? initWithCoder_(NSCoder inCoder) { - final _ret = - _objc_msgSend_47(this.pointer, _sel_initWithCoder_, inCoder.pointer); - return _ret.address == 0 - ? null - : NSFileWrapper._(_ret, retain: true, release: true); - } - - bool get directory { - return _objc_msgSend_12(this.pointer, _sel_isDirectory); - } - - bool get regularFile { - return _objc_msgSend_12(this.pointer, _sel_isRegularFile); - } - - bool get symbolicLink { - return _objc_msgSend_12(this.pointer, _sel_isSymbolicLink); - } - - NSString? get preferredFilename { - final _ret = _objc_msgSend_44(this.pointer, _sel_preferredFilename); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set preferredFilename(NSString? value) { - return _objc_msgSend_545(this.pointer, _sel_setPreferredFilename_, - value?.pointer ?? ffi.nullptr); - } - - NSString? get filename { - final _ret = _objc_msgSend_44(this.pointer, _sel_filename); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set filename(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setFilename_, value?.pointer ?? ffi.nullptr); - } - - NSDictionary get fileAttributes { - final _ret = _objc_msgSend_181(this.pointer, _sel_fileAttributes); - return NSDictionary._(_ret, retain: true, release: true); - } - - set fileAttributes(NSDictionary value) { - return _objc_msgSend_182( - this.pointer, _sel_setFileAttributes_, value.pointer); - } - - bool matchesContentsOfURL_(NSURL url) { - return _objc_msgSend_265( - this.pointer, _sel_matchesContentsOfURL_, url.pointer); - } - - bool readFromURL_options_error_(NSURL url, int options, - ffi.Pointer> outError) { - return _objc_msgSend_1033(this.pointer, _sel_readFromURL_options_error_, - url.pointer, options, outError); - } - - bool writeToURL_options_originalContentsURL_error_( - NSURL url, - int options, - NSURL? originalContentsURL, - ffi.Pointer> outError) { - return _objc_msgSend_1034( - this.pointer, - _sel_writeToURL_options_originalContentsURL_error_, - url.pointer, - options, - originalContentsURL?.pointer ?? ffi.nullptr, - outError); - } - - NSData? get serializedRepresentation { - final _ret = _objc_msgSend_286(this.pointer, _sel_serializedRepresentation); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSString addFileWrapper_(NSFileWrapper child) { - final _ret = - _objc_msgSend_1035(this.pointer, _sel_addFileWrapper_, child.pointer); - return NSString._(_ret, retain: true, release: true); - } - - NSString addRegularFileWithContents_preferredFilename_( - NSData data, NSString fileName) { - final _ret = _objc_msgSend_1036( - this.pointer, - _sel_addRegularFileWithContents_preferredFilename_, - data.pointer, - fileName.pointer); - return NSString._(_ret, retain: true, release: true); - } - - void removeFileWrapper_(NSFileWrapper child) { - _objc_msgSend_1037(this.pointer, _sel_removeFileWrapper_, child.pointer); - } - - NSDictionary? get fileWrappers { - final _ret = _objc_msgSend_390(this.pointer, _sel_fileWrappers); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); - } - - NSString? keyForFileWrapper_(NSFileWrapper child) { - final _ret = _objc_msgSend_1038( - this.pointer, _sel_keyForFileWrapper_, child.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - NSData? get regularFileContents { - final _ret = _objc_msgSend_286(this.pointer, _sel_regularFileContents); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); - } - - NSURL? get symbolicLinkDestinationURL { - final _ret = - _objc_msgSend_45(this.pointer, _sel_symbolicLinkDestinationURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); - } - - NSObject? initWithPath_(NSString path) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_initWithPath_, path.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSObject initSymbolicLinkWithDestination_(NSString path) { - final _ret = _objc_msgSend_31( - this.pointer, _sel_initSymbolicLinkWithDestination_, path.pointer); - return NSObject._(_ret, retain: true, release: true); - } - - bool needsToBeUpdatedFromPath_(NSString path) { - return _objc_msgSend_64( - this.pointer, _sel_needsToBeUpdatedFromPath_, path.pointer); - } - - bool updateFromPath_(NSString path) { - return _objc_msgSend_64(this.pointer, _sel_updateFromPath_, path.pointer); - } - - bool writeToFile_atomically_updateFilenames_( - NSString path, bool atomicFlag, bool updateFilenamesFlag) { - return _objc_msgSend_1039( - this.pointer, - _sel_writeToFile_atomically_updateFilenames_, - path.pointer, - atomicFlag, - updateFilenamesFlag); - } - - NSString addFileWithPath_(NSString path) { - final _ret = - _objc_msgSend_69(this.pointer, _sel_addFileWithPath_, path.pointer); - return NSString._(_ret, retain: true, release: true); - } - - NSString addSymbolicLinkWithDestination_preferredFilename_( - NSString path, NSString filename) { - final _ret = _objc_msgSend_364( - this.pointer, - _sel_addSymbolicLinkWithDestination_preferredFilename_, - path.pointer, - filename.pointer); - return NSString._(_ret, retain: true, release: true); + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionUploadTask); } - NSString symbolicLinkDestination() { - final _ret = _objc_msgSend_21(this.pointer, _sel_symbolicLinkDestination); - return NSString._(_ret, retain: true, release: true); + @override + NSURLSessionUploadTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: true, release: true); } - @override - NSFileWrapper init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSFileWrapper._(_ret, retain: true, release: true); + static NSURLSessionUploadTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionUploadTask, _sel_new); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } - static NSFileWrapper new1() { - final _ret = _objc_msgSend_2(_class_NSFileWrapper, _sel_new); - return NSFileWrapper._(_ret, retain: false, release: true); + void cancelByProducingResumeData_( + ObjCBlock_ffiVoid_NSData completionHandler) { + _objc_msgSend_614(this.pointer, _sel_cancelByProducingResumeData_, + completionHandler.pointer); } - static NSFileWrapper allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSFileWrapper, _sel_allocWithZone_, zone); - return NSFileWrapper._(_ret, retain: false, release: true); + static NSURLSessionUploadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionUploadTask, _sel_allocWithZone_, zone); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } - static NSFileWrapper alloc() { - final _ret = _objc_msgSend_2(_class_NSFileWrapper, _sel_alloc); - return NSFileWrapper._(_ret, retain: false, release: true); + static NSURLSessionUploadTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionUploadTask, _sel_alloc); + return NSURLSessionUploadTask.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSFileWrapper, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionUploadTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSFileWrapper, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionUploadTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSFileWrapper, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLSessionUploadTask, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSFileWrapper, _sel_useStoredAccessor); + return _objc_msgSend_7( + _class_NSURLSessionUploadTask, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSFileWrapper, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionUploadTask, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSFileWrapper, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionUploadTask, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSFileWrapper, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionUploadTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSFileWrapper, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionUploadTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSFileWrapper, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionUploadTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSFileWrapper = objc.getClass("NSFileWrapper"); - -abstract class NSFileWrapperReadingOptions { - static const int NSFileWrapperReadingImmediate = 1; - static const int NSFileWrapperReadingWithoutMapping = 2; +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); +final _ObjCBlock_ffiVoid_NSData_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSData_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSData_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSData_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); } -late final _sel_initWithURL_options_error_ = - objc.registerName("initWithURL:options:error:"); -final _objc_msgSend_1032 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_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_1033 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); +void _ObjCBlock_ffiVoid_NSData_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSData_closureRegistry[block.ref.target.address]!(arg0); -abstract class NSFileWrapperWritingOptions { - static const int NSFileWrapperWritingAtomic = 1; - static const int NSFileWrapperWritingWithNameUpdating = 2; +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); + + /// 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); + } + + /// 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.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_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_NSData.fromFunction(void Function(objc.NSData?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.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_NSData.listener(void Function(objc.NSData?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_registerClosure( + (ffi.Pointer arg0) => fn(arg0.address == 0 + ? null + : objc.NSData.castFromPointer(arg0, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(objc.NSData? arg0) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr); } -late final _sel_writeToURL_options_originalContentsURL_error_ = - objc.registerName("writeToURL:options:originalContentsURL:error:"); -final _objc_msgSend_1034 = objc.msgSendPointer +late final _sel_cancelByProducingResumeData_ = + objc.registerName("cancelByProducingResumeData:"); +final _objc_msgSend_614 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.Void Function(ffi.Pointer, + 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:"); -final _objc_msgSend_1035 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_uploadTaskWithRequest_fromFile_ = + objc.registerName("uploadTaskWithRequest:fromFile:"); +final _objc_msgSend_615 = 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)>(); -late final _sel_addRegularFileWithContents_preferredFilename_ = - objc.registerName("addRegularFileWithContents:preferredFilename:"); -final _objc_msgSend_1036 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_uploadTaskWithRequest_fromData_ = + objc.registerName("uploadTaskWithRequest:fromData:"); +final _objc_msgSend_616 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -52215,20 +29239,9 @@ final _objc_msgSend_1036 = objc.msgSendPointer ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_removeFileWrapper_ = objc.registerName("removeFileWrapper:"); -final _objc_msgSend_1037 = 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_1038 = objc.msgSendPointer +late final _sel_uploadTaskWithResumeData_ = + objc.registerName("uploadTaskWithResumeData:"); +final _objc_msgSend_617 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -52238,946 +29251,1208 @@ final _objc_msgSend_1038 = objc.msgSendPointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -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_updateFromPath_ = objc.registerName("updateFromPath:"); -late final _sel_writeToFile_atomically_updateFilenames_ = - objc.registerName("writeToFile:atomically:updateFilenames:"); -final _objc_msgSend_1039 = objc.msgSendPointer +late final _sel_uploadTaskWithStreamedRequest_ = + objc.registerName("uploadTaskWithStreamedRequest:"); +final _objc_msgSend_618 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Bool Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Bool)>>() + ffi.Pointer)>>() .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"); + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); -class NSURLSession extends NSObject { - NSURLSession._(ffi.Pointer pointer, +class NSURLSessionDownloadTask extends NSURLSessionTask { + NSURLSessionDownloadTask._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLSession] that points to the same underlying object as [other]. - static NSURLSession castFrom(T other) { - return NSURLSession._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. + NSURLSessionDownloadTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSURLSession] that wraps the given raw object pointer. - static NSURLSession castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSURLSession._(other, retain: retain, release: release); - } + /// 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); - /// Returns whether [obj] is an instance of [NSURLSession]. + /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSession); - } - - static NSURLSession getSharedSession() { - final _ret = _objc_msgSend_1040(_class_NSURLSession, _sel_sharedSession); - return NSURLSession._(_ret, retain: true, release: true); - } - - static NSURLSession sessionWithConfiguration_( - NSURLSessionConfiguration configuration) { - final _ret = _objc_msgSend_1056(_class_NSURLSession, - _sel_sessionWithConfiguration_, configuration.pointer); - return NSURLSession._(_ret, retain: true, release: true); - } - - static NSURLSession sessionWithConfiguration_delegate_delegateQueue_( - NSURLSessionConfiguration configuration, - NSObject? delegate, - NSOperationQueue? queue) { - final _ret = _objc_msgSend_1057( - _class_NSURLSession, - _sel_sessionWithConfiguration_delegate_delegateQueue_, - configuration.pointer, - delegate?.pointer ?? ffi.nullptr, - queue?.pointer ?? ffi.nullptr); - return NSURLSession._(_ret, retain: true, release: true); - } - - NSOperationQueue get delegateQueue { - final _ret = _objc_msgSend_917(this.pointer, _sel_delegateQueue); - return NSOperationQueue._(_ret, retain: true, release: true); - } - - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); - } - - NSURLSessionConfiguration get configuration { - final _ret = _objc_msgSend_1041(this.pointer, _sel_configuration); - return NSURLSessionConfiguration._(_ret, retain: true, release: true); - } - - NSString? get sessionDescription { - final _ret = _objc_msgSend_44(this.pointer, _sel_sessionDescription); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); - } - - set sessionDescription(NSString? value) { - return _objc_msgSend_545(this.pointer, _sel_setSessionDescription_, - value?.pointer ?? ffi.nullptr); - } - - void finishTasksAndInvalidate() { - _objc_msgSend_1(this.pointer, _sel_finishTasksAndInvalidate); - } - - void invalidateAndCancel() { - _objc_msgSend_1(this.pointer, _sel_invalidateAndCancel); - } - - void resetWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { - _objc_msgSend_532(this.pointer, _sel_resetWithCompletionHandler_, - completionHandler.pointer); + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionDownloadTask); } - void flushWithCompletionHandler_(ObjCBlock_ffiVoid completionHandler) { - _objc_msgSend_532(this.pointer, _sel_flushWithCompletionHandler_, + void cancelByProducingResumeData_( + ObjCBlock_ffiVoid_NSData completionHandler) { + _objc_msgSend_614(this.pointer, _sel_cancelByProducingResumeData_, completionHandler.pointer); } - void getTasksWithCompletionHandler_( - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray completionHandler) { - _objc_msgSend_1058(this.pointer, _sel_getTasksWithCompletionHandler_, - completionHandler.pointer); + @override + NSURLSessionDownloadTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: true, release: true); } - void getAllTasksWithCompletionHandler_( - ObjCBlock_ffiVoid_NSArray1 completionHandler) { - _objc_msgSend_1059(this.pointer, _sel_getAllTasksWithCompletionHandler_, - completionHandler.pointer); + static NSURLSessionDownloadTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDownloadTask, _sel_new); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - NSURLSessionDataTask dataTaskWithRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_1060( - this.pointer, _sel_dataTaskWithRequest_, request.pointer); - return NSURLSessionDataTask._(_ret, retain: true, release: true); + static NSURLSessionDownloadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionDownloadTask, _sel_allocWithZone_, zone); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - NSURLSessionDataTask dataTaskWithURL_(NSURL url) { - final _ret = - _objc_msgSend_1061(this.pointer, _sel_dataTaskWithURL_, url.pointer); - return NSURLSessionDataTask._(_ret, retain: true, release: true); + static NSURLSessionDownloadTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionDownloadTask, _sel_alloc); + return NSURLSessionDownloadTask.castFromPointer(_ret, + retain: false, release: true); } - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_( - NSURLRequest request, NSURL fileURL) { - final _ret = _objc_msgSend_1063(this.pointer, - _sel_uploadTaskWithRequest_fromFile_, request.pointer, fileURL.pointer); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionDownloadTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSURLSessionUploadTask uploadTaskWithRequest_fromData_( - NSURLRequest request, NSData bodyData) { - final _ret = _objc_msgSend_1064( - this.pointer, - _sel_uploadTaskWithRequest_fromData_, - request.pointer, - bodyData.pointer); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionDownloadTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSURLSessionUploadTask uploadTaskWithResumeData_(NSData resumeData) { - final _ret = _objc_msgSend_1065( - this.pointer, _sel_uploadTaskWithResumeData_, resumeData.pointer); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionDownloadTask, _sel_accessInstanceVariablesDirectly); } - NSURLSessionUploadTask uploadTaskWithStreamedRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_1066( - this.pointer, _sel_uploadTaskWithStreamedRequest_, request.pointer); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionDownloadTask, _sel_useStoredAccessor); } - NSURLSessionDownloadTask downloadTaskWithRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_1067( - this.pointer, _sel_downloadTaskWithRequest_, request.pointer); - return NSURLSessionDownloadTask._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionDownloadTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionDownloadTask downloadTaskWithURL_(NSURL url) { - final _ret = _objc_msgSend_1068( - this.pointer, _sel_downloadTaskWithURL_, url.pointer); - return NSURLSessionDownloadTask._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionDownloadTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSURLSessionDownloadTask downloadTaskWithResumeData_(NSData resumeData) { - final _ret = _objc_msgSend_1069( - this.pointer, _sel_downloadTaskWithResumeData_, resumeData.pointer); - return NSURLSessionDownloadTask._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionDownloadTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSURLSessionStreamTask streamTaskWithHostName_port_( - NSString hostname, int port) { - final _ret = _objc_msgSend_1072(this.pointer, - _sel_streamTaskWithHostName_port_, hostname.pointer, port); - return NSURLSessionStreamTask._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionDownloadTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSURLSessionStreamTask streamTaskWithNetService_(NSNetService service) { - final _ret = _objc_msgSend_1080( - this.pointer, _sel_streamTaskWithNetService_, service.pointer); - return NSURLSessionStreamTask._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionDownloadTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - NSURLSessionWebSocketTask webSocketTaskWithURL_(NSURL url) { - final _ret = _objc_msgSend_1087( - this.pointer, _sel_webSocketTaskWithURL_, url.pointer); - return NSURLSessionWebSocketTask._(_ret, retain: true, release: true); - } +late final _class_NSURLSessionDownloadTask = + objc.getClass("NSURLSessionDownloadTask"); +late final _sel_downloadTaskWithRequest_ = + objc.registerName("downloadTaskWithRequest:"); +final _objc_msgSend_619 = 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_620 = 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_621 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); - NSURLSessionWebSocketTask webSocketTaskWithURL_protocols_( - NSURL url, NSArray protocols) { - final _ret = _objc_msgSend_1088(this.pointer, - _sel_webSocketTaskWithURL_protocols_, url.pointer, protocols.pointer); - return NSURLSessionWebSocketTask._(_ret, retain: true, release: true); - } +class NSURLSessionStreamTask extends NSURLSessionTask { + NSURLSessionStreamTask._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSURLSessionWebSocketTask webSocketTaskWithRequest_(NSURLRequest request) { - final _ret = _objc_msgSend_1089( - this.pointer, _sel_webSocketTaskWithRequest_, request.pointer); - return NSURLSessionWebSocketTask._(_ret, retain: true, release: true); - } + /// Constructs a [NSURLSessionStreamTask] that points to the same underlying object as [other]. + NSURLSessionStreamTask.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - @override - NSURLSession init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSession._(_ret, 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); - static NSURLSession new1() { - final _ret = _objc_msgSend_2(_class_NSURLSession, _sel_new); - return NSURLSession._(_ret, retain: false, release: true); + /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionStreamTask); } - NSURLSessionDataTask dataTaskWithRequest_completionHandler_( - NSURLRequest request, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1090( + void readDataOfMinLength_maxLength_timeout_completionHandler_( + int minBytes, + int maxBytes, + double timeout, + ObjCBlock_ffiVoid_NSData_bool_NSError completionHandler) { + _objc_msgSend_622( this.pointer, - _sel_dataTaskWithRequest_completionHandler_, - request.pointer, + _sel_readDataOfMinLength_maxLength_timeout_completionHandler_, + minBytes, + maxBytes, + timeout, completionHandler.pointer); - return NSURLSessionDataTask._(_ret, retain: true, release: true); } - NSURLSessionDataTask dataTaskWithURL_completionHandler_(NSURL url, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1091( - this.pointer, - _sel_dataTaskWithURL_completionHandler_, - url.pointer, - completionHandler.pointer); - return NSURLSessionDataTask._(_ret, retain: true, release: true); + void writeData_timeout_completionHandler_(objc.NSData data, double timeout, + ObjCBlock_ffiVoid_NSError completionHandler) { + _objc_msgSend_623(this.pointer, _sel_writeData_timeout_completionHandler_, + data.pointer, timeout, completionHandler.pointer); } - NSURLSessionUploadTask uploadTaskWithRequest_fromFile_completionHandler_( - NSURLRequest request, - NSURL fileURL, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1092( - this.pointer, - _sel_uploadTaskWithRequest_fromFile_completionHandler_, - request.pointer, - fileURL.pointer, - completionHandler.pointer); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); + void captureStreams() { + _objc_msgSend_82(this.pointer, _sel_captureStreams); } - NSURLSessionUploadTask uploadTaskWithRequest_fromData_completionHandler_( - NSURLRequest request, - NSData? bodyData, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1093( - this.pointer, - _sel_uploadTaskWithRequest_fromData_completionHandler_, - request.pointer, - bodyData?.pointer ?? ffi.nullptr, - completionHandler.pointer); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); + void closeWrite() { + _objc_msgSend_82(this.pointer, _sel_closeWrite); } - NSURLSessionUploadTask uploadTaskWithResumeData_completionHandler_( - NSData resumeData, - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1094( - this.pointer, - _sel_uploadTaskWithResumeData_completionHandler_, - resumeData.pointer, - completionHandler.pointer); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); + void closeRead() { + _objc_msgSend_82(this.pointer, _sel_closeRead); } - NSURLSessionDownloadTask downloadTaskWithRequest_completionHandler_( - NSURLRequest request, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1095( - this.pointer, - _sel_downloadTaskWithRequest_completionHandler_, - request.pointer, - completionHandler.pointer); - return NSURLSessionDownloadTask._(_ret, retain: true, release: true); + void startSecureConnection() { + _objc_msgSend_82(this.pointer, _sel_startSecureConnection); } - NSURLSessionDownloadTask downloadTaskWithURL_completionHandler_(NSURL url, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1096( - this.pointer, - _sel_downloadTaskWithURL_completionHandler_, - url.pointer, - completionHandler.pointer); - return NSURLSessionDownloadTask._(_ret, retain: true, release: true); + void stopSecureConnection() { + _objc_msgSend_82(this.pointer, _sel_stopSecureConnection); } - NSURLSessionDownloadTask downloadTaskWithResumeData_completionHandler_( - NSData resumeData, - ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError completionHandler) { - final _ret = _objc_msgSend_1097( - this.pointer, - _sel_downloadTaskWithResumeData_completionHandler_, - resumeData.pointer, - completionHandler.pointer); - return NSURLSessionDownloadTask._(_ret, retain: true, release: true); + @override + NSURLSessionStreamTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: true, release: true); } - static NSURLSession allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSURLSession, _sel_allocWithZone_, zone); - return NSURLSession._(_ret, retain: false, release: true); + static NSURLSessionStreamTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionStreamTask, _sel_new); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } - static NSURLSession alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSession, _sel_alloc); - return NSURLSession._(_ret, retain: false, release: true); + static NSURLSessionStreamTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionStreamTask, _sel_allocWithZone_, zone); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); + } + + static NSURLSessionStreamTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionStreamTask, _sel_alloc); + return NSURLSessionStreamTask.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSession, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionStreamTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSession, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionStreamTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSession, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSURLSessionStreamTask, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSURLSession, _sel_useStoredAccessor); + return _objc_msgSend_7( + _class_NSURLSessionStreamTask, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSession, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionStreamTask, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSession, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionStreamTask, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSession, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionStreamTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSession, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionStreamTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSURLSession, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionStreamTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSURLSession = objc.getClass("NSURLSession"); -late final _sel_sharedSession = objc.registerName("sharedSession"); -final _objc_msgSend_1040 = objc.msgSendPointer +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); +final _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + void Function( + ffi.Pointer, bool, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +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); + + /// 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); + } + + /// 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.newBlock( + _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; + + /// 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.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + (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; + + /// 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_NSData_bool_NSError.listener( + void Function(objc.NSData, bool, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Bool, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( + (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.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_622 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + 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_623 = 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_624 = 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, + ffi.Pointer, + ffi.Pointer, + int)>(); + +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); + } + + NSNetService initWithDomain_type_name_port_( + objc.NSString domain, objc.NSString type, objc.NSString name, int port) { + final _ret = _objc_msgSend_625( + this.pointer, + _sel_initWithDomain_type_name_port_, + domain.pointer, + type.pointer, + name.pointer, + port); + return NSNetService.castFromPointer(_ret, retain: true, release: true); + } + + NSNetService initWithDomain_type_name_( + objc.NSString domain, objc.NSString type, objc.NSString name) { + final _ret = _objc_msgSend_626(this.pointer, _sel_initWithDomain_type_name_, + domain.pointer, type.pointer, name.pointer); + return NSNetService.castFromPointer(_ret, retain: true, release: true); + } + + void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_scheduleInRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); + } + + void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, objc.NSString mode) { + _objc_msgSend_216(this.pointer, _sel_removeFromRunLoop_forMode_, + aRunLoop.pointer, mode.pointer); + } -class NSURLSessionConfiguration extends NSObject { - NSURLSessionConfiguration._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + objc.NSObject? get delegate { + final _ret = _objc_msgSend_66(this.pointer, _sel_delegate); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } - /// Returns a [NSURLSessionConfiguration] that points to the same underlying object as [other]. - static NSURLSessionConfiguration castFrom( - T other) { - return NSURLSessionConfiguration._(other.pointer, - retain: true, release: true); + set delegate(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); } - /// Returns a [NSURLSessionConfiguration] that wraps the given raw object pointer. - static NSURLSessionConfiguration castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLSessionConfiguration._(other, retain: retain, release: release); + bool get includesPeerToPeer { + return _objc_msgSend_7(this.pointer, _sel_includesPeerToPeer); } - /// Returns whether [obj] is an instance of [NSURLSessionConfiguration]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionConfiguration); + set includesPeerToPeer(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setIncludesPeerToPeer_, value); } - static NSURLSessionConfiguration getDefaultSessionConfiguration() { - final _ret = _objc_msgSend_1041( - _class_NSURLSessionConfiguration, _sel_defaultSessionConfiguration); - return NSURLSessionConfiguration._(_ret, retain: true, release: true); + objc.NSString get name { + final _ret = _objc_msgSend_12(this.pointer, _sel_name); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionConfiguration getEphemeralSessionConfiguration() { - final _ret = _objc_msgSend_1041( - _class_NSURLSessionConfiguration, _sel_ephemeralSessionConfiguration); - return NSURLSessionConfiguration._(_ret, retain: true, release: true); + objc.NSString get type { + final _ret = _objc_msgSend_12(this.pointer, _sel_type); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionConfiguration - backgroundSessionConfigurationWithIdentifier_(NSString identifier) { - final _ret = _objc_msgSend_1042(_class_NSURLSessionConfiguration, - _sel_backgroundSessionConfigurationWithIdentifier_, identifier.pointer); - return NSURLSessionConfiguration._(_ret, retain: true, release: true); + objc.NSString get domain { + final _ret = _objc_msgSend_12(this.pointer, _sel_domain); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSString? get identifier { - final _ret = _objc_msgSend_44(this.pointer, _sel_identifier); + objc.NSString? get hostName { + final _ret = _objc_msgSend_13(this.pointer, _sel_hostName); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - int get requestCachePolicy { - return _objc_msgSend_859(this.pointer, _sel_requestCachePolicy); + objc.NSArray? get addresses { + final _ret = _objc_msgSend_69(this.pointer, _sel_addresses); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set requestCachePolicy(int value) { - return _objc_msgSend_1017(this.pointer, _sel_setRequestCachePolicy_, value); + int get port { + return _objc_msgSend_114(this.pointer, _sel_port); } - double get timeoutIntervalForRequest { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_timeoutIntervalForRequest) - : _objc_msgSend_165(this.pointer, _sel_timeoutIntervalForRequest); + void publish() { + _objc_msgSend_82(this.pointer, _sel_publish); } - set timeoutIntervalForRequest(double value) { - return _objc_msgSend_542( - this.pointer, _sel_setTimeoutIntervalForRequest_, value); + void publishWithOptions_(int options) { + _objc_msgSend_627(this.pointer, _sel_publishWithOptions_, options); } - double get timeoutIntervalForResource { - return objc.useMsgSendVariants - ? _objc_msgSend_165Fpret(this.pointer, _sel_timeoutIntervalForResource) - : _objc_msgSend_165(this.pointer, _sel_timeoutIntervalForResource); + void resolve() { + _objc_msgSend_82(this.pointer, _sel_resolve); } - set timeoutIntervalForResource(double value) { - return _objc_msgSend_542( - this.pointer, _sel_setTimeoutIntervalForResource_, value); + void stop() { + _objc_msgSend_82(this.pointer, _sel_stop); } - int get networkServiceType { - return _objc_msgSend_860(this.pointer, _sel_networkServiceType); + static objc.NSDictionary dictionaryFromTXTRecordData_(objc.NSData txtData) { + final _ret = _objc_msgSend_628(_class_NSNetService, + _sel_dictionaryFromTXTRecordData_, txtData.pointer); + return objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - set networkServiceType(int value) { - return _objc_msgSend_1018(this.pointer, _sel_setNetworkServiceType_, value); + static objc.NSData dataFromTXTRecordDictionary_( + objc.NSDictionary txtDictionary) { + final _ret = _objc_msgSend_629(_class_NSNetService, + _sel_dataFromTXTRecordDictionary_, txtDictionary.pointer); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - bool get allowsCellularAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsCellularAccess); + void resolveWithTimeout_(double timeout) { + _objc_msgSend_630(this.pointer, _sel_resolveWithTimeout_, timeout); } - set allowsCellularAccess(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAllowsCellularAccess_, value); + bool getInputStream_outputStream_( + ffi.Pointer> inputStream, + ffi.Pointer> outputStream) { + return _objc_msgSend_631(this.pointer, _sel_getInputStream_outputStream_, + inputStream, outputStream); } - bool get allowsExpensiveNetworkAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsExpensiveNetworkAccess); + bool setTXTRecordData_(objc.NSData? recordData) { + return _objc_msgSend_632(this.pointer, _sel_setTXTRecordData_, + recordData?.pointer ?? ffi.nullptr); } - set allowsExpensiveNetworkAccess(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAllowsExpensiveNetworkAccess_, value); + objc.NSData? TXTRecordData() { + final _ret = _objc_msgSend_325(this.pointer, _sel_TXTRecordData); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - bool get allowsConstrainedNetworkAccess { - return _objc_msgSend_12(this.pointer, _sel_allowsConstrainedNetworkAccess); + void startMonitoring() { + _objc_msgSend_82(this.pointer, _sel_startMonitoring); } - set allowsConstrainedNetworkAccess(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setAllowsConstrainedNetworkAccess_, value); + void stopMonitoring() { + _objc_msgSend_82(this.pointer, _sel_stopMonitoring); } - bool get requiresDNSSECValidation { - return _objc_msgSend_12(this.pointer, _sel_requiresDNSSECValidation); + @override + NSNetService init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSNetService.castFromPointer(_ret, retain: true, release: true); } - set requiresDNSSECValidation(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setRequiresDNSSECValidation_, value); + static NSNetService new1() { + final _ret = _objc_msgSend_40(_class_NSNetService, _sel_new); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } - bool get waitsForConnectivity { - return _objc_msgSend_12(this.pointer, _sel_waitsForConnectivity); + static NSNetService allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSNetService, _sel_allocWithZone_, zone); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } - set waitsForConnectivity(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setWaitsForConnectivity_, value); + static NSNetService alloc() { + final _ret = _objc_msgSend_40(_class_NSNetService, _sel_alloc); + return NSNetService.castFromPointer(_ret, retain: false, release: true); } - bool get discretionary { - return _objc_msgSend_12(this.pointer, _sel_isDiscretionary); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSNetService, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - set discretionary(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setDiscretionary_, value); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSNetService, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSString? get sharedContainerIdentifier { - final _ret = _objc_msgSend_44(this.pointer, _sel_sharedContainerIdentifier); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSNetService, _sel_accessInstanceVariablesDirectly); } - set sharedContainerIdentifier(NSString? value) { - return _objc_msgSend_545(this.pointer, _sel_setSharedContainerIdentifier_, - value?.pointer ?? ffi.nullptr); + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSNetService, _sel_useStoredAccessor); } - bool get sessionSendsLaunchEvents { - return _objc_msgSend_12(this.pointer, _sel_sessionSendsLaunchEvents); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSNetService, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set sessionSendsLaunchEvents(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setSessionSendsLaunchEvents_, value); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSNetService, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSDictionary? get connectionProxyDictionary { - final _ret = - _objc_msgSend_390(this.pointer, _sel_connectionProxyDictionary); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSNetService, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - set connectionProxyDictionary(NSDictionary? value) { - return _objc_msgSend_634(this.pointer, _sel_setConnectionProxyDictionary_, - value?.pointer ?? ffi.nullptr); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSNetService, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - int get TLSMinimumSupportedProtocol { - return _objc_msgSend_1043(this.pointer, _sel_TLSMinimumSupportedProtocol); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSNetService, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - set TLSMinimumSupportedProtocol(int value) { - return _objc_msgSend_1044( - this.pointer, _sel_setTLSMinimumSupportedProtocol_, value); - } +late final _class_NSNetService = objc.getClass("NSNetService"); +late final _sel_initWithDomain_type_name_port_ = + objc.registerName("initWithDomain:type:name:port:"); +final _objc_msgSend_625 = 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:"); +final _objc_msgSend_626 = 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_includesPeerToPeer = objc.registerName("includesPeerToPeer"); +late final _sel_setIncludesPeerToPeer_ = + objc.registerName("setIncludesPeerToPeer:"); +late final _sel_type = objc.registerName("type"); +late final _sel_publish = objc.registerName("publish"); - int get TLSMaximumSupportedProtocol { - return _objc_msgSend_1043(this.pointer, _sel_TLSMaximumSupportedProtocol); - } +abstract class NSNetServiceOptions { + static const int NSNetServiceNoAutoRename = 1; + static const int NSNetServiceListenForConnections = 2; +} - set TLSMaximumSupportedProtocol(int value) { - return _objc_msgSend_1044( - this.pointer, _sel_setTLSMaximumSupportedProtocol_, value); +late final _sel_publishWithOptions_ = objc.registerName("publishWithOptions:"); +final _objc_msgSend_627 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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:"); +final _objc_msgSend_628 = 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_629 = 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_630 = 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_631 = 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_632 = 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_633 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +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.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_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketTask); } - int get TLSMinimumSupportedProtocolVersion { - return _objc_msgSend_1045( - this.pointer, _sel_TLSMinimumSupportedProtocolVersion); + void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, + ObjCBlock_ffiVoid_NSError completionHandler) { + _objc_msgSend_635(this.pointer, _sel_sendMessage_completionHandler_, + message.pointer, completionHandler.pointer); } - set TLSMinimumSupportedProtocolVersion(int value) { - return _objc_msgSend_1046( - this.pointer, _sel_setTLSMinimumSupportedProtocolVersion_, value); + void receiveMessageWithCompletionHandler_( + ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError + completionHandler) { + _objc_msgSend_636(this.pointer, _sel_receiveMessageWithCompletionHandler_, + completionHandler.pointer); } - int get TLSMaximumSupportedProtocolVersion { - return _objc_msgSend_1045( - this.pointer, _sel_TLSMaximumSupportedProtocolVersion); + void sendPingWithPongReceiveHandler_( + ObjCBlock_ffiVoid_NSError pongReceiveHandler) { + _objc_msgSend_637(this.pointer, _sel_sendPingWithPongReceiveHandler_, + pongReceiveHandler.pointer); } - set TLSMaximumSupportedProtocolVersion(int value) { - return _objc_msgSend_1046( - this.pointer, _sel_setTLSMaximumSupportedProtocolVersion_, value); + void cancelWithCloseCode_reason_(int closeCode, objc.NSData? reason) { + _objc_msgSend_638(this.pointer, _sel_cancelWithCloseCode_reason_, closeCode, + reason?.pointer ?? ffi.nullptr); } - bool get HTTPShouldUsePipelining { - return _objc_msgSend_12(this.pointer, _sel_HTTPShouldUsePipelining); + int get maximumMessageSize { + return _objc_msgSend_114(this.pointer, _sel_maximumMessageSize); } - set HTTPShouldUsePipelining(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setHTTPShouldUsePipelining_, value); + set maximumMessageSize(int value) { + return _objc_msgSend_134(this.pointer, _sel_setMaximumMessageSize_, value); } - bool get HTTPShouldSetCookies { - return _objc_msgSend_12(this.pointer, _sel_HTTPShouldSetCookies); + int get closeCode { + return _objc_msgSend_639(this.pointer, _sel_closeCode); } - set HTTPShouldSetCookies(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setHTTPShouldSetCookies_, value); + objc.NSData? get closeReason { + final _ret = _objc_msgSend_325(this.pointer, _sel_closeReason); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - int get HTTPCookieAcceptPolicy { - return _objc_msgSend_856(this.pointer, _sel_HTTPCookieAcceptPolicy); + @override + NSURLSessionWebSocketTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: true, release: true); } - set HTTPCookieAcceptPolicy(int value) { - return _objc_msgSend_857( - this.pointer, _sel_setHTTPCookieAcceptPolicy_, value); + static NSURLSessionWebSocketTask new1() { + final _ret = _objc_msgSend_40(_class_NSURLSessionWebSocketTask, _sel_new); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } - NSDictionary? get HTTPAdditionalHeaders { - final _ret = _objc_msgSend_390(this.pointer, _sel_HTTPAdditionalHeaders); - return _ret.address == 0 - ? null - : NSDictionary._(_ret, retain: true, release: true); + static NSURLSessionWebSocketTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionWebSocketTask, _sel_allocWithZone_, zone); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } - set HTTPAdditionalHeaders(NSDictionary? value) { - return _objc_msgSend_634(this.pointer, _sel_setHTTPAdditionalHeaders_, - value?.pointer ?? ffi.nullptr); + static NSURLSessionWebSocketTask alloc() { + final _ret = _objc_msgSend_40(_class_NSURLSessionWebSocketTask, _sel_alloc); + return NSURLSessionWebSocketTask.castFromPointer(_ret, + retain: false, release: true); } - int get HTTPMaximumConnectionsPerHost { - return _objc_msgSend_83(this.pointer, _sel_HTTPMaximumConnectionsPerHost); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionWebSocketTask, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - set HTTPMaximumConnectionsPerHost(int value) { - return _objc_msgSend_635( - this.pointer, _sel_setHTTPMaximumConnectionsPerHost_, value); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionWebSocketTask, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSHTTPCookieStorage? get HTTPCookieStorage { - final _ret = _objc_msgSend_1047(this.pointer, _sel_HTTPCookieStorage); - return _ret.address == 0 - ? null - : NSHTTPCookieStorage._(_ret, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSURLSessionWebSocketTask, _sel_accessInstanceVariablesDirectly); } - set HTTPCookieStorage(NSHTTPCookieStorage? value) { - return _objc_msgSend_1048(this.pointer, _sel_setHTTPCookieStorage_, - value?.pointer ?? ffi.nullptr); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSURLSessionWebSocketTask, _sel_useStoredAccessor); } - NSURLCredentialStorage? get URLCredentialStorage { - final _ret = _objc_msgSend_1049(this.pointer, _sel_URLCredentialStorage); - return _ret.address == 0 - ? null - : NSURLCredentialStorage._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionWebSocketTask, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - set URLCredentialStorage(NSURLCredentialStorage? value) { - return _objc_msgSend_1050(this.pointer, _sel_setURLCredentialStorage_, - value?.pointer ?? ffi.nullptr); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionWebSocketTask, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSURLCache? get URLCache { - final _ret = _objc_msgSend_1051(this.pointer, _sel_URLCache); - return _ret.address == 0 - ? null - : NSURLCache._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionWebSocketTask, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - set URLCache(NSURLCache? value) { - return _objc_msgSend_1052( - this.pointer, _sel_setURLCache_, value?.pointer ?? ffi.nullptr); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSURLSessionWebSocketTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - bool get shouldUseExtendedBackgroundIdleMode { - return _objc_msgSend_12( - this.pointer, _sel_shouldUseExtendedBackgroundIdleMode); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionWebSocketTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - set shouldUseExtendedBackgroundIdleMode(bool value) { - return _objc_msgSend_527( - this.pointer, _sel_setShouldUseExtendedBackgroundIdleMode_, value); +late final _class_NSURLSessionWebSocketTask = + objc.getClass("NSURLSessionWebSocketTask"); + +class NSURLSessionWebSocketMessage extends objc.NSObject { + NSURLSessionWebSocketMessage._(ffi.Pointer pointer, + {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.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); + + /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketMessage); } - NSArray? get protocolClasses { - final _ret = _objc_msgSend_84(this.pointer, _sel_protocolClasses); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + NSURLSessionWebSocketMessage initWithData_(objc.NSData data) { + final _ret = + _objc_msgSend_340(this.pointer, _sel_initWithData_, data.pointer); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); } - set protocolClasses(NSArray? value) { - return _objc_msgSend_1053( - this.pointer, _sel_setProtocolClasses_, value?.pointer ?? ffi.nullptr); + NSURLSessionWebSocketMessage initWithString_(objc.NSString string) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithString_, string.pointer); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); } - int get multipathServiceType { - return _objc_msgSend_1054(this.pointer, _sel_multipathServiceType); + int get type { + return _objc_msgSend_634(this.pointer, _sel_type); } - set multipathServiceType(int value) { - return _objc_msgSend_1055( - this.pointer, _sel_setMultipathServiceType_, value); + objc.NSData? get data { + final _ret = _objc_msgSend_325(this.pointer, _sel_data); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); } - @override - NSURLSessionConfiguration init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionConfiguration._(_ret, retain: true, release: true); + objc.NSString? get string { + final _ret = _objc_msgSend_13(this.pointer, _sel_string); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionConfiguration new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionConfiguration, _sel_new); - return NSURLSessionConfiguration._(_ret, retain: false, release: true); + @override + NSURLSessionWebSocketMessage init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: true, release: true); } - static NSURLSessionConfiguration backgroundSessionConfiguration_( - NSString identifier) { - final _ret = _objc_msgSend_1042(_class_NSURLSessionConfiguration, - _sel_backgroundSessionConfiguration_, identifier.pointer); - return NSURLSessionConfiguration._(_ret, retain: true, release: true); + static NSURLSessionWebSocketMessage new1() { + final _ret = + _objc_msgSend_40(_class_NSURLSessionWebSocketMessage, _sel_new); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } - static NSURLSessionConfiguration allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSURLSessionConfiguration, _sel_allocWithZone_, zone); - return NSURLSessionConfiguration._(_ret, retain: false, release: true); + static NSURLSessionWebSocketMessage allocWithZone_( + ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSURLSessionWebSocketMessage, _sel_allocWithZone_, zone); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } - static NSURLSessionConfiguration alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSessionConfiguration, _sel_alloc); - return NSURLSessionConfiguration._(_ret, retain: false, release: true); + static NSURLSessionWebSocketMessage alloc() { + final _ret = + _objc_msgSend_40(_class_NSURLSessionWebSocketMessage, _sel_alloc); + return NSURLSessionWebSocketMessage.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionConfiguration, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSURLSessionWebSocketMessage, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionConfiguration, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSURLSessionWebSocketMessage, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSessionConfiguration, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7(_class_NSURLSessionWebSocketMessage, + _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLSessionConfiguration, _sel_useStoredAccessor); + return _objc_msgSend_7( + _class_NSURLSessionWebSocketMessage, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionConfiguration, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSURLSessionWebSocketMessage, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionConfiguration, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSURLSessionWebSocketMessage, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionConfiguration, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSURLSessionWebSocketMessage, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSessionConfiguration, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLSessionConfiguration, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6(_class_NSURLSessionWebSocketMessage, + _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } -} - -late final _class_NSURLSessionConfiguration = - objc.getClass("NSURLSessionConfiguration"); -late final _sel_defaultSessionConfiguration = - objc.registerName("defaultSessionConfiguration"); -final _objc_msgSend_1041 = 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_1042 = 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:"); - -abstract class SSLProtocol { - static const int kSSLProtocolUnknown = 0; - static const int kTLSProtocol1 = 4; - static const int kTLSProtocol11 = 7; - static const int kTLSProtocol12 = 8; - static const int kDTLSProtocol1 = 9; - static const int kTLSProtocol13 = 10; - static const int kDTLSProtocol12 = 11; - static const int kTLSProtocolMaxSupported = 999; - static const int kSSLProtocol2 = 1; - static const int kSSLProtocol3 = 2; - static const int kSSLProtocol3Only = 3; - static const int kTLSProtocol1Only = 5; - static const int kSSLProtocolAll = 6; -} -late final _sel_TLSMinimumSupportedProtocol = - objc.registerName("TLSMinimumSupportedProtocol"); -final _objc_msgSend_1043 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setTLSMinimumSupportedProtocol_ = - objc.registerName("setTLSMinimumSupportedProtocol:"); -final _objc_msgSend_1044 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_TLSMaximumSupportedProtocol = - objc.registerName("TLSMaximumSupportedProtocol"); -late final _sel_setTLSMaximumSupportedProtocol_ = - objc.registerName("setTLSMaximumSupportedProtocol:"); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSURLSessionWebSocketMessage, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} -abstract class tls_protocol_version_t { - static const int tls_protocol_version_TLSv10 = 769; - static const int tls_protocol_version_TLSv11 = 770; - static const int tls_protocol_version_TLSv12 = 771; - static const int tls_protocol_version_TLSv13 = 772; - static const int tls_protocol_version_DTLSv10 = -257; - static const int tls_protocol_version_DTLSv12 = -259; +late final _class_NSURLSessionWebSocketMessage = + objc.getClass("NSURLSessionWebSocketMessage"); + +abstract class NSURLSessionWebSocketMessageType { + static const int NSURLSessionWebSocketMessageTypeData = 0; + static const int NSURLSessionWebSocketMessageTypeString = 1; } -late final _sel_TLSMinimumSupportedProtocolVersion = - objc.registerName("TLSMinimumSupportedProtocolVersion"); -final _objc_msgSend_1045 = objc.msgSendPointer +final _objc_msgSend_634 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -53185,126 +30460,225 @@ final _objc_msgSend_1045 = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setTLSMinimumSupportedProtocolVersion_ = - objc.registerName("setTLSMinimumSupportedProtocolVersion:"); -final _objc_msgSend_1046 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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_1047 = 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_1048 = objc.msgSendPointer +late final _sel_sendMessage_completionHandler_ = + objc.registerName("sendMessage:completionHandler:"); +final _objc_msgSend_635 = 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_1049 = 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_1050 = 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)>(); -late final _sel_URLCache = objc.registerName("URLCache"); -final _objc_msgSend_1051 = objc.msgSendPointer + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +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); +final _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + void Function( + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[id] = + fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +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); + + /// 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); + } + + /// 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.newBlock( + _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; + + /// 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.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + (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; + + /// 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_NSURLSessionWebSocketMessage_NSError.listener( + void Function(NSURLSessionWebSocketMessage?, objc.NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( + (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.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURLSessionWebSocketMessage? 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_receiveMessageWithCompletionHandler_ = + objc.registerName("receiveMessageWithCompletionHandler:"); +final _objc_msgSend_636 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_setURLCache_ = objc.registerName("setURLCache:"); -final _objc_msgSend_1052 = objc.msgSendPointer + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_sendPingWithPongReceiveHandler_ = + objc.registerName("sendPingWithPongReceiveHandler:"); +final _objc_msgSend_637 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + 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_1053 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSURLSessionWebSocketCloseCode { + static const int NSURLSessionWebSocketCloseCodeInvalid = 0; + static const int NSURLSessionWebSocketCloseCodeNormalClosure = 1000; + static const int NSURLSessionWebSocketCloseCodeGoingAway = 1001; + static const int NSURLSessionWebSocketCloseCodeProtocolError = 1002; + static const int NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; + static const int NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; + static const int NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; + static const int NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; + static const int NSURLSessionWebSocketCloseCodePolicyViolation = 1008; + static const int NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; + static const int NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = + 1010; + static const int NSURLSessionWebSocketCloseCodeInternalServerError = 1011; + static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; +} + +late final _sel_cancelWithCloseCode_reason_ = + objc.registerName("cancelWithCloseCode:reason:"); +final _objc_msgSend_638 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( ffi.Pointer, ffi.Pointer, + ffi.Int32, ffi.Pointer)>>() .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); - -abstract class NSURLSessionMultipathServiceType { - static const int NSURLSessionMultipathServiceTypeNone = 0; - static const int NSURLSessionMultipathServiceTypeHandover = 1; - static const int NSURLSessionMultipathServiceTypeInteractive = 2; - static const int NSURLSessionMultipathServiceTypeAggregate = 3; -} - -late final _sel_multipathServiceType = - objc.registerName("multipathServiceType"); -final _objc_msgSend_1054 = objc.msgSendPointer + 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_closeCode = objc.registerName("closeCode"); +final _objc_msgSend_639 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Int32 Function(ffi.Pointer, @@ -53312,21 +30686,10 @@ final _objc_msgSend_1054 = objc.msgSendPointer .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setMultipathServiceType_ = - objc.registerName("setMultipathServiceType:"); -final _objc_msgSend_1055 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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_1056 = objc.msgSendPointer +late final _sel_closeReason = objc.registerName("closeReason"); +late final _sel_webSocketTaskWithURL_ = + objc.registerName("webSocketTaskWithURL:"); +final _objc_msgSend_640 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -53336,37 +30699,35 @@ final _objc_msgSend_1056 = objc.msgSendPointer .asFunction< ffi.Pointer Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_sessionWithConfiguration_delegate_delegateQueue_ = - objc.registerName("sessionWithConfiguration:delegate:delegateQueue:"); -final _objc_msgSend_1057 = objc.msgSendPointer +late final _sel_webSocketTaskWithURL_protocols_ = + objc.registerName("webSocketTaskWithURL:protocols:"); +final _objc_msgSend_641 = 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"); -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( +late final _sel_webSocketTaskWithRequest_ = + objc.registerName("webSocketTaskWithRequest:"); +final _objc_msgSend_642 = 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 arg0, ffi.Pointer arg1, @@ -53383,41 +30744,43 @@ void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline( ffi.Pointer, ffi.Pointer, ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry = , ffi.Pointer, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex = 0; +int _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex = 0; ffi.Pointer - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[id] = fn; + final id = + ++_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline( +void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( ffi.Pointer block, ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureRegistry[ + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[ block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._( +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); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSArray_NSArray_NSArray castFromPointer( + static ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSArray_NSArray_NSArray._(pointer, + return ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError._(pointer, retain: retain, release: release); } @@ -53426,7 +30789,7 @@ class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends objc.ObjCBlockBase { /// This block must be invoked by native 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( + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< ffi.Void Function( @@ -53441,7 +30804,7 @@ class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends objc.ObjCBlockBase { ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_fnPtrTrampoline) + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; @@ -53451,22 +30814,21 @@ class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends objc.ObjCBlockBase { /// This block must be invoked by native 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(NSArray, NSArray, NSArray) fn) + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunction( + void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => - fn(NSArray._(arg0, retain: true, release: true), NSArray._(arg1, retain: true, release: true), NSArray._(arg2, retain: true, release: true))))); + 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; /// Creates a listener block from a Dart function. @@ -53478,23 +30840,25 @@ 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(NSArray, NSArray, NSArray) fn) + ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.listener( + void Function(objc.NSData?, NSURLResponse?, objc.NSError?) fn) : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_closureTrampoline) - ..keepIsolateAlive = false) + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) + ..keepIsolateAlive = false) .nativeFunction .cast(), - _ObjCBlock_ffiVoid_NSArray_NSArray_NSArray_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( - NSArray._(arg0, retain: true, release: true), - NSArray._(arg1, retain: true, release: true), - NSArray._(arg2, retain: true, release: true))))); + _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( + (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.NativeCallable< ffi.Void Function( ffi.Pointer, @@ -53502,66 +30866,164 @@ class ObjCBlock_ffiVoid_NSArray_NSArray_NSArray extends objc.ObjCBlockBase { ffi.Pointer, ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(NSArray arg0, NSArray arg1, NSArray arg2) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, arg0.pointer, arg1.pointer, arg2.pointer); + void call(objc.NSData? arg0, NSURLResponse? arg1, objc.NSError? arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, + arg0?.pointer ?? ffi.nullptr, + arg1?.pointer ?? ffi.nullptr, + arg2?.pointer ?? ffi.nullptr); } -late final _sel_getTasksWithCompletionHandler_ = - objc.registerName("getTasksWithCompletionHandler:"); -final _objc_msgSend_1058 = objc.msgSendPointer +late final _sel_dataTaskWithRequest_completionHandler_ = + objc.registerName("dataTaskWithRequest:completionHandler:"); +final _objc_msgSend_643 = 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_644 = 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_645 = 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:"); +final _objc_msgSend_646 = 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_647 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + 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 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +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)>>() - .asFunction)>()(arg0); -final _ObjCBlock_ffiVoid_NSArray1_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSArray1_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSArray1_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSArray1_closureRegistry[id] = fn; + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSArray1_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSArray1_closureRegistry[block.ref.target.address]!( - arg0); +void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); -class ObjCBlock_ffiVoid_NSArray1 extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSArray1._(ffi.Pointer pointer, - {bool retain = false, bool release = true}) +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); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSArray1 castFromPointer( + static ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSArray1._(pointer, + return ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError._(pointer, retain: retain, release: release); } @@ -53570,16 +31032,22 @@ class ObjCBlock_ffiVoid_NSArray1 extends objc.ObjCBlockBase { /// This block must be invoked by native 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( + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> ptr) : this._(objc.newBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray1_fnPtrTrampoline) + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; @@ -53589,16 +31057,21 @@ class ObjCBlock_ffiVoid_NSArray1 extends objc.ObjCBlockBase { /// This block must be invoked by native 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(NSArray) fn) + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.fromFunction( + void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSArray1_registerClosure( - (ffi.Pointer arg0) => - fn(NSArray._(arg0, retain: true, release: true))))); + _dartFuncTrampoline ??= + ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( + (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; /// Creates a listener block from a Dart function. @@ -53610,706 +31083,568 @@ class ObjCBlock_ffiVoid_NSArray1 extends objc.ObjCBlockBase { /// /// Note that unlike the default behavior of NativeCallable.listener, listener /// blocks do not keep the isolate alive. - ObjCBlock_ffiVoid_NSArray1.listener(void Function(NSArray) fn) + ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError.listener( + void Function(objc.NSURL?, NSURLResponse?, objc.NSError?) fn) : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSArray1_closureTrampoline) - ..keepIsolateAlive = false) + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) + ..keepIsolateAlive = false) .nativeFunction .cast(), - _ObjCBlock_ffiVoid_NSArray1_registerClosure( - (ffi.Pointer arg0) => - fn(NSArray._(arg0, retain: true, release: true))))); + _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure((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.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; - void call(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); + void call(objc.NSURL? arg0, NSURLResponse? arg1, objc.NSError? arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, + arg0?.pointer ?? ffi.nullptr, + arg1?.pointer ?? ffi.nullptr, + arg2?.pointer ?? ffi.nullptr); } -late final _sel_getAllTasksWithCompletionHandler_ = - objc.registerName("getAllTasksWithCompletionHandler:"); -final _objc_msgSend_1059 = objc.msgSendPointer +late final _sel_downloadTaskWithRequest_completionHandler_ = + objc.registerName("downloadTaskWithRequest:completionHandler:"); +final _objc_msgSend_648 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.Pointer Function( + ffi.Pointer, + 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_1060 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_downloadTaskWithURL_completionHandler_ = + objc.registerName("downloadTaskWithURL:completionHandler:"); +final _objc_msgSend_649 = 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)>(); -late final _sel_dataTaskWithURL_ = objc.registerName("dataTaskWithURL:"); -final _objc_msgSend_1061 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_downloadTaskWithResumeData_completionHandler_ = + objc.registerName("downloadTaskWithResumeData:completionHandler:"); +final _objc_msgSend_650 = 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 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); -class NSURLSessionUploadTask extends NSURLSessionDataTask { - NSURLSessionUploadTask._(ffi.Pointer pointer, +class NSProtocolChecker extends NSProxy { + NSProtocolChecker._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLSessionUploadTask] that points to the same underlying object as [other]. - static NSURLSessionUploadTask castFrom( - T other) { - return NSURLSessionUploadTask._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSProtocolChecker] that points to the same underlying object as [other]. + NSProtocolChecker.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSURLSessionUploadTask] that wraps the given raw object pointer. - static NSURLSessionUploadTask castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLSessionUploadTask._(other, retain: retain, release: release); - } + /// 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 [NSURLSessionUploadTask]. + /// Returns whether [obj] is an instance of [NSProtocolChecker]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionUploadTask); - } - - @override - NSURLSessionUploadTask init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionUploadTask._(_ret, retain: true, release: true); - } - - static NSURLSessionUploadTask new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionUploadTask, _sel_new); - return NSURLSessionUploadTask._(_ret, retain: false, release: true); - } - - void cancelByProducingResumeData_( - ObjCBlock_ffiVoid_NSData completionHandler) { - _objc_msgSend_1062(this.pointer, _sel_cancelByProducingResumeData_, - completionHandler.pointer); - } - - static NSURLSessionUploadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSURLSessionUploadTask, _sel_allocWithZone_, zone); - return NSURLSessionUploadTask._(_ret, retain: false, release: true); - } - - static NSURLSessionUploadTask alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSessionUploadTask, _sel_alloc); - return NSURLSessionUploadTask._(_ret, retain: false, release: true); - } - - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionUploadTask, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); - } - - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionUploadTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); - } - - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSessionUploadTask, _sel_accessInstanceVariablesDirectly); - } - - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLSessionUploadTask, _sel_useStoredAccessor); + obj.pointer, _sel_isKindOfClass_, _class_NSProtocolChecker); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionUploadTask, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + objc.Protocol get protocol { + final _ret = _objc_msgSend_651(this.pointer, _sel_protocol); + return objc.Protocol.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionUploadTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + objc.NSObject? get target { + final _ret = _objc_msgSend_457(this.pointer, _sel_target); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionUploadTask, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + static NSProtocolChecker protocolCheckerWithTarget_protocol_( + objc.NSObject anObject, objc.Protocol aProtocol) { + final _ret = _objc_msgSend_652( + _class_NSProtocolChecker, + _sel_protocolCheckerWithTarget_protocol_, + anObject.pointer, + aProtocol.pointer); + return NSProtocolChecker.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSessionUploadTask, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + NSProtocolChecker initWithTarget_protocol_( + objc.NSObject anObject, objc.Protocol aProtocol) { + final _ret = _objc_msgSend_652(this.pointer, _sel_initWithTarget_protocol_, + anObject.pointer, aProtocol.pointer); + return NSProtocolChecker.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLSessionUploadTask, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject alloc() { + final _ret = _objc_msgSend_40(_class_NSProtocolChecker, _sel_alloc); + return objc.NSObject.castFromPointer(_ret, retain: false, release: true); } -} - -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); -final _ObjCBlock_ffiVoid_NSData_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSData_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSData_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSData_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSData_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSData_closureRegistry[block.ref.target.address]!(arg0); - -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); - /// 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 bool respondsToSelector_(ffi.Pointer aSelector) { + return _objc_msgSend_228( + _class_NSProtocolChecker, _sel_respondsToSelector_, aSelector); } - - /// 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.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_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_NSData.fromFunction(void Function(NSData?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSData._(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_NSData.listener(void Function(NSData?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_registerClosure( - (ffi.Pointer arg0) => fn(arg0.address == 0 - ? null - : NSData._(arg0, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSData? arg0) => pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer block, - ffi.Pointer arg0)>>() - .asFunction< - void Function( - ffi.Pointer, ffi.Pointer)>()( - pointer, arg0?.pointer ?? ffi.nullptr); } -late final _sel_cancelByProducingResumeData_ = - objc.registerName("cancelByProducingResumeData:"); -final _objc_msgSend_1062 = 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_1063 = objc.msgSendPointer +late final _class_NSProtocolChecker = objc.getClass("NSProtocolChecker"); +final _objc_msgSend_651 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(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_1064 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer)>(); +late final _sel_target = objc.registerName("target"); +late final _sel_protocolCheckerWithTarget_protocol_ = + objc.registerName("protocolCheckerWithTarget:protocol:"); +final _objc_msgSend_652 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_uploadTaskWithResumeData_ = - objc.registerName("uploadTaskWithResumeData:"); -final _objc_msgSend_1065 = 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_1066 = 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_initWithTarget_protocol_ = + objc.registerName("initWithTarget:protocol:"); -class NSURLSessionDownloadTask extends NSURLSessionTask { - NSURLSessionDownloadTask._(ffi.Pointer pointer, +class NSTask extends objc.NSObject { + NSTask._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLSessionDownloadTask] that points to the same underlying object as [other]. - static NSURLSessionDownloadTask castFrom( - T other) { - return NSURLSessionDownloadTask._(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.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); } - /// Returns a [NSURLSessionDownloadTask] that wraps the given raw object pointer. - static NSURLSessionDownloadTask castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLSessionDownloadTask._(other, retain: retain, release: release); + @override + NSTask init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSTask.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLSessionDownloadTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionDownloadTask); + objc.NSURL? get executableURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_executableURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - void cancelByProducingResumeData_( - ObjCBlock_ffiVoid_NSData completionHandler) { - _objc_msgSend_1062(this.pointer, _sel_cancelByProducingResumeData_, - completionHandler.pointer); + set executableURL(objc.NSURL? value) { + return _objc_msgSend_566( + this.pointer, _sel_setExecutableURL_, value?.pointer ?? ffi.nullptr); } - @override - NSURLSessionDownloadTask init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionDownloadTask._(_ret, retain: true, release: true); + objc.NSArray? get arguments { + final _ret = _objc_msgSend_69(this.pointer, _sel_arguments); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionDownloadTask new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionDownloadTask, _sel_new); - return NSURLSessionDownloadTask._(_ret, retain: false, release: true); + set arguments(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setArguments_, value?.pointer ?? ffi.nullptr); } - static NSURLSessionDownloadTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSURLSessionDownloadTask, _sel_allocWithZone_, zone); - return NSURLSessionDownloadTask._(_ret, retain: false, release: true); + objc.NSDictionary? get environment { + final _ret = _objc_msgSend_65(this.pointer, _sel_environment); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionDownloadTask alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSessionDownloadTask, _sel_alloc); - return NSURLSessionDownloadTask._(_ret, retain: false, release: true); + set environment(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, _sel_setEnvironment_, value?.pointer ?? ffi.nullptr); + } + + objc.NSURL? get currentDirectoryURL { + final _ret = _objc_msgSend_10(this.pointer, _sel_currentDirectoryURL); + return _ret.address == 0 + ? null + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); + } + + set currentDirectoryURL(objc.NSURL? value) { + return _objc_msgSend_566(this.pointer, _sel_setCurrentDirectoryURL_, + value?.pointer ?? ffi.nullptr); + } + + objc.NSData? get launchRequirementData { + final _ret = _objc_msgSend_325(this.pointer, _sel_launchRequirementData); + return _ret.address == 0 + ? null + : objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + set launchRequirementData(objc.NSData? value) { + return _objc_msgSend_571(this.pointer, _sel_setLaunchRequirementData_, + value?.pointer ?? ffi.nullptr); + } + + objc.NSObject? get standardInput { + final _ret = _objc_msgSend_66(this.pointer, _sel_standardInput); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + set standardInput(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setStandardInput_, value?.pointer ?? ffi.nullptr); + } + + objc.NSObject? get standardOutput { + final _ret = _objc_msgSend_66(this.pointer, _sel_standardOutput); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + set standardOutput(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setStandardOutput_, value?.pointer ?? ffi.nullptr); + } + + objc.NSObject? get standardError { + final _ret = _objc_msgSend_66(this.pointer, _sel_standardError); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionDownloadTask, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + set standardError(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setStandardError_, value?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionDownloadTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + bool launchAndReturnError_(ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_launchAndReturnError_, error); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSessionDownloadTask, _sel_accessInstanceVariablesDirectly); + void interrupt() { + _objc_msgSend_82(this.pointer, _sel_interrupt); } - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLSessionDownloadTask, _sel_useStoredAccessor); + void terminate() { + _objc_msgSend_82(this.pointer, _sel_terminate); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionDownloadTask, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + bool suspend() { + return _objc_msgSend_7(this.pointer, _sel_suspend); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionDownloadTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + bool resume() { + return _objc_msgSend_7(this.pointer, _sel_resume); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionDownloadTask, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + int get processIdentifier { + return _objc_msgSend_264(this.pointer, _sel_processIdentifier); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSessionDownloadTask, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + bool get running { + return _objc_msgSend_7(this.pointer, _sel_isRunning); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLSessionDownloadTask, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + int get terminationStatus { + return _objc_msgSend_264(this.pointer, _sel_terminationStatus); } -} -late final _class_NSURLSessionDownloadTask = - objc.getClass("NSURLSessionDownloadTask"); -late final _sel_downloadTaskWithRequest_ = - objc.registerName("downloadTaskWithRequest:"); -final _objc_msgSend_1067 = 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_1068 = 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_1069 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + int get terminationReason { + return _objc_msgSend_653(this.pointer, _sel_terminationReason); + } -class NSURLSessionStreamTask extends NSURLSessionTask { - NSURLSessionStreamTask._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + ObjCBlock_ffiVoid_NSTask? get terminationHandler { + final _ret = _objc_msgSend_654(this.pointer, _sel_terminationHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_NSTask.castFromPointer(_ret, + retain: true, release: true); + } - /// Returns a [NSURLSessionStreamTask] that points to the same underlying object as [other]. - static NSURLSessionStreamTask castFrom( - T other) { - return NSURLSessionStreamTask._(other.pointer, retain: true, release: true); + set terminationHandler(ObjCBlock_ffiVoid_NSTask? value) { + return _objc_msgSend_655(this.pointer, _sel_setTerminationHandler_, + value?.pointer ?? ffi.nullptr); } - /// Returns a [NSURLSessionStreamTask] that wraps the given raw object pointer. - static NSURLSessionStreamTask castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLSessionStreamTask._(other, retain: retain, release: release); + int get qualityOfService { + return _objc_msgSend_454(this.pointer, _sel_qualityOfService); } - /// Returns whether [obj] is an instance of [NSURLSessionStreamTask]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionStreamTask); + set qualityOfService(int value) { + return _objc_msgSend_455(this.pointer, _sel_setQualityOfService_, value); } - void readDataOfMinLength_maxLength_timeout_completionHandler_( - int minBytes, - int maxBytes, - double timeout, - ObjCBlock_ffiVoid_NSData_bool_NSError completionHandler) { - _objc_msgSend_1070( - this.pointer, - _sel_readDataOfMinLength_maxLength_timeout_completionHandler_, - minBytes, - maxBytes, - timeout, - completionHandler.pointer); + static NSTask? + launchedTaskWithExecutableURL_arguments_error_terminationHandler_( + objc.NSURL url, + objc.NSArray arguments, + ffi.Pointer> error, + ObjCBlock_ffiVoid_NSTask? terminationHandler) { + final _ret = _objc_msgSend_656( + _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); } - void writeData_timeout_completionHandler_(NSData data, double timeout, - ObjCBlock_ffiVoid_NSError completionHandler) { - _objc_msgSend_1071(this.pointer, _sel_writeData_timeout_completionHandler_, - data.pointer, timeout, completionHandler.pointer); + void waitUntilExit() { + _objc_msgSend_82(this.pointer, _sel_waitUntilExit); } - void captureStreams() { - _objc_msgSend_1(this.pointer, _sel_captureStreams); + objc.NSString? get launchPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_launchPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void closeWrite() { - _objc_msgSend_1(this.pointer, _sel_closeWrite); + set launchPath(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setLaunchPath_, value?.pointer ?? ffi.nullptr); } - void closeRead() { - _objc_msgSend_1(this.pointer, _sel_closeRead); + objc.NSString get currentDirectoryPath { + final _ret = _objc_msgSend_12(this.pointer, _sel_currentDirectoryPath); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void startSecureConnection() { - _objc_msgSend_1(this.pointer, _sel_startSecureConnection); + set currentDirectoryPath(objc.NSString value) { + return _objc_msgSend_99( + this.pointer, _sel_setCurrentDirectoryPath_, value.pointer); } - void stopSecureConnection() { - _objc_msgSend_1(this.pointer, _sel_stopSecureConnection); + void launch() { + _objc_msgSend_82(this.pointer, _sel_launch); } - @override - NSURLSessionStreamTask init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionStreamTask._(_ret, retain: true, release: true); + static NSTask launchedTaskWithLaunchPath_arguments_( + objc.NSString path, objc.NSArray arguments) { + final _ret = _objc_msgSend_657( + _class_NSTask, + _sel_launchedTaskWithLaunchPath_arguments_, + path.pointer, + arguments.pointer); + return NSTask.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionStreamTask new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionStreamTask, _sel_new); - return NSURLSessionStreamTask._(_ret, retain: false, release: true); + static NSTask new1() { + final _ret = _objc_msgSend_40(_class_NSTask, _sel_new); + return NSTask.castFromPointer(_ret, retain: false, release: true); } - static NSURLSessionStreamTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSURLSessionStreamTask, _sel_allocWithZone_, zone); - return NSURLSessionStreamTask._(_ret, retain: false, release: true); + static NSTask allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSTask, _sel_allocWithZone_, zone); + return NSTask.castFromPointer(_ret, retain: false, release: true); } - static NSURLSessionStreamTask alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSessionStreamTask, _sel_alloc); - return NSURLSessionStreamTask._(_ret, retain: false, release: true); + static NSTask alloc() { + final _ret = _objc_msgSend_40(_class_NSTask, _sel_alloc); + return NSTask.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionStreamTask, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSTask, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionStreamTask, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSTask, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSessionStreamTask, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7(_class_NSTask, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLSessionStreamTask, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSTask, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionStreamTask, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSTask, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionStreamTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51( + _class_NSTask, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionStreamTask, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSTask, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSessionStreamTask, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSTask, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLSessionStreamTask, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40(_class_NSTask, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -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) => +late final _class_NSTask = objc.getClass("NSTask"); +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_launchRequirementData = + objc.registerName("launchRequirementData"); +late final _sel_setLaunchRequirementData_ = + objc.registerName("setLaunchRequirementData:"); +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_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"); + +abstract class NSTaskTerminationReason { + static const int NSTaskTerminationReasonExit = 1; + static const int NSTaskTerminationReasonUncaughtSignal = 2; +} + +late final _sel_terminationReason = objc.registerName("terminationReason"); +final _objc_msgSend_653 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 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, - ffi.Bool arg1, ffi.Pointer arg2)>>() - .asFunction< - void Function(ffi.Pointer, bool, - ffi.Pointer)>()(arg0, arg1, arg2); -final _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( - void Function( - ffi.Pointer, bool, ffi.Pointer) - fn) { - final id = ++_ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[id] = fn; + ffi.Void Function(ffi.Pointer arg0)>>() + .asFunction)>()(arg0); +final _ObjCBlock_ffiVoid_NSTask_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSTask_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSTask_registerClosure( + void Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSTask_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSTask_closureRegistry[id] = fn; return ffi.Pointer.fromAddress(id); } -void _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - bool arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); +void _ObjCBlock_ffiVoid_NSTask_closureTrampoline( + ffi.Pointer block, ffi.Pointer arg0) => + _ObjCBlock_ffiVoid_NSTask_closureRegistry[block.ref.target.address]!(arg0); -class ObjCBlock_ffiVoid_NSData_bool_NSError extends objc.ObjCBlockBase { - ObjCBlock_ffiVoid_NSData_bool_NSError._(ffi.Pointer pointer, +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); /// Returns a block that wraps the given raw block pointer. - static ObjCBlock_ffiVoid_NSData_bool_NSError castFromPointer( + static ObjCBlock_ffiVoid_NSTask castFromPointer( ffi.Pointer pointer, {bool retain = false, bool release = false}) { - return ObjCBlock_ffiVoid_NSData_bool_NSError._(pointer, + return ObjCBlock_ffiVoid_NSTask._(pointer, retain: retain, release: release); } @@ -54318,20 +31653,16 @@ class ObjCBlock_ffiVoid_NSData_bool_NSError extends objc.ObjCBlockBase { /// This block must be invoked by native 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( + ObjCBlock_ffiVoid_NSTask.fromFunctionPointer( ffi.Pointer< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0, - ffi.Bool arg1, ffi.Pointer arg2)>> + ffi.Void Function(ffi.Pointer arg0)>> ptr) : this._(objc.newBlock( _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, + ffi.Void Function(ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_bool_NSError_fnPtrTrampoline) + _ObjCBlock_ffiVoid_NSTask_fnPtrTrampoline) .cast(), ptr.cast())); static ffi.Pointer? _cFuncTrampoline; @@ -54341,21 +31672,17 @@ class ObjCBlock_ffiVoid_NSData_bool_NSError extends objc.ObjCBlockBase { /// This block must be invoked by native 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(NSData, bool, NSError?) fn) + ObjCBlock_ffiVoid_NSTask.fromFunction(void Function(NSTask) fn) : this._(objc.newBlock( _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, + ffi.Void Function(ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + _ObjCBlock_ffiVoid_NSTask_closureTrampoline) .cast(), - _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(NSData._(arg0, retain: true, release: true), arg1, arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); + _ObjCBlock_ffiVoid_NSTask_registerClosure( + (ffi.Pointer arg0) => fn( + NSTask.castFromPointer(arg0, + retain: true, release: true))))); static ffi.Pointer? _dartFuncTrampoline; /// Creates a listener block from a Dart function. @@ -54367,3038 +31694,3156 @@ 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(NSData, bool, NSError?) fn) + ObjCBlock_ffiVoid_NSTask.listener(void Function(NSTask) fn) : this._(objc.newBlock( (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, + ffi.Void Function(ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_bool_NSError_closureTrampoline) + _ObjCBlock_ffiVoid_NSTask_closureTrampoline) ..keepIsolateAlive = false) .nativeFunction .cast(), - _ObjCBlock_ffiVoid_NSData_bool_NSError_registerClosure( - (ffi.Pointer arg0, bool arg1, - ffi.Pointer arg2) => - fn(NSData._(arg0, retain: true, release: true), arg1, arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); + _ObjCBlock_ffiVoid_NSTask_registerClosure( + (ffi.Pointer arg0) => fn( + NSTask.castFromPointer(arg0, + retain: true, release: true))))); static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Bool, - ffi.Pointer)>? _dartFuncListenerTrampoline; + ffi.Void Function( + ffi.Pointer, ffi.Pointer)>? + _dartFuncListenerTrampoline; - void call(NSData arg0, bool arg1, 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); + void call(NSTask 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_readDataOfMinLength_maxLength_timeout_completionHandler_ = objc - .registerName("readDataOfMinLength:maxLength:timeout:completionHandler:"); -final _objc_msgSend_1070 = objc.msgSendPointer +late final _sel_terminationHandler = objc.registerName("terminationHandler"); +final _objc_msgSend_654 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.UnsignedLong, - ffi.UnsignedLong, - ffi.Double, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + 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_1071 = objc.msgSendPointer + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setTerminationHandler_ = + objc.registerName("setTerminationHandler:"); +final _objc_msgSend_655 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( + 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_656 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Double, + ffi.Pointer, + ffi.Pointer>, ffi.Pointer)>>() .asFunction< - void Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - double, + ffi.Pointer, + ffi.Pointer>, 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_1072 = objc.msgSendPointer +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_launch = objc.registerName("launch"); +late final _sel_launchedTaskWithLaunchPath_arguments_ = + objc.registerName("launchedTaskWithLaunchPath:arguments:"); +final _objc_msgSend_657 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Long)>>() + ffi.Pointer)>>() .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - int)>(); + ffi.Pointer)>(); -class NSNetService extends NSObject { - NSNetService._(ffi.Pointer pointer, +class NSXMLElement extends NSXMLNode { + NSXMLElement._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSNetService] that points to the same underlying object as [other]. - static NSNetService castFrom(T other) { - return NSNetService._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSXMLElement] that points to the same underlying object as [other]. + NSXMLElement.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSNetService] that wraps the given raw object pointer. - static NSNetService castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSNetService._(other, retain: retain, release: release); - } + /// 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 [NSNetService]. + /// Returns whether [obj] is an instance of [NSXMLElement]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSNetService); + obj.pointer, _sel_isKindOfClass_, _class_NSXMLElement); } - NSNetService initWithDomain_type_name_port_( - NSString domain, NSString type, NSString name, int port) { - final _ret = _objc_msgSend_1073( - this.pointer, - _sel_initWithDomain_type_name_port_, - domain.pointer, - type.pointer, - name.pointer, - port); - return NSNetService._(_ret, retain: true, release: true); + NSXMLElement initWithName_(objc.NSString name) { + final _ret = + _objc_msgSend_35(this.pointer, _sel_initWithName_, name.pointer); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - NSNetService initWithDomain_type_name_( - NSString domain, NSString type, NSString name) { - final _ret = _objc_msgSend_1074( - this.pointer, - _sel_initWithDomain_type_name_, - domain.pointer, - type.pointer, - name.pointer); - return NSNetService._(_ret, retain: true, release: true); + NSXMLElement initWithName_URI_(objc.NSString name, objc.NSString? URI) { + final _ret = _objc_msgSend_694(this.pointer, _sel_initWithName_URI_, + name.pointer, URI?.pointer ?? ffi.nullptr); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - void scheduleInRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_scheduleInRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); + NSXMLElement initWithName_stringValue_( + objc.NSString name, objc.NSString? string) { + final _ret = _objc_msgSend_694(this.pointer, _sel_initWithName_stringValue_, + name.pointer, string?.pointer ?? ffi.nullptr); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); } - void removeFromRunLoop_forMode_(NSRunLoop aRunLoop, NSString mode) { - _objc_msgSend_569(this.pointer, _sel_removeFromRunLoop_forMode_, - aRunLoop.pointer, mode.pointer); + NSXMLElement? initWithXMLString_error_( + objc.NSString string, ffi.Pointer> error) { + final _ret = _objc_msgSend_695( + this.pointer, _sel_initWithXMLString_error_, string.pointer, error); + return _ret.address == 0 + ? null + : NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSXMLElement initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray elementsForName_(objc.NSString name) { + final _ret = + _objc_msgSend_445(this.pointer, _sel_elementsForName_, name.pointer); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSArray elementsForLocalName_URI_( + objc.NSString localName, objc.NSString? URI) { + final _ret = _objc_msgSend_696(this.pointer, _sel_elementsForLocalName_URI_, + localName.pointer, URI?.pointer ?? ffi.nullptr); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSObject? get delegate { - final _ret = _objc_msgSend_17(this.pointer, _sel_delegate); + void addAttribute_(NSXMLNode attribute) { + _objc_msgSend_673(this.pointer, _sel_addAttribute_, attribute.pointer); + } + + void removeAttributeForName_(objc.NSString name) { + _objc_msgSend_98(this.pointer, _sel_removeAttributeForName_, name.pointer); + } + + objc.NSArray? get attributes { + final _ret = _objc_msgSend_69(this.pointer, _sel_attributes); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set delegate(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setDelegate_, value?.pointer ?? ffi.nullptr); + set attributes(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setAttributes_, value?.pointer ?? ffi.nullptr); } - bool get includesPeerToPeer { - return _objc_msgSend_12(this.pointer, _sel_includesPeerToPeer); + void setAttributesWithDictionary_(objc.NSDictionary attributes) { + _objc_msgSend_697( + this.pointer, _sel_setAttributesWithDictionary_, attributes.pointer); } - set includesPeerToPeer(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setIncludesPeerToPeer_, value); + NSXMLNode? attributeForName_(objc.NSString name) { + final _ret = + _objc_msgSend_677(this.pointer, _sel_attributeForName_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - NSString get name { - final _ret = _objc_msgSend_21(this.pointer, _sel_name); - return NSString._(_ret, retain: true, release: true); + NSXMLNode? attributeForLocalName_URI_( + objc.NSString localName, objc.NSString? URI) { + final _ret = _objc_msgSend_698( + this.pointer, + _sel_attributeForLocalName_URI_, + localName.pointer, + URI?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - NSString get type { - final _ret = _objc_msgSend_21(this.pointer, _sel_type); - return NSString._(_ret, retain: true, release: true); + void addNamespace_(NSXMLNode aNamespace) { + _objc_msgSend_673(this.pointer, _sel_addNamespace_, aNamespace.pointer); } - NSString get domain { - final _ret = _objc_msgSend_21(this.pointer, _sel_domain); - return NSString._(_ret, retain: true, release: true); + void removeNamespaceForPrefix_(objc.NSString name) { + _objc_msgSend_98( + this.pointer, _sel_removeNamespaceForPrefix_, name.pointer); } - NSString? get hostName { - final _ret = _objc_msgSend_44(this.pointer, _sel_hostName); + objc.NSArray? get namespaces { + final _ret = _objc_msgSend_69(this.pointer, _sel_namespaces); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + set namespaces(objc.NSArray? value) { + return _objc_msgSend_605( + this.pointer, _sel_setNamespaces_, value?.pointer ?? ffi.nullptr); } - NSArray? get addresses { - final _ret = _objc_msgSend_84(this.pointer, _sel_addresses); + NSXMLNode? namespaceForPrefix_(objc.NSString name) { + final _ret = + _objc_msgSend_677(this.pointer, _sel_namespaceForPrefix_, name.pointer); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - int get port { - return _objc_msgSend_83(this.pointer, _sel_port); + NSXMLNode? resolveNamespaceForName_(objc.NSString name) { + final _ret = _objc_msgSend_677( + this.pointer, _sel_resolveNamespaceForName_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - void publish() { - _objc_msgSend_1(this.pointer, _sel_publish); + objc.NSString? resolvePrefixForNamespaceURI_(objc.NSString namespaceURI) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_resolvePrefixForNamespaceURI_, namespaceURI.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void publishWithOptions_(int options) { - _objc_msgSend_1075(this.pointer, _sel_publishWithOptions_, options); + void insertChild_atIndex_(NSXMLNode child, int index) { + _objc_msgSend_671( + this.pointer, _sel_insertChild_atIndex_, child.pointer, index); } - void resolve() { - _objc_msgSend_1(this.pointer, _sel_resolve); + void insertChildren_atIndex_(objc.NSArray children, int index) { + _objc_msgSend_672( + this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); } - void stop() { - _objc_msgSend_1(this.pointer, _sel_stop); + void removeChildAtIndex_(int index) { + _objc_msgSend_414(this.pointer, _sel_removeChildAtIndex_, index); } - static NSDictionary dictionaryFromTXTRecordData_(NSData txtData) { - final _ret = _objc_msgSend_1076(_class_NSNetService, - _sel_dictionaryFromTXTRecordData_, txtData.pointer); - return NSDictionary._(_ret, retain: true, release: true); + void setChildren_(objc.NSArray? children) { + _objc_msgSend_260( + this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); + } + + void addChild_(NSXMLNode child) { + _objc_msgSend_673(this.pointer, _sel_addChild_, child.pointer); + } + + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _objc_msgSend_674( + this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); + } + + void normalizeAdjacentTextNodesPreservingCDATA_(bool preserve) { + _objc_msgSend_336(this.pointer, + _sel_normalizeAdjacentTextNodesPreservingCDATA_, preserve); + } + + void setAttributesAsDictionary_(objc.NSDictionary attributes) { + _objc_msgSend_697( + this.pointer, _sel_setAttributesAsDictionary_, attributes.pointer); + } + + @override + NSXMLElement init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSXMLElement initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLElement, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLElement, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = _objc_msgSend_35( + _class_NSXMLElement, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLElement, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLElement, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSData dataFromTXTRecordDictionary_(NSDictionary txtDictionary) { - final _ret = _objc_msgSend_1077(_class_NSNetService, - _sel_dataFromTXTRecordDictionary_, txtDictionary.pointer); - return NSData._(_ret, retain: true, release: true); + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLElement, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void resolveWithTimeout_(double timeout) { - _objc_msgSend_541(this.pointer, _sel_resolveWithTimeout_, timeout); + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLElement, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool getInputStream_outputStream_( - ffi.Pointer> inputStream, - ffi.Pointer> outputStream) { - return _objc_msgSend_1078(this.pointer, _sel_getInputStream_outputStream_, - inputStream, outputStream); + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLElement, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool setTXTRecordData_(NSData? recordData) { - return _objc_msgSend_1079(this.pointer, _sel_setTXTRecordData_, - recordData?.pointer ?? ffi.nullptr); + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLElement, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSData? TXTRecordData() { - final _ret = _objc_msgSend_286(this.pointer, _sel_TXTRecordData); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLElement, _sel_DTDNodeWithXMLString_, string.pointer); return _ret.address == 0 ? null - : NSData._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void startMonitoring() { - _objc_msgSend_1(this.pointer, _sel_startMonitoring); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLElement, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void stopMonitoring() { - _objc_msgSend_1(this.pointer, _sel_stopMonitoring); + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_14( + _class_NSXMLElement, _sel_prefixForName_, name.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSNetService init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSNetService._(_ret, retain: true, release: true); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLElement, _sel_predefinedNamespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSNetService new1() { - final _ret = _objc_msgSend_2(_class_NSNetService, _sel_new); - return NSNetService._(_ret, retain: false, release: true); + static NSXMLElement new1() { + final _ret = _objc_msgSend_40(_class_NSXMLElement, _sel_new); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } - static NSNetService allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSXMLElement allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSNetService, _sel_allocWithZone_, zone); - return NSNetService._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSXMLElement, _sel_allocWithZone_, zone); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } - static NSNetService alloc() { - final _ret = _objc_msgSend_2(_class_NSNetService, _sel_alloc); - return NSNetService._(_ret, retain: false, release: true); + static NSXMLElement alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLElement, _sel_alloc); + return NSXMLElement.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSNetService, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLElement, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSNetService, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLElement, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSNetService, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSXMLElement, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSNetService, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSXMLElement, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSNetService, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLElement, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSNetService, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLElement, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSNetService, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLElement, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSNetService, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLElement, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSNetService, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSXMLElement, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_1073 = 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:"); -final _objc_msgSend_1074 = 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_includesPeerToPeer = objc.registerName("includesPeerToPeer"); -late final _sel_setIncludesPeerToPeer_ = - objc.registerName("setIncludesPeerToPeer:"); -late final _sel_type = objc.registerName("type"); - -abstract class NSNetServiceOptions { - static const int NSNetServiceNoAutoRename = 1; - static const int NSNetServiceListenForConnections = 2; -} - -late final _sel_publishWithOptions_ = objc.registerName("publishWithOptions:"); -final _objc_msgSend_1075 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .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:"); -final _objc_msgSend_1076 = 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_1077 = 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:"); -late final _sel_getInputStream_outputStream_ = - objc.registerName("getInputStream:outputStream:"); -final _objc_msgSend_1078 = 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_1079 = 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_1080 = 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 _class_NSXMLElement = objc.getClass("NSXMLElement"); -class NSURLSessionWebSocketTask extends NSURLSessionTask { - NSURLSessionWebSocketTask._(ffi.Pointer pointer, +class NSXMLNode extends objc.NSObject { + NSXMLNode._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSURLSessionWebSocketTask] that points to the same underlying object as [other]. - static NSURLSessionWebSocketTask castFrom( - T other) { - return NSURLSessionWebSocketTask._(other.pointer, - retain: true, release: true); - } + /// Constructs a [NSXMLNode] that points to the same underlying object as [other]. + NSXMLNode.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSURLSessionWebSocketTask] that wraps the given raw object pointer. - static NSURLSessionWebSocketTask castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLSessionWebSocketTask._(other, retain: retain, release: release); - } + /// 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 [NSURLSessionWebSocketTask]. + /// Returns whether [obj] is an instance of [NSXMLNode]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketTask); - } - - void sendMessage_completionHandler_(NSURLSessionWebSocketMessage message, - ObjCBlock_ffiVoid_NSError completionHandler) { - _objc_msgSend_1082(this.pointer, _sel_sendMessage_completionHandler_, - message.pointer, completionHandler.pointer); + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSXMLNode); } - void receiveMessageWithCompletionHandler_( - ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError - completionHandler) { - _objc_msgSend_1083(this.pointer, _sel_receiveMessageWithCompletionHandler_, - completionHandler.pointer); + @override + NSXMLNode init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - void sendPingWithPongReceiveHandler_( - ObjCBlock_ffiVoid_NSError pongReceiveHandler) { - _objc_msgSend_1084(this.pointer, _sel_sendPingWithPongReceiveHandler_, - pongReceiveHandler.pointer); + NSXMLNode initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - void cancelWithCloseCode_reason_(int closeCode, NSData? reason) { - _objc_msgSend_1085(this.pointer, _sel_cancelWithCloseCode_reason_, - closeCode, reason?.pointer ?? ffi.nullptr); + NSXMLNode initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - int get maximumMessageSize { - return _objc_msgSend_83(this.pointer, _sel_maximumMessageSize); + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLNode, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set maximumMessageSize(int value) { - return _objc_msgSend_635(this.pointer, _sel_setMaximumMessageSize_, value); + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLNode, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get closeCode { - return _objc_msgSend_1086(this.pointer, _sel_closeCode); + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = + _objc_msgSend_35(_class_NSXMLNode, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSData? get closeReason { - final _ret = _objc_msgSend_286(this.pointer, _sel_closeReason); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661( + _class_NSXMLNode, _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - @override - NSURLSessionWebSocketTask init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionWebSocketTask._(_ret, retain: true, release: true); + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLNode, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionWebSocketTask new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionWebSocketTask, _sel_new); - return NSURLSessionWebSocketTask._(_ret, retain: false, release: true); + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLNode, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionWebSocketTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSURLSessionWebSocketTask, _sel_allocWithZone_, zone); - return NSURLSessionWebSocketTask._(_ret, retain: false, release: true); + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLNode, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionWebSocketTask alloc() { - final _ret = _objc_msgSend_2(_class_NSURLSessionWebSocketTask, _sel_alloc); - return NSURLSessionWebSocketTask._(_ret, retain: false, release: true); + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLNode, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionWebSocketTask, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLNode, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionWebSocketTask, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLNode, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSURLSessionWebSocketTask, _sel_accessInstanceVariablesDirectly); + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLNode, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLSessionWebSocketTask, _sel_useStoredAccessor); + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLNode, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionWebSocketTask, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLNode, _sel_DTDNodeWithXMLString_, string.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionWebSocketTask, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + int get kind { + return _objc_msgSend_663(this.pointer, _sel_kind); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionWebSocketTask, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + objc.NSString? get name { + final _ret = _objc_msgSend_13(this.pointer, _sel_name); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSURLSessionWebSocketTask, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + set name(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLSessionWebSocketTask, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + objc.NSObject? get objectValue { + final _ret = _objc_msgSend_66(this.pointer, _sel_objectValue); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } -} - -late final _class_NSURLSessionWebSocketTask = - objc.getClass("NSURLSessionWebSocketTask"); -class NSURLSessionWebSocketMessage extends NSObject { - NSURLSessionWebSocketMessage._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSURLSessionWebSocketMessage] that points to the same underlying object as [other]. - static NSURLSessionWebSocketMessage castFrom( - T other) { - return NSURLSessionWebSocketMessage._(other.pointer, - retain: true, release: true); + set objectValue(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setObjectValue_, value?.pointer ?? ffi.nullptr); } - /// Returns a [NSURLSessionWebSocketMessage] that wraps the given raw object pointer. - static NSURLSessionWebSocketMessage castFromPointer( - ffi.Pointer other, - {bool retain = false, - bool release = false}) { - return NSURLSessionWebSocketMessage._(other, - retain: retain, release: release); + objc.NSString? get stringValue { + final _ret = _objc_msgSend_13(this.pointer, _sel_stringValue); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - /// Returns whether [obj] is an instance of [NSURLSessionWebSocketMessage]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSURLSessionWebSocketMessage); + set stringValue(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setStringValue_, value?.pointer ?? ffi.nullptr); } - NSURLSessionWebSocketMessage initWithData_(NSData data) { - final _ret = - _objc_msgSend_279(this.pointer, _sel_initWithData_, data.pointer); - return NSURLSessionWebSocketMessage._(_ret, retain: true, release: true); + void setStringValue_resolvingEntities_(objc.NSString string, bool resolve) { + _objc_msgSend_664(this.pointer, _sel_setStringValue_resolvingEntities_, + string.pointer, resolve); } - NSURLSessionWebSocketMessage initWithString_(NSString string) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithString_, string.pointer); - return NSURLSessionWebSocketMessage._(_ret, retain: true, release: true); + int get index { + return _objc_msgSend_29(this.pointer, _sel_index); } - int get type { - return _objc_msgSend_1081(this.pointer, _sel_type); + int get level { + return _objc_msgSend_29(this.pointer, _sel_level); } - NSData? get data { - final _ret = _objc_msgSend_286(this.pointer, _sel_data); + NSXMLDocument? get rootDocument { + final _ret = _objc_msgSend_688(this.pointer, _sel_rootDocument); return _ret.address == 0 ? null - : NSData._(_ret, retain: true, release: true); + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - NSString? get string { - final _ret = _objc_msgSend_44(this.pointer, _sel_string); + NSXMLNode? get parent { + final _ret = _objc_msgSend_689(this.pointer, _sel_parent); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); - } - - @override - NSURLSessionWebSocketMessage init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSURLSessionWebSocketMessage._(_ret, retain: true, release: true); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionWebSocketMessage new1() { - final _ret = _objc_msgSend_2(_class_NSURLSessionWebSocketMessage, _sel_new); - return NSURLSessionWebSocketMessage._(_ret, retain: false, release: true); + int get childCount { + return _objc_msgSend_29(this.pointer, _sel_childCount); } - static NSURLSessionWebSocketMessage allocWithZone_( - ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3( - _class_NSURLSessionWebSocketMessage, _sel_allocWithZone_, zone); - return NSURLSessionWebSocketMessage._(_ret, retain: false, release: true); + objc.NSArray? get children { + final _ret = _objc_msgSend_69(this.pointer, _sel_children); + return _ret.address == 0 + ? null + : objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSURLSessionWebSocketMessage alloc() { - final _ret = - _objc_msgSend_2(_class_NSURLSessionWebSocketMessage, _sel_alloc); - return NSURLSessionWebSocketMessage._(_ret, retain: false, release: true); + NSXMLNode? childAtIndex_(int index) { + final _ret = _objc_msgSend_690(this.pointer, _sel_childAtIndex_, index); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSURLSessionWebSocketMessage, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + NSXMLNode? get previousSibling { + final _ret = _objc_msgSend_689(this.pointer, _sel_previousSibling); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSURLSessionWebSocketMessage, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + NSXMLNode? get nextSibling { + final _ret = _objc_msgSend_689(this.pointer, _sel_nextSibling); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12(_class_NSURLSessionWebSocketMessage, - _sel_accessInstanceVariablesDirectly); + NSXMLNode? get previousNode { + final _ret = _objc_msgSend_689(this.pointer, _sel_previousNode); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static bool useStoredAccessor() { - return _objc_msgSend_12( - _class_NSURLSessionWebSocketMessage, _sel_useStoredAccessor); + NSXMLNode? get nextNode { + final _ret = _objc_msgSend_689(this.pointer, _sel_nextNode); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSURLSessionWebSocketMessage, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + void detach() { + _objc_msgSend_82(this.pointer, _sel_detach); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSURLSessionWebSocketMessage, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + objc.NSString? get XPath { + final _ret = _objc_msgSend_13(this.pointer, _sel_XPath); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSURLSessionWebSocketMessage, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + objc.NSString? get localName { + final _ret = _objc_msgSend_13(this.pointer, _sel_localName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85(_class_NSURLSessionWebSocketMessage, - _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + objc.NSString? get prefix { + final _ret = _objc_msgSend_13(this.pointer, _sel_prefix); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2( - _class_NSURLSessionWebSocketMessage, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + objc.NSString? get URI { + final _ret = _objc_msgSend_13(this.pointer, _sel_URI); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } -} - -late final _class_NSURLSessionWebSocketMessage = - objc.getClass("NSURLSessionWebSocketMessage"); - -abstract class NSURLSessionWebSocketMessageType { - static const int NSURLSessionWebSocketMessageTypeData = 0; - static const int NSURLSessionWebSocketMessageTypeString = 1; -} - -final _objc_msgSend_1081 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_sendMessage_completionHandler_ = - objc.registerName("sendMessage:completionHandler:"); -final _objc_msgSend_1082 = 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 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); -final _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry = - , ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex = - 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( - void Function( - ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[id] = - fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1) => - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1); - -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); - /// 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); + set URI(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setURI_, value?.pointer ?? ffi.nullptr); } - /// 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.newBlock( - _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; - - /// 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?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1) => - fn(arg0.address == 0 ? null : NSURLSessionWebSocketMessage._(arg0, retain: true, release: true), arg1.address == 0 ? null : NSError._(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_NSURLSessionWebSocketMessage_NSError.listener( - void Function(NSURLSessionWebSocketMessage?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= - ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURLSessionWebSocketMessage_NSError_registerClosure( - (ffi.Pointer arg0, ffi.Pointer arg1) => fn( - arg0.address == 0 - ? null - : NSURLSessionWebSocketMessage._(arg0, - retain: true, release: true), - arg1.address == 0 ? null : NSError._(arg1, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLNode, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - void call(NSURLSessionWebSocketMessage? arg0, 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); -} + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = + _objc_msgSend_14(_class_NSXMLNode, _sel_prefixForName_, name.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -late final _sel_receiveMessageWithCompletionHandler_ = - objc.registerName("receiveMessageWithCompletionHandler:"); -final _objc_msgSend_1083 = 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_1084 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLNode, _sel_predefinedNamespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } -abstract class NSURLSessionWebSocketCloseCode { - static const int NSURLSessionWebSocketCloseCodeInvalid = 0; - static const int NSURLSessionWebSocketCloseCodeNormalClosure = 1000; - static const int NSURLSessionWebSocketCloseCodeGoingAway = 1001; - static const int NSURLSessionWebSocketCloseCodeProtocolError = 1002; - static const int NSURLSessionWebSocketCloseCodeUnsupportedData = 1003; - static const int NSURLSessionWebSocketCloseCodeNoStatusReceived = 1005; - static const int NSURLSessionWebSocketCloseCodeAbnormalClosure = 1006; - static const int NSURLSessionWebSocketCloseCodeInvalidFramePayloadData = 1007; - static const int NSURLSessionWebSocketCloseCodePolicyViolation = 1008; - static const int NSURLSessionWebSocketCloseCodeMessageTooBig = 1009; - static const int NSURLSessionWebSocketCloseCodeMandatoryExtensionMissing = - 1010; - static const int NSURLSessionWebSocketCloseCodeInternalServerError = 1011; - static const int NSURLSessionWebSocketCloseCodeTLSHandshakeFailure = 1015; -} + objc.NSString get description { + final _ret = _objc_msgSend_12(this.pointer, _sel_description); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -late final _sel_cancelWithCloseCode_reason_ = - objc.registerName("cancelWithCloseCode:reason:"); -final _objc_msgSend_1085 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_closeCode = objc.registerName("closeCode"); -final _objc_msgSend_1086 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, - ffi.Pointer)>>() - .asFunction< - int Function( - ffi.Pointer, ffi.Pointer)>(); -late final _sel_closeReason = objc.registerName("closeReason"); -late final _sel_webSocketTaskWithURL_ = - objc.registerName("webSocketTaskWithURL:"); -final _objc_msgSend_1087 = 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_1088 = 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_1089 = 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 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); -final _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + objc.NSString get XMLString { + final _ret = _objc_msgSend_12(this.pointer, _sel_XMLString); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -void _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + objc.NSString XMLStringWithOptions_(int options) { + final _ret = + _objc_msgSend_691(this.pointer, _sel_XMLStringWithOptions_, options); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } -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); + objc.NSString canonicalXMLStringPreservingComments_(bool comments) { + final _ret = _objc_msgSend_692( + this.pointer, _sel_canonicalXMLStringPreservingComments_, comments); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } - /// 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); + objc.NSArray? nodesForXPath_error_( + objc.NSString xpath, ffi.Pointer> error) { + final _ret = _objc_msgSend_281( + this.pointer, _sel_nodesForXPath_error_, xpath.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.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_NSData_NSURLResponse_NSError.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>> - ptr) - : this._(objc.newBlock( - _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; + objc.NSArray? objectsForXQuery_constants_error_( + objc.NSString xquery, + objc.NSDictionary? constants, + ffi.Pointer> error) { + final _ret = _objc_msgSend_693( + this.pointer, + _sel_objectsForXQuery_constants_error_, + xquery.pointer, + constants?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : 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. - ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError.fromFunction( - void Function(NSData?, NSURLResponse?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 ? null : NSData._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSURLResponse._(arg1, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; + objc.NSArray? objectsForXQuery_error_( + objc.NSString xquery, ffi.Pointer> error) { + final _ret = _objc_msgSend_281( + this.pointer, _sel_objectsForXQuery_error_, xquery.pointer, error); + return _ret.address == 0 + ? null + : objc.NSArray.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_NSData_NSURLResponse_NSError.listener( - void Function(NSData?, NSURLResponse?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSData_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSData._(arg0, retain: true, release: true), - arg1.address == 0 - ? null - : NSURLResponse._(arg1, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; + static NSXMLNode new1() { + final _ret = _objc_msgSend_40(_class_NSXMLNode, _sel_new); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); + } - void call(NSData? arg0, NSURLResponse? arg1, NSError? arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, - arg0?.pointer ?? ffi.nullptr, - arg1?.pointer ?? ffi.nullptr, - arg2?.pointer ?? ffi.nullptr); -} + static NSXMLNode allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSXMLNode, _sel_allocWithZone_, zone); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); + } -late final _sel_dataTaskWithRequest_completionHandler_ = - objc.registerName("dataTaskWithRequest:completionHandler:"); -final _objc_msgSend_1090 = 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_1091 = 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_1092 = 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:"); -final _objc_msgSend_1093 = 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_1094 = 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 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); -final _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry = , ffi.Pointer, - ffi.Pointer)>{}; -int _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex = 0; -ffi.Pointer - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( - void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer) - fn) { - final id = - ++_ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} + static NSXMLNode alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLNode, _sel_alloc); + return NSXMLNode.castFromPointer(_ret, retain: false, release: true); + } -void _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureRegistry[ - block.ref.target.address]!(arg0, arg1, arg2); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLNode, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } -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); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLNode, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } - /// 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 bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLNode, _sel_accessInstanceVariablesDirectly); } - /// 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.newBlock( - _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 bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLNode, _sel_useStoredAccessor); + } - /// 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(NSURL?, NSURLResponse?, NSError?) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= - ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 ? null : NSURL._(arg0, retain: true, release: true), - arg1.address == 0 ? null : NSURLResponse._(arg1, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); - static ffi.Pointer? _dartFuncTrampoline; + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLNode, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLNode, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLNode, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_NSXMLNode, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLNode, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } +} + +late final _class_NSXMLNode = objc.getClass("NSXMLNode"); + +abstract class NSXMLNodeKind { + static const int NSXMLInvalidKind = 0; + static const int NSXMLDocumentKind = 1; + static const int NSXMLElementKind = 2; + static const int NSXMLAttributeKind = 3; + static const int NSXMLNamespaceKind = 4; + static const int NSXMLProcessingInstructionKind = 5; + static const int NSXMLCommentKind = 6; + static const int NSXMLTextKind = 7; + static const int NSXMLDTDKind = 8; + static const int NSXMLEntityDeclarationKind = 9; + static const int NSXMLAttributeDeclarationKind = 10; + static const int NSXMLElementDeclarationKind = 11; + static const int NSXMLNotationDeclarationKind = 12; +} - /// 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_NSURL_NSURLResponse_NSError.listener( - void Function(NSURL?, NSURLResponse?, NSError?) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSURL_NSURLResponse_NSError_registerClosure( - (ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2) => - fn( - arg0.address == 0 - ? null - : NSURL._(arg0, retain: true, release: true), - arg1.address == 0 - ? null - : NSURLResponse._(arg1, retain: true, release: true), - arg2.address == 0 ? null : NSError._(arg2, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>? _dartFuncListenerTrampoline; +late final _sel_initWithKind_ = objc.registerName("initWithKind:"); +final _objc_msgSend_658 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); - void call(NSURL? arg0, NSURLResponse? arg1, NSError? arg2) => - pointer.ref.invoke - .cast< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer block, - ffi.Pointer arg0, - ffi.Pointer arg1, - ffi.Pointer arg2)>>() - .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>()( - pointer, - arg0?.pointer ?? ffi.nullptr, - arg1?.pointer ?? ffi.nullptr, - arg2?.pointer ?? ffi.nullptr); +abstract class NSXMLNodeOptions { + static const int NSXMLNodeOptionsNone = 0; + static const int NSXMLNodeIsCDATA = 1; + static const int NSXMLNodeExpandEmptyElement = 2; + static const int NSXMLNodeCompactEmptyElement = 4; + static const int NSXMLNodeUseSingleQuotes = 8; + static const int NSXMLNodeUseDoubleQuotes = 16; + static const int NSXMLNodeNeverEscapeContents = 32; + static const int NSXMLDocumentTidyHTML = 512; + static const int NSXMLDocumentTidyXML = 1024; + static const int NSXMLDocumentValidate = 8192; + static const int NSXMLNodeLoadExternalEntitiesAlways = 16384; + static const int NSXMLNodeLoadExternalEntitiesSameOriginOnly = 32768; + static const int NSXMLNodeLoadExternalEntitiesNever = 524288; + static const int NSXMLDocumentXInclude = 65536; + static const int NSXMLNodePrettyPrint = 131072; + static const int NSXMLDocumentIncludeContentTypeDeclaration = 262144; + static const int NSXMLNodePreserveNamespaceOrder = 1048576; + static const int NSXMLNodePreserveAttributeOrder = 2097152; + static const int NSXMLNodePreserveEntities = 4194304; + static const int NSXMLNodePreservePrefixes = 8388608; + static const int NSXMLNodePreserveCDATA = 16777216; + static const int NSXMLNodePreserveWhitespace = 33554432; + static const int NSXMLNodePreserveDTD = 67108864; + static const int NSXMLNodePreserveCharacterReferences = 134217728; + static const int NSXMLNodePromoteSignificantWhitespace = 268435456; + static const int NSXMLNodePreserveEmptyElements = 6; + static const int NSXMLNodePreserveQuotes = 24; + static const int NSXMLNodePreserveAll = 4293918750; } -late final _sel_downloadTaskWithRequest_completionHandler_ = - objc.registerName("downloadTaskWithRequest:completionHandler:"); -final _objc_msgSend_1095 = objc.msgSendPointer +late final _sel_initWithKind_options_ = + objc.registerName("initWithKind:options:"); +final _objc_msgSend_659 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Int32, ffi.Int32)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_document = objc.registerName("document"); +late final _sel_documentWithRootElement_ = + objc.registerName("documentWithRootElement:"); +final _objc_msgSend_660 = 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_661 = 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)>(); -late final _sel_downloadTaskWithURL_completionHandler_ = - objc.registerName("downloadTaskWithURL:completionHandler:"); -final _objc_msgSend_1096 = objc.msgSendPointer + 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_662 = 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)>(); -late final _sel_downloadTaskWithResumeData_completionHandler_ = - objc.registerName("downloadTaskWithResumeData:completionHandler:"); -final _objc_msgSend_1097 = objc.msgSendPointer + 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:"); +late final _sel_kind = objc.registerName("kind"); +final _objc_msgSend_663 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Int32 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_664 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Bool)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer)>(); + bool)>(); +late final _sel_index = objc.registerName("index"); +late final _sel_level = objc.registerName("level"); -class NSProtocolChecker extends NSProxy { - NSProtocolChecker._(ffi.Pointer pointer, +class NSXMLDocument extends NSXMLNode { + NSXMLDocument._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSProtocolChecker] that points to the same underlying object as [other]. - static NSProtocolChecker castFrom(T other) { - return NSProtocolChecker._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSXMLDocument] that points to the same underlying object as [other]. + NSXMLDocument.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSProtocolChecker] that wraps the given raw object pointer. - static NSProtocolChecker castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSProtocolChecker._(other, retain: retain, release: release); - } + /// 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); - /// Returns whether [obj] is an instance of [NSProtocolChecker]. + /// Returns whether [obj] is an instance of [NSXMLDocument]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSProtocolChecker); + obj.pointer, _sel_isKindOfClass_, _class_NSXMLDocument); } - Protocol get protocol { - final _ret = _objc_msgSend_1098(this.pointer, _sel_protocol); - return Protocol._(_ret, retain: true, release: true); + @override + NSXMLDocument init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - NSObject? get target { - final _ret = _objc_msgSend_914(this.pointer, _sel_target); + NSXMLDocument? initWithXMLString_options_error_(objc.NSString string, + int mask, ffi.Pointer> error) { + final _ret = _objc_msgSend_665(this.pointer, + _sel_initWithXMLString_options_error_, string.pointer, mask, error); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - static NSProtocolChecker protocolCheckerWithTarget_protocol_( - NSObject anObject, Protocol aProtocol) { - final _ret = _objc_msgSend_1099( - _class_NSProtocolChecker, - _sel_protocolCheckerWithTarget_protocol_, - anObject.pointer, - aProtocol.pointer); - return NSProtocolChecker._(_ret, retain: true, release: true); + NSXMLDocument? initWithContentsOfURL_options_error_(objc.NSURL url, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_666(this.pointer, + _sel_initWithContentsOfURL_options_error_, url.pointer, mask, error); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); } - NSProtocolChecker initWithTarget_protocol_( - NSObject anObject, Protocol aProtocol) { - final _ret = _objc_msgSend_1099(this.pointer, _sel_initWithTarget_protocol_, - anObject.pointer, aProtocol.pointer); - return NSProtocolChecker._(_ret, retain: true, release: true); + NSXMLDocument? initWithData_options_error_(objc.NSData data, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_667(this.pointer, + _sel_initWithData_options_error_, data.pointer, mask, error); + return _ret.address == 0 + ? null + : NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + } + + NSXMLDocument initWithRootElement_(NSXMLElement? element) { + final _ret = _objc_msgSend_668(this.pointer, _sel_initWithRootElement_, + element?.pointer ?? ffi.nullptr); + return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject replacementClassForClass_(objc.NSObject cls) { + final _ret = _objc_msgSend_387( + _class_NSXMLDocument, _sel_replacementClassForClass_, cls.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString? get characterEncoding { + final _ret = _objc_msgSend_13(this.pointer, _sel_characterEncoding); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set characterEncoding(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setCharacterEncoding_, + value?.pointer ?? ffi.nullptr); + } + + objc.NSString? get version { + final _ret = _objc_msgSend_13(this.pointer, _sel_version); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set version(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setVersion_, value?.pointer ?? ffi.nullptr); + } + + bool get standalone { + return _objc_msgSend_7(this.pointer, _sel_isStandalone); + } + + set standalone(bool value) { + return _objc_msgSend_41(this.pointer, _sel_setStandalone_, value); + } + + int get documentContentKind { + return _objc_msgSend_669(this.pointer, _sel_documentContentKind); + } + + set documentContentKind(int value) { + return _objc_msgSend_670(this.pointer, _sel_setDocumentContentKind_, value); + } + + objc.NSString? get MIMEType { + final _ret = _objc_msgSend_13(this.pointer, _sel_MIMEType); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + set MIMEType(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setMIMEType_, value?.pointer ?? ffi.nullptr); + } + + NSXMLDTD? get DTD { + final _ret = _objc_msgSend_680(this.pointer, _sel_DTD); + return _ret.address == 0 + ? null + : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); + } + + set DTD(NSXMLDTD? value) { + return _objc_msgSend_681( + this.pointer, _sel_setDTD_, value?.pointer ?? ffi.nullptr); + } + + void setRootElement_(NSXMLElement root) { + _objc_msgSend_682(this.pointer, _sel_setRootElement_, root.pointer); + } + + NSXMLElement? rootElement() { + final _ret = _objc_msgSend_683(this.pointer, _sel_rootElement); + return _ret.address == 0 + ? null + : NSXMLElement.castFromPointer(_ret, retain: true, release: true); + } + + void insertChild_atIndex_(NSXMLNode child, int index) { + _objc_msgSend_671( + this.pointer, _sel_insertChild_atIndex_, child.pointer, index); + } + + void insertChildren_atIndex_(objc.NSArray children, int index) { + _objc_msgSend_672( + this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); + } + + void removeChildAtIndex_(int index) { + _objc_msgSend_414(this.pointer, _sel_removeChildAtIndex_, index); + } + + void setChildren_(objc.NSArray? children) { + _objc_msgSend_260( + this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); + } + + void addChild_(NSXMLNode child) { + _objc_msgSend_673(this.pointer, _sel_addChild_, child.pointer); + } + + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _objc_msgSend_674( + this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); + } + + objc.NSData get XMLData { + final _ret = _objc_msgSend_104(this.pointer, _sel_XMLData); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSData XMLDataWithOptions_(int options) { + final _ret = + _objc_msgSend_684(this.pointer, _sel_XMLDataWithOptions_, options); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? objectByApplyingXSLT_arguments_error_( + objc.NSData xslt, + objc.NSDictionary? arguments, + ffi.Pointer> error) { + final _ret = _objc_msgSend_685( + this.pointer, + _sel_objectByApplyingXSLT_arguments_error_, + xslt.pointer, + arguments?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? objectByApplyingXSLTString_arguments_error_( + objc.NSString xslt, + objc.NSDictionary? arguments, + ffi.Pointer> error) { + final _ret = _objc_msgSend_686( + this.pointer, + _sel_objectByApplyingXSLTString_arguments_error_, + xslt.pointer, + arguments?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSObject? objectByApplyingXSLTAtURL_arguments_error_( + objc.NSURL xsltURL, + objc.NSDictionary? argument, + ffi.Pointer> error) { + final _ret = _objc_msgSend_687( + this.pointer, + _sel_objectByApplyingXSLTAtURL_arguments_error_, + xsltURL.pointer, + argument?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool validateAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_8(this.pointer, _sel_validateAndReturnError_, error); + } + + @override + NSXMLDocument initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSXMLDocument initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLDocument.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLDocument, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLDocument, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = _objc_msgSend_35( + _class_NSXMLDocument, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLDocument, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLDocument, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDocument, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLDocument, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35(_class_NSXMLDocument, + _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDocument, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLDocument, _sel_DTDNodeWithXMLString_, string.pointer); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLDocument, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_14( + _class_NSXMLDocument, _sel_prefixForName_, name.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLDocument, _sel_predefinedNamespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); + } + + static NSXMLDocument new1() { + final _ret = _objc_msgSend_40(_class_NSXMLDocument, _sel_new); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); + } + + static NSXMLDocument allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSXMLDocument, _sel_allocWithZone_, zone); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); + } + + static NSXMLDocument alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLDocument, _sel_alloc); + return NSXMLDocument.castFromPointer(_ret, retain: false, release: true); + } + + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLDocument, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); + } + + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLDocument, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + } + + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSXMLDocument, _sel_accessInstanceVariablesDirectly); + } + + static bool useStoredAccessor() { + return _objc_msgSend_7(_class_NSXMLDocument, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLDocument, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLDocument, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLDocument, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLDocument, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject alloc() { - final _ret = _objc_msgSend_2(_class_NSProtocolChecker, _sel_alloc); - return NSObject._(_ret, retain: false, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLDocument, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_665 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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_666 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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_667 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_initWithRootElement_ = + objc.registerName("initWithRootElement:"); +final _objc_msgSend_668 = 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:"); +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:"); - static bool respondsToSelector_(ffi.Pointer aSelector) { - return _objc_msgSend_4( - _class_NSProtocolChecker, _sel_respondsToSelector_, aSelector); - } +abstract class NSXMLDocumentContentKind { + static const int NSXMLDocumentXMLKind = 0; + static const int NSXMLDocumentXHTMLKind = 1; + static const int NSXMLDocumentHTMLKind = 2; + static const int NSXMLDocumentTextKind = 3; } -late final _class_NSProtocolChecker = objc.getClass("NSProtocolChecker"); -final _objc_msgSend_1098 = objc.msgSendPointer +late final _sel_documentContentKind = objc.registerName("documentContentKind"); +final _objc_msgSend_669 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, + ffi.Int32 Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_protocolCheckerWithTarget_protocol_ = - objc.registerName("protocolCheckerWithTarget:protocol:"); -final _objc_msgSend_1099 = objc.msgSendPointer +late final _sel_setDocumentContentKind_ = + objc.registerName("setDocumentContentKind:"); +final _objc_msgSend_670 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>(); -late final _sel_initWithTarget_protocol_ = - objc.registerName("initWithTarget:protocol:"); + void Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_setMIMEType_ = objc.registerName("setMIMEType:"); -class NSTask extends NSObject { - NSTask._(ffi.Pointer pointer, +class NSXMLDTD extends NSXMLNode { + NSXMLDTD._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSTask] that points to the same underlying object as [other]. - static NSTask castFrom(T other) { - return NSTask._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSXMLDTD] that points to the same underlying object as [other]. + NSXMLDTD.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSTask] that wraps the given raw object pointer. - static NSTask castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSTask._(other, retain: retain, release: release); - } + /// 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 [NSTask]. + /// Returns whether [obj] is an instance of [NSXMLDTD]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSTask); + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSXMLDTD); } @override - NSTask init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSTask._(_ret, retain: true, release: true); + NSXMLDTD init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLDTD.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSXMLDTD initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - NSURL? get executableURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_executableURL); + NSXMLDTD? initWithContentsOfURL_options_error_(objc.NSURL url, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_666(this.pointer, + _sel_initWithContentsOfURL_options_error_, url.pointer, mask, error); return _ret.address == 0 ? null - : NSURL._(_ret, retain: true, release: true); + : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - set executableURL(NSURL? value) { - return _objc_msgSend_671( - this.pointer, _sel_setExecutableURL_, value?.pointer ?? ffi.nullptr); + NSXMLDTD? initWithData_options_error_(objc.NSData data, int mask, + ffi.Pointer> error) { + final _ret = _objc_msgSend_667(this.pointer, + _sel_initWithData_options_error_, data.pointer, mask, error); + return _ret.address == 0 + ? null + : NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - NSArray? get arguments { - final _ret = _objc_msgSend_84(this.pointer, _sel_arguments); + objc.NSString? get publicID { + final _ret = _objc_msgSend_13(this.pointer, _sel_publicID); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set arguments(NSArray? value) { - return _objc_msgSend_1053( - this.pointer, _sel_setArguments_, value?.pointer ?? ffi.nullptr); + set publicID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setPublicID_, value?.pointer ?? ffi.nullptr); } - NSDictionary? get environment { - final _ret = _objc_msgSend_390(this.pointer, _sel_environment); + objc.NSString? get systemID { + final _ret = _objc_msgSend_13(this.pointer, _sel_systemID); return _ret.address == 0 ? null - : NSDictionary._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set environment(NSDictionary? value) { - return _objc_msgSend_634( - this.pointer, _sel_setEnvironment_, value?.pointer ?? ffi.nullptr); + set systemID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setSystemID_, value?.pointer ?? ffi.nullptr); } - NSURL? get currentDirectoryURL { - final _ret = _objc_msgSend_45(this.pointer, _sel_currentDirectoryURL); - return _ret.address == 0 - ? null - : NSURL._(_ret, retain: true, release: true); + void insertChild_atIndex_(NSXMLNode child, int index) { + _objc_msgSend_671( + this.pointer, _sel_insertChild_atIndex_, child.pointer, index); } - set currentDirectoryURL(NSURL? value) { - return _objc_msgSend_671(this.pointer, _sel_setCurrentDirectoryURL_, - value?.pointer ?? ffi.nullptr); + void insertChildren_atIndex_(objc.NSArray children, int index) { + _objc_msgSend_672( + this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); } - NSData? get launchRequirementData { - final _ret = _objc_msgSend_286(this.pointer, _sel_launchRequirementData); - return _ret.address == 0 - ? null - : NSData._(_ret, retain: true, release: true); + void removeChildAtIndex_(int index) { + _objc_msgSend_414(this.pointer, _sel_removeChildAtIndex_, index); } - set launchRequirementData(NSData? value) { - return _objc_msgSend_1021(this.pointer, _sel_setLaunchRequirementData_, - value?.pointer ?? ffi.nullptr); + void setChildren_(objc.NSArray? children) { + _objc_msgSend_260( + this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); } - NSObject? get standardInput { - final _ret = _objc_msgSend_17(this.pointer, _sel_standardInput); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + void addChild_(NSXMLNode child) { + _objc_msgSend_673(this.pointer, _sel_addChild_, child.pointer); } - set standardInput(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setStandardInput_, value?.pointer ?? ffi.nullptr); + void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { + _objc_msgSend_674( + this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); } - NSObject? get standardOutput { - final _ret = _objc_msgSend_17(this.pointer, _sel_standardOutput); + NSXMLDTDNode? entityDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678( + this.pointer, _sel_entityDeclarationForName_, name.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); - } - - set standardOutput(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setStandardOutput_, value?.pointer ?? ffi.nullptr); + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - NSObject? get standardError { - final _ret = _objc_msgSend_17(this.pointer, _sel_standardError); + NSXMLDTDNode? notationDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678( + this.pointer, _sel_notationDeclarationForName_, name.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - set standardError(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setStandardError_, value?.pointer ?? ffi.nullptr); + NSXMLDTDNode? elementDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678( + this.pointer, _sel_elementDeclarationForName_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - bool launchAndReturnError_(ffi.Pointer> error) { - return _objc_msgSend_255(this.pointer, _sel_launchAndReturnError_, error); + NSXMLDTDNode? attributeDeclarationForName_elementName_( + objc.NSString name, objc.NSString elementName) { + final _ret = _objc_msgSend_679( + this.pointer, + _sel_attributeDeclarationForName_elementName_, + name.pointer, + elementName.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - void interrupt() { - _objc_msgSend_1(this.pointer, _sel_interrupt); + static NSXMLDTDNode? predefinedEntityDeclarationForName_(objc.NSString name) { + final _ret = _objc_msgSend_678(_class_NSXMLDTD, + _sel_predefinedEntityDeclarationForName_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - void terminate() { - _objc_msgSend_1(this.pointer, _sel_terminate); + @override + NSXMLDTD initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLDTD.castFromPointer(_ret, retain: true, release: true); } - bool suspend() { - return _objc_msgSend_12(this.pointer, _sel_suspend); + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLDTD, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool resume() { - return _objc_msgSend_12(this.pointer, _sel_resume); + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLDTD, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get processIdentifier { - return _objc_msgSend_237(this.pointer, _sel_processIdentifier); + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = + _objc_msgSend_35(_class_NSXMLDTD, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool get running { - return _objc_msgSend_12(this.pointer, _sel_isRunning); + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661( + _class_NSXMLDTD, _sel_elementWithName_URI_, name.pointer, URI.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get terminationStatus { - return _objc_msgSend_237(this.pointer, _sel_terminationStatus); + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLDTD, + _sel_elementWithName_stringValue_, name.pointer, string.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get terminationReason { - return _objc_msgSend_1100(this.pointer, _sel_terminationReason); + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLDTD, + _sel_elementWithName_children_attributes_, + name.pointer, + children?.pointer ?? ffi.nullptr, + attributes?.pointer ?? ffi.nullptr); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - ObjCBlock_ffiVoid_NSTask? get terminationHandler { - final _ret = _objc_msgSend_1101(this.pointer, _sel_terminationHandler); - return _ret.address == 0 - ? null - : ObjCBlock_ffiVoid_NSTask._(_ret, retain: true, release: true); + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTD, + _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set terminationHandler(ObjCBlock_ffiVoid_NSTask? value) { - return _objc_msgSend_1102(this.pointer, _sel_setTerminationHandler_, - value?.pointer ?? ffi.nullptr); + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLDTD, + _sel_attributeWithName_URI_stringValue_, + name.pointer, + URI.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - int get qualityOfService { - return _objc_msgSend_543(this.pointer, _sel_qualityOfService); + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTD, + _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set qualityOfService(int value) { - return _objc_msgSend_544(this.pointer, _sel_setQualityOfService_, value); + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLDTD, + _sel_processingInstructionWithName_stringValue_, + name.pointer, + stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSTask? - launchedTaskWithExecutableURL_arguments_error_terminationHandler_( - NSURL url, - NSArray arguments, - ffi.Pointer> error, - ObjCBlock_ffiVoid_NSTask? terminationHandler) { - final _ret = _objc_msgSend_1103( - _class_NSTask, - _sel_launchedTaskWithExecutableURL_arguments_error_terminationHandler_, - url.pointer, - arguments.pointer, - error, - terminationHandler?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSTask._(_ret, retain: true, release: true); + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTD, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - void waitUntilExit() { - _objc_msgSend_1(this.pointer, _sel_waitUntilExit); + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTD, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSString? get launchPath { - final _ret = _objc_msgSend_44(this.pointer, _sel_launchPath); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLDTD, _sel_DTDNodeWithXMLString_, string.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); - } - - set launchPath(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setLaunchPath_, value?.pointer ?? ffi.nullptr); - } - - NSString get currentDirectoryPath { - final _ret = _objc_msgSend_21(this.pointer, _sel_currentDirectoryPath); - return NSString._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - set currentDirectoryPath(NSString value) { - return _objc_msgSend_646( - this.pointer, _sel_setCurrentDirectoryPath_, value.pointer); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLDTD, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void launch() { - _objc_msgSend_1(this.pointer, _sel_launch); + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = + _objc_msgSend_14(_class_NSXMLDTD, _sel_prefixForName_, name.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSTask launchedTaskWithLaunchPath_arguments_( - NSString path, NSArray arguments) { - final _ret = _objc_msgSend_1104( - _class_NSTask, - _sel_launchedTaskWithLaunchPath_arguments_, - path.pointer, - arguments.pointer); - return NSTask._(_ret, retain: true, release: true); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLDTD, _sel_predefinedNamespaceForPrefix_, name.pointer); + return _ret.address == 0 + ? null + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSTask new1() { - final _ret = _objc_msgSend_2(_class_NSTask, _sel_new); - return NSTask._(_ret, retain: false, release: true); + static NSXMLDTD new1() { + final _ret = _objc_msgSend_40(_class_NSXMLDTD, _sel_new); + return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } - static NSTask allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSTask, _sel_allocWithZone_, zone); - return NSTask._(_ret, retain: false, release: true); + static NSXMLDTD allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47(_class_NSXMLDTD, _sel_allocWithZone_, zone); + return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } - static NSTask alloc() { - final _ret = _objc_msgSend_2(_class_NSTask, _sel_alloc); - return NSTask._(_ret, retain: false, release: true); + static NSXMLDTD alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLDTD, _sel_alloc); + return NSXMLDTD.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSTask, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLDTD, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSTask, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLDTD, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSTask, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSXMLDTD, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSTask, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSXMLDTD, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSTask, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLDTD, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64( - _class_NSTask, _sel_automaticallyNotifiesObserversForKey_, key.pointer); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLDTD, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSTask, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLDTD, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { + static objc.NSArray classFallbacksForKeyedArchiver() { final _ret = - _objc_msgSend_85(_class_NSTask, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); - } - - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSTask, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_6(_class_NSXMLDTD, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } -} - -late final _class_NSTask = objc.getClass("NSTask"); -late final _sel_setExecutableURL_ = objc.registerName("setExecutableURL:"); -late final _sel_setEnvironment_ = objc.registerName("setEnvironment:"); -late final _sel_currentDirectoryURL = objc.registerName("currentDirectoryURL"); -late final _sel_setCurrentDirectoryURL_ = - objc.registerName("setCurrentDirectoryURL:"); -late final _sel_launchRequirementData = - objc.registerName("launchRequirementData"); -late final _sel_setLaunchRequirementData_ = - objc.registerName("setLaunchRequirementData:"); -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_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"); - -abstract class NSTaskTerminationReason { - static const int NSTaskTerminationReasonExit = 1; - static const int NSTaskTerminationReasonUncaughtSignal = 2; -} - -late final _sel_terminationReason = objc.registerName("terminationReason"); -final _objc_msgSend_1100 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Int32 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); -final _ObjCBlock_ffiVoid_NSTask_closureRegistry = - )>{}; -int _ObjCBlock_ffiVoid_NSTask_closureRegistryIndex = 0; -ffi.Pointer _ObjCBlock_ffiVoid_NSTask_registerClosure( - void Function(ffi.Pointer) fn) { - final id = ++_ObjCBlock_ffiVoid_NSTask_closureRegistryIndex; - _ObjCBlock_ffiVoid_NSTask_closureRegistry[id] = fn; - return ffi.Pointer.fromAddress(id); -} - -void _ObjCBlock_ffiVoid_NSTask_closureTrampoline( - ffi.Pointer block, ffi.Pointer arg0) => - _ObjCBlock_ffiVoid_NSTask_closureRegistry[block.ref.target.address]!(arg0); - -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); - /// 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.NSObject classForKeyedUnarchiver() { + final _ret = + _objc_msgSend_40(_class_NSXMLDTD, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_NSTask.fromFunctionPointer( - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> - ptr) - : this._(objc.newBlock( - _cFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTask_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_NSTask.fromFunction(void Function(NSTask) fn) - : this._(objc.newBlock( - _dartFuncTrampoline ??= ffi.Pointer.fromFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>( - _ObjCBlock_ffiVoid_NSTask_closureTrampoline) - .cast(), - _ObjCBlock_ffiVoid_NSTask_registerClosure( - (ffi.Pointer arg0) => - fn(NSTask._(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_NSTask.listener(void Function(NSTask) fn) - : this._(objc.newBlock( - (_dartFuncListenerTrampoline ??= ffi.NativeCallable< - ffi.Void Function(ffi.Pointer, - ffi.Pointer)>.listener( - _ObjCBlock_ffiVoid_NSTask_closureTrampoline) - ..keepIsolateAlive = false) - .nativeFunction - .cast(), - _ObjCBlock_ffiVoid_NSTask_registerClosure( - (ffi.Pointer arg0) => - fn(NSTask._(arg0, retain: true, release: true))))); - static ffi.NativeCallable< - ffi.Void Function( - ffi.Pointer, ffi.Pointer)>? - _dartFuncListenerTrampoline; - - void call(NSTask 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_terminationHandler = objc.registerName("terminationHandler"); -final _objc_msgSend_1101 = 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_1102 = objc.msgSendPointer +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_671 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() .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_1103 = objc.msgSendPointer + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_insertChildren_atIndex_ = + objc.registerName("insertChildren:atIndex:"); +final _objc_msgSend_672 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>, - ffi.Pointer)>>() + ffi.UnsignedLong)>>() .asFunction< - ffi.Pointer Function( + void 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_launch = objc.registerName("launch"); -late final _sel_launchedTaskWithLaunchPath_arguments_ = - objc.registerName("launchedTaskWithLaunchPath:arguments:"); -final _objc_msgSend_1104 = objc.msgSendPointer + 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_673 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + 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_674 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + void Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer, + int, ffi.Pointer)>(); -class NSXMLElement extends NSXMLNode { - NSXMLElement._(ffi.Pointer pointer, +class NSXMLDTDNode extends NSXMLNode { + NSXMLDTDNode._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSXMLElement] that points to the same underlying object as [other]. - static NSXMLElement castFrom(T other) { - return NSXMLElement._(other.pointer, retain: true, release: true); - } - - /// Returns a [NSXMLElement] that wraps the given raw object pointer. - static NSXMLElement castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLElement._(other, retain: retain, release: release); - } - - /// Returns whether [obj] is an instance of [NSXMLElement]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSXMLElement); - } - - NSXMLElement initWithName_(NSString name) { - final _ret = - _objc_msgSend_31(this.pointer, _sel_initWithName_, name.pointer); - return NSXMLElement._(_ret, retain: true, release: true); - } - - NSXMLElement initWithName_URI_(NSString name, NSString? URI) { - final _ret = _objc_msgSend_1141(this.pointer, _sel_initWithName_URI_, - name.pointer, URI?.pointer ?? ffi.nullptr); - return NSXMLElement._(_ret, retain: true, release: true); - } - - NSXMLElement initWithName_stringValue_(NSString name, NSString? string) { - final _ret = _objc_msgSend_1141( - this.pointer, - _sel_initWithName_stringValue_, - name.pointer, - string?.pointer ?? ffi.nullptr); - return NSXMLElement._(_ret, retain: true, release: true); - } - - NSXMLElement? initWithXMLString_error_( - NSString string, ffi.Pointer> error) { - final _ret = _objc_msgSend_303( - this.pointer, _sel_initWithXMLString_error_, string.pointer, error); - return _ret.address == 0 - ? null - : NSXMLElement._(_ret, retain: true, release: true); - } - - @override - NSXMLElement initWithKind_options_(int kind, int options) { - final _ret = _objc_msgSend_1106( - this.pointer, _sel_initWithKind_options_, kind, options); - return NSXMLElement._(_ret, retain: true, release: true); - } - - NSArray elementsForName_(NSString name) { - final _ret = - _objc_msgSend_358(this.pointer, _sel_elementsForName_, name.pointer); - return NSArray._(_ret, retain: true, release: true); - } - - NSArray elementsForLocalName_URI_(NSString localName, NSString? URI) { - final _ret = _objc_msgSend_1142( - this.pointer, - _sel_elementsForLocalName_URI_, - localName.pointer, - URI?.pointer ?? ffi.nullptr); - return NSArray._(_ret, retain: true, release: true); - } - - void addAttribute_(NSXMLNode attribute) { - _objc_msgSend_1120(this.pointer, _sel_addAttribute_, attribute.pointer); - } - - void removeAttributeForName_(NSString name) { - _objc_msgSend_247(this.pointer, _sel_removeAttributeForName_, name.pointer); - } - - NSArray? get attributes { - final _ret = _objc_msgSend_84(this.pointer, _sel_attributes); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); - } - - set attributes(NSArray? value) { - return _objc_msgSend_1053( - this.pointer, _sel_setAttributes_, value?.pointer ?? ffi.nullptr); - } - - void setAttributesWithDictionary_(NSDictionary attributes) { - _objc_msgSend_509( - this.pointer, _sel_setAttributesWithDictionary_, attributes.pointer); - } - - NSXMLNode? attributeForName_(NSString name) { - final _ret = - _objc_msgSend_1124(this.pointer, _sel_attributeForName_, name.pointer); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); - } - - NSXMLNode? attributeForLocalName_URI_(NSString localName, NSString? URI) { - final _ret = _objc_msgSend_1143( - this.pointer, - _sel_attributeForLocalName_URI_, - localName.pointer, - URI?.pointer ?? ffi.nullptr); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); - } - - void addNamespace_(NSXMLNode aNamespace) { - _objc_msgSend_1120(this.pointer, _sel_addNamespace_, aNamespace.pointer); - } + : super.castFromPointer(pointer, retain: retain, release: release); - void removeNamespaceForPrefix_(NSString name) { - _objc_msgSend_247( - this.pointer, _sel_removeNamespaceForPrefix_, name.pointer); - } + /// Constructs a [NSXMLDTDNode] that points to the same underlying object as [other]. + NSXMLDTDNode.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - NSArray? get namespaces { - final _ret = _objc_msgSend_84(this.pointer, _sel_namespaces); - return _ret.address == 0 - ? null - : NSArray._(_ret, 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); - set namespaces(NSArray? value) { - return _objc_msgSend_1053( - this.pointer, _sel_setNamespaces_, value?.pointer ?? ffi.nullptr); + /// Returns whether [obj] is an instance of [NSXMLDTDNode]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSXMLDTDNode); } - NSXMLNode? namespaceForPrefix_(NSString name) { - final _ret = _objc_msgSend_1124( - this.pointer, _sel_namespaceForPrefix_, name.pointer); + NSXMLDTDNode? initWithXMLString_(objc.NSString string) { + final _ret = + _objc_msgSend_2(this.pointer, _sel_initWithXMLString_, string.pointer); return _ret.address == 0 ? null - : NSXMLNode._(_ret, retain: true, release: true); + : NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - NSXMLNode? resolveNamespaceForName_(NSString name) { - final _ret = _objc_msgSend_1124( - this.pointer, _sel_resolveNamespaceForName_, name.pointer); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); + @override + NSXMLDTDNode initWithKind_options_(int kind, int options) { + final _ret = _objc_msgSend_659( + this.pointer, _sel_initWithKind_options_, kind, options); + return NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - NSString? resolvePrefixForNamespaceURI_(NSString namespaceURI) { - final _ret = _objc_msgSend_186( - this.pointer, _sel_resolvePrefixForNamespaceURI_, namespaceURI.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + @override + NSXMLDTDNode init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - void insertChild_atIndex_(NSXMLNode child, int index) { - _objc_msgSend_1118( - this.pointer, _sel_insertChild_atIndex_, child.pointer, index); + int get DTDKind { + return _objc_msgSend_675(this.pointer, _sel_DTDKind); } - void insertChildren_atIndex_(NSArray children, int index) { - _objc_msgSend_1119( - this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); + set DTDKind(int value) { + return _objc_msgSend_676(this.pointer, _sel_setDTDKind_, value); } - void removeChildAtIndex_(int index) { - _objc_msgSend_470(this.pointer, _sel_removeChildAtIndex_, index); + bool get external1 { + return _objc_msgSend_7(this.pointer, _sel_isExternal); } - void setChildren_(NSArray? children) { - _objc_msgSend_843( - this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); + objc.NSString? get publicID { + final _ret = _objc_msgSend_13(this.pointer, _sel_publicID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void addChild_(NSXMLNode child) { - _objc_msgSend_1120(this.pointer, _sel_addChild_, child.pointer); + set publicID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setPublicID_, value?.pointer ?? ffi.nullptr); } - void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { - _objc_msgSend_1121( - this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); + objc.NSString? get systemID { + final _ret = _objc_msgSend_13(this.pointer, _sel_systemID); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void normalizeAdjacentTextNodesPreservingCDATA_(bool preserve) { - _objc_msgSend_870(this.pointer, - _sel_normalizeAdjacentTextNodesPreservingCDATA_, preserve); + set systemID(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setSystemID_, value?.pointer ?? ffi.nullptr); } - void setAttributesAsDictionary_(NSDictionary attributes) { - _objc_msgSend_509( - this.pointer, _sel_setAttributesAsDictionary_, attributes.pointer); + objc.NSString? get notationName { + final _ret = _objc_msgSend_13(this.pointer, _sel_notationName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - @override - NSXMLElement init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSXMLElement._(_ret, retain: true, release: true); + set notationName(objc.NSString? value) { + return _objc_msgSend_46( + this.pointer, _sel_setNotationName_, value?.pointer ?? ffi.nullptr); } @override - NSXMLElement initWithKind_(int kind) { - final _ret = _objc_msgSend_1105(this.pointer, _sel_initWithKind_, kind); - return NSXMLElement._(_ret, retain: true, release: true); + NSXMLDTDNode initWithKind_(int kind) { + final _ret = _objc_msgSend_658(this.pointer, _sel_initWithKind_, kind); + return NSXMLDTDNode.castFromPointer(_ret, retain: true, release: true); } - static NSObject document() { - final _ret = _objc_msgSend_2(_class_NSXMLElement, _sel_document); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject document() { + final _ret = _objc_msgSend_40(_class_NSXMLDTDNode, _sel_document); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_1107( - _class_NSXMLElement, _sel_documentWithRootElement_, element.pointer); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject documentWithRootElement_(NSXMLElement element) { + final _ret = _objc_msgSend_660( + _class_NSXMLDTDNode, _sel_documentWithRootElement_, element.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_(NSString name) { - final _ret = _objc_msgSend_31( - _class_NSXMLElement, _sel_elementWithName_, name.pointer); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject elementWithName_(objc.NSString name) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTDNode, _sel_elementWithName_, name.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_URI_(NSString name, NSString URI) { - final _ret = _objc_msgSend_1108(_class_NSXMLElement, + static objc.NSObject elementWithName_URI_( + objc.NSString name, objc.NSString URI) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, _sel_elementWithName_URI_, name.pointer, URI.pointer); - return NSObject._(_ret, retain: true, release: true); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_stringValue_(NSString name, NSString string) { - final _ret = _objc_msgSend_1108(_class_NSXMLElement, + static objc.NSObject elementWithName_stringValue_( + objc.NSString name, objc.NSString string) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, _sel_elementWithName_stringValue_, name.pointer, string.pointer); - return NSObject._(_ret, retain: true, release: true); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_children_attributes_( - NSString name, NSArray? children, NSArray? attributes) { - final _ret = _objc_msgSend_1109( - _class_NSXMLElement, + static objc.NSObject elementWithName_children_attributes_( + objc.NSString name, objc.NSArray? children, objc.NSArray? attributes) { + final _ret = _objc_msgSend_662( + _class_NSXMLDTDNode, _sel_elementWithName_children_attributes_, name.pointer, children?.pointer ?? ffi.nullptr, attributes?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject attributeWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLElement, + static objc.NSObject attributeWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject attributeWithName_URI_stringValue_( - NSString name, NSString URI, NSString stringValue) { - final _ret = _objc_msgSend_1074( - _class_NSXMLElement, + static objc.NSObject attributeWithName_URI_stringValue_( + objc.NSString name, objc.NSString URI, objc.NSString stringValue) { + final _ret = _objc_msgSend_626( + _class_NSXMLDTDNode, _sel_attributeWithName_URI_stringValue_, name.pointer, URI.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject namespaceWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLElement, + static objc.NSObject namespaceWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661(_class_NSXMLDTDNode, _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject processingInstructionWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108( - _class_NSXMLElement, + static objc.NSObject processingInstructionWithName_stringValue_( + objc.NSString name, objc.NSString stringValue) { + final _ret = _objc_msgSend_661( + _class_NSXMLDTDNode, _sel_processingInstructionWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject commentWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLElement, _sel_commentWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject commentWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTDNode, _sel_commentWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject textWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLElement, _sel_textWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject textWithStringValue_(objc.NSString stringValue) { + final _ret = _objc_msgSend_35( + _class_NSXMLDTDNode, _sel_textWithStringValue_, stringValue.pointer); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject? DTDNodeWithXMLString_(NSString string) { - final _ret = _objc_msgSend_38( - _class_NSXMLElement, _sel_DTDNodeWithXMLString_, string.pointer); + static objc.NSObject? DTDNodeWithXMLString_(objc.NSString string) { + final _ret = _objc_msgSend_2( + _class_NSXMLDTDNode, _sel_DTDNodeWithXMLString_, string.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSString localNameForName_(NSString name) { - final _ret = _objc_msgSend_69( - _class_NSXMLElement, _sel_localNameForName_, name.pointer); - return NSString._(_ret, retain: true, release: true); + static objc.NSString localNameForName_(objc.NSString name) { + final _ret = _objc_msgSend_297( + _class_NSXMLDTDNode, _sel_localNameForName_, name.pointer); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSString? prefixForName_(NSString name) { - final _ret = _objc_msgSend_186( - _class_NSXMLElement, _sel_prefixForName_, name.pointer); + static objc.NSString? prefixForName_(objc.NSString name) { + final _ret = _objc_msgSend_14( + _class_NSXMLDTDNode, _sel_prefixForName_, name.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSXMLNode? predefinedNamespaceForPrefix_(NSString name) { - final _ret = _objc_msgSend_1124( - _class_NSXMLElement, _sel_predefinedNamespaceForPrefix_, name.pointer); + static NSXMLNode? predefinedNamespaceForPrefix_(objc.NSString name) { + final _ret = _objc_msgSend_677( + _class_NSXMLDTDNode, _sel_predefinedNamespaceForPrefix_, name.pointer); return _ret.address == 0 ? null - : NSXMLNode._(_ret, retain: true, release: true); + : NSXMLNode.castFromPointer(_ret, retain: true, release: true); } - static NSXMLElement new1() { - final _ret = _objc_msgSend_2(_class_NSXMLElement, _sel_new); - return NSXMLElement._(_ret, retain: false, release: true); + static NSXMLDTDNode new1() { + final _ret = _objc_msgSend_40(_class_NSXMLDTDNode, _sel_new); + return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } - static NSXMLElement allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSXMLDTDNode allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSXMLElement, _sel_allocWithZone_, zone); - return NSXMLElement._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSXMLDTDNode, _sel_allocWithZone_, zone); + return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } - static NSXMLElement alloc() { - final _ret = _objc_msgSend_2(_class_NSXMLElement, _sel_alloc); - return NSXMLElement._(_ret, retain: false, release: true); + static NSXMLDTDNode alloc() { + final _ret = _objc_msgSend_40(_class_NSXMLDTDNode, _sel_alloc); + return NSXMLDTDNode.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSXMLElement, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSXMLDTDNode, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSXMLElement, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSXMLDTDNode, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSXMLElement, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSXMLDTDNode, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSXMLElement, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSXMLDTDNode, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSXMLElement, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSXMLDTDNode, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSXMLElement, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSXMLDTDNode, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSXMLElement, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSXMLDTDNode, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSXMLElement, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSXMLDTDNode, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSXMLElement, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSXMLDTDNode, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSXMLElement = objc.getClass("NSXMLElement"); - -class NSXMLNode extends NSObject { - NSXMLNode._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); - - /// Returns a [NSXMLNode] that points to the same underlying object as [other]. - static NSXMLNode castFrom(T other) { - return NSXMLNode._(other.pointer, retain: true, release: true); - } +late final _class_NSXMLDTDNode = objc.getClass("NSXMLDTDNode"); +late final _sel_initWithXMLString_ = objc.registerName("initWithXMLString:"); - /// Returns a [NSXMLNode] that wraps the given raw object pointer. - static NSXMLNode castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLNode._(other, retain: retain, release: release); - } +abstract class NSXMLDTDNodeKind { + static const int NSXMLEntityGeneralKind = 1; + static const int NSXMLEntityParsedKind = 2; + static const int NSXMLEntityUnparsedKind = 3; + static const int NSXMLEntityParameterKind = 4; + static const int NSXMLEntityPredefined = 5; + static const int NSXMLAttributeCDATAKind = 6; + static const int NSXMLAttributeIDKind = 7; + static const int NSXMLAttributeIDRefKind = 8; + static const int NSXMLAttributeIDRefsKind = 9; + static const int NSXMLAttributeEntityKind = 10; + static const int NSXMLAttributeEntitiesKind = 11; + static const int NSXMLAttributeNMTokenKind = 12; + static const int NSXMLAttributeNMTokensKind = 13; + static const int NSXMLAttributeEnumerationKind = 14; + static const int NSXMLAttributeNotationKind = 15; + static const int NSXMLElementDeclarationUndefinedKind = 16; + static const int NSXMLElementDeclarationEmptyKind = 17; + static const int NSXMLElementDeclarationAnyKind = 18; + static const int NSXMLElementDeclarationMixedKind = 19; + static const int NSXMLElementDeclarationElementKind = 20; +} - /// Returns whether [obj] is an instance of [NSXMLNode]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSXMLNode); - } +late final _sel_DTDKind = objc.registerName("DTDKind"); +final _objc_msgSend_675 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_setDTDKind_ = objc.registerName("setDTDKind:"); +final _objc_msgSend_676 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .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_677 = 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_678 = 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_679 = 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_680 = 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_681 = 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_682 = 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_683 = 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_684 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_objectByApplyingXSLT_arguments_error_ = + objc.registerName("objectByApplyingXSLT:arguments:error:"); +final _objc_msgSend_685 = 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_686 = 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_687 = 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_688 = 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_689 = 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_690 = 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_691 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_canonicalXMLStringPreservingComments_ = + objc.registerName("canonicalXMLStringPreservingComments:"); +final _objc_msgSend_692 = 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_693 = 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:"); +late final _sel_initWithName_URI_ = objc.registerName("initWithName:URI:"); +final _objc_msgSend_694 = 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_695 = 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_elementsForName_ = objc.registerName("elementsForName:"); +late final _sel_elementsForLocalName_URI_ = + objc.registerName("elementsForLocalName:URI:"); +final _objc_msgSend_696 = 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_addAttribute_ = objc.registerName("addAttribute:"); +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:"); +final _objc_msgSend_697 = 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_698 = 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:"); +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:"); - @override - NSXMLNode init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSXMLNode._(_ret, retain: true, release: true); - } +class NSScriptClassDescription extends NSClassDescription { + NSScriptClassDescription._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - NSXMLNode initWithKind_(int kind) { - final _ret = _objc_msgSend_1105(this.pointer, _sel_initWithKind_, kind); - return NSXMLNode._(_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); - NSXMLNode initWithKind_options_(int kind, int options) { - final _ret = _objc_msgSend_1106( - this.pointer, _sel_initWithKind_options_, kind, options); - return NSXMLNode._(_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); - static NSObject document() { - final _ret = _objc_msgSend_2(_class_NSXMLNode, _sel_document); - return NSObject._(_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); } - static NSObject documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_1107( - _class_NSXMLNode, _sel_documentWithRootElement_, element.pointer); - return NSObject._(_ret, retain: true, release: true); + static NSScriptClassDescription? classDescriptionForClass_( + objc.NSObject aClass) { + final _ret = _objc_msgSend_701(_class_NSScriptClassDescription, + _sel_classDescriptionForClass_, aClass.pointer); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - static NSObject elementWithName_(NSString name) { - final _ret = - _objc_msgSend_31(_class_NSXMLNode, _sel_elementWithName_, name.pointer); - return NSObject._(_ret, retain: true, release: true); + NSScriptClassDescription? initWithSuiteName_className_dictionary_( + objc.NSString suiteName, + objc.NSString className, + objc.NSDictionary? classDeclaration) { + final _ret = _objc_msgSend_702( + 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); } - static NSObject elementWithName_URI_(NSString name, NSString URI) { - final _ret = _objc_msgSend_1108( - _class_NSXMLNode, _sel_elementWithName_URI_, name.pointer, URI.pointer); - return NSObject._(_ret, retain: true, release: true); + objc.NSString? get suiteName { + final _ret = _objc_msgSend_13(this.pointer, _sel_suiteName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_stringValue_(NSString name, NSString string) { - final _ret = _objc_msgSend_1108(_class_NSXMLNode, - _sel_elementWithName_stringValue_, name.pointer, string.pointer); - return NSObject._(_ret, retain: true, release: true); + objc.NSString? get className { + final _ret = _objc_msgSend_13(this.pointer, _sel_className); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_children_attributes_( - NSString name, NSArray? children, NSArray? attributes) { - final _ret = _objc_msgSend_1109( - _class_NSXMLNode, - _sel_elementWithName_children_attributes_, - name.pointer, - children?.pointer ?? ffi.nullptr, - attributes?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); + objc.NSString? get implementationClassName { + final _ret = _objc_msgSend_13(this.pointer, _sel_implementationClassName); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject attributeWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLNode, - _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + NSScriptClassDescription? get superclassDescription { + final _ret = _objc_msgSend_703(this.pointer, _sel_superclassDescription); + return _ret.address == 0 + ? null + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - static NSObject attributeWithName_URI_stringValue_( - NSString name, NSString URI, NSString stringValue) { - final _ret = _objc_msgSend_1074( - _class_NSXMLNode, - _sel_attributeWithName_URI_stringValue_, - name.pointer, - URI.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + int get appleEventCode { + return _objc_msgSend_704(this.pointer, _sel_appleEventCode); } - static NSObject namespaceWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLNode, - _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + bool matchesAppleEventCode_(int appleEventCode) { + return _objc_msgSend_705( + this.pointer, _sel_matchesAppleEventCode_, appleEventCode); } - static NSObject processingInstructionWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108( - _class_NSXMLNode, - _sel_processingInstructionWithName_stringValue_, - name.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + bool supportsCommand_(NSScriptCommandDescription commandDescription) { + return _objc_msgSend_747( + this.pointer, _sel_supportsCommand_, commandDescription.pointer); } - static NSObject commentWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLNode, _sel_commentWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + ffi.Pointer selectorForCommand_( + NSScriptCommandDescription commandDescription) { + return _objc_msgSend_748( + this.pointer, _sel_selectorForCommand_, commandDescription.pointer); } - static NSObject textWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLNode, _sel_textWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + objc.NSString? typeForKey_(objc.NSString key) { + final _ret = _objc_msgSend_14(this.pointer, _sel_typeForKey_, key.pointer); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject? DTDNodeWithXMLString_(NSString string) { - final _ret = _objc_msgSend_38( - _class_NSXMLNode, _sel_DTDNodeWithXMLString_, string.pointer); + NSScriptClassDescription? classDescriptionForKey_(objc.NSString key) { + final _ret = _objc_msgSend_749( + this.pointer, _sel_classDescriptionForKey_, key.pointer); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - int get kind { - return _objc_msgSend_1110(this.pointer, _sel_kind); + int appleEventCodeForKey_(objc.NSString key) { + return _objc_msgSend_706( + this.pointer, _sel_appleEventCodeForKey_, key.pointer); } - NSString? get name { - final _ret = _objc_msgSend_44(this.pointer, _sel_name); + objc.NSString? keyWithAppleEventCode_(int appleEventCode) { + final _ret = _objc_msgSend_750( + this.pointer, _sel_keyWithAppleEventCode_, appleEventCode); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); - } - - set name(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setName_, value?.pointer ?? ffi.nullptr); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSObject? get objectValue { - final _ret = _objc_msgSend_17(this.pointer, _sel_objectValue); + objc.NSString? get defaultSubcontainerAttributeKey { + final _ret = + _objc_msgSend_13(this.pointer, _sel_defaultSubcontainerAttributeKey); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set objectValue(NSObject? value) { - return _objc_msgSend_416( - this.pointer, _sel_setObjectValue_, value?.pointer ?? ffi.nullptr); + bool isLocationRequiredToCreateForKey_(objc.NSString toManyRelationshipKey) { + return _objc_msgSend_51(this.pointer, + _sel_isLocationRequiredToCreateForKey_, toManyRelationshipKey.pointer); } - NSString? get stringValue { - final _ret = _objc_msgSend_44(this.pointer, _sel_stringValue); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + bool hasPropertyForKey_(objc.NSString key) { + return _objc_msgSend_51(this.pointer, _sel_hasPropertyForKey_, key.pointer); } - set stringValue(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setStringValue_, value?.pointer ?? ffi.nullptr); + bool hasOrderedToManyRelationshipForKey_(objc.NSString key) { + return _objc_msgSend_51( + this.pointer, _sel_hasOrderedToManyRelationshipForKey_, key.pointer); } - void setStringValue_resolvingEntities_(NSString string, bool resolve) { - _objc_msgSend_1111(this.pointer, _sel_setStringValue_resolvingEntities_, - string.pointer, resolve); + bool hasReadablePropertyForKey_(objc.NSString key) { + return _objc_msgSend_51( + this.pointer, _sel_hasReadablePropertyForKey_, key.pointer); } - int get index { - return _objc_msgSend_10(this.pointer, _sel_index); + bool hasWritablePropertyForKey_(objc.NSString key) { + return _objc_msgSend_51( + this.pointer, _sel_hasWritablePropertyForKey_, key.pointer); } - int get level { - return _objc_msgSend_10(this.pointer, _sel_level); + bool isReadOnlyKey_(objc.NSString key) { + return _objc_msgSend_51(this.pointer, _sel_isReadOnlyKey_, key.pointer); } - NSXMLDocument? get rootDocument { - final _ret = _objc_msgSend_1135(this.pointer, _sel_rootDocument); - return _ret.address == 0 - ? null - : NSXMLDocument._(_ret, retain: true, release: true); + static void registerClassDescription_forClass_( + NSClassDescription description, objc.NSObject aClass) { + _objc_msgSend_699( + _class_NSScriptClassDescription, + _sel_registerClassDescription_forClass_, + description.pointer, + aClass.pointer); } - NSXMLNode? get parent { - final _ret = _objc_msgSend_1136(this.pointer, _sel_parent); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); + static void invalidateClassDescriptionCache() { + _objc_msgSend_82( + _class_NSScriptClassDescription, _sel_invalidateClassDescriptionCache); } - int get childCount { - return _objc_msgSend_10(this.pointer, _sel_childCount); + @override + NSScriptClassDescription init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - NSArray? get children { - final _ret = _objc_msgSend_84(this.pointer, _sel_children); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + static NSScriptClassDescription new1() { + final _ret = _objc_msgSend_40(_class_NSScriptClassDescription, _sel_new); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); } - NSXMLNode? childAtIndex_(int index) { - final _ret = _objc_msgSend_1137(this.pointer, _sel_childAtIndex_, index); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); + static NSScriptClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSScriptClassDescription, _sel_allocWithZone_, zone); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); } - NSXMLNode? get previousSibling { - final _ret = _objc_msgSend_1136(this.pointer, _sel_previousSibling); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); + static NSScriptClassDescription alloc() { + final _ret = _objc_msgSend_40(_class_NSScriptClassDescription, _sel_alloc); + return NSScriptClassDescription.castFromPointer(_ret, + retain: false, release: true); } - NSXMLNode? get nextSibling { - final _ret = _objc_msgSend_1136(this.pointer, _sel_nextSibling); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - NSXMLNode? get previousNode { - final _ret = _objc_msgSend_1136(this.pointer, _sel_previousNode); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptClassDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - NSXMLNode? get nextNode { - final _ret = _objc_msgSend_1136(this.pointer, _sel_nextNode); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSScriptClassDescription, _sel_accessInstanceVariablesDirectly); } - void detach() { - _objc_msgSend_1(this.pointer, _sel_detach); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSScriptClassDescription, _sel_useStoredAccessor); } - NSString? get XPath { - final _ret = _objc_msgSend_44(this.pointer, _sel_XPath); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptClassDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - NSString? get localName { - final _ret = _objc_msgSend_44(this.pointer, _sel_localName); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptClassDescription, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - NSString? get prefix { - final _ret = _objc_msgSend_44(this.pointer, _sel_prefix); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptClassDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - NSString? get URI { - final _ret = _objc_msgSend_44(this.pointer, _sel_URI); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptClassDescription, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - set URI(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setURI_, value?.pointer ?? ffi.nullptr); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSScriptClassDescription, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - static NSString localNameForName_(NSString name) { - final _ret = _objc_msgSend_69( - _class_NSXMLNode, _sel_localNameForName_, name.pointer); - return NSString._(_ret, retain: true, release: true); - } +late final _class_NSScriptClassDescription = + objc.getClass("NSScriptClassDescription"); - static NSString? prefixForName_(NSString name) { - final _ret = - _objc_msgSend_186(_class_NSXMLNode, _sel_prefixForName_, name.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); +class NSClassDescription extends objc.NSObject { + NSClassDescription._(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 [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 [NSClassDescription]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSClassDescription); } - static NSXMLNode? predefinedNamespaceForPrefix_(NSString name) { - final _ret = _objc_msgSend_1124( - _class_NSXMLNode, _sel_predefinedNamespaceForPrefix_, name.pointer); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); + static void registerClassDescription_forClass_( + NSClassDescription description, objc.NSObject aClass) { + _objc_msgSend_699( + _class_NSClassDescription, + _sel_registerClassDescription_forClass_, + description.pointer, + aClass.pointer); } - NSString get description { - final _ret = _objc_msgSend_21(this.pointer, _sel_description); - return NSString._(_ret, retain: true, release: true); + static void invalidateClassDescriptionCache() { + _objc_msgSend_82( + _class_NSClassDescription, _sel_invalidateClassDescriptionCache); } - NSString get XMLString { - final _ret = _objc_msgSend_21(this.pointer, _sel_XMLString); - return NSString._(_ret, retain: true, release: true); + static NSClassDescription? classDescriptionForClass_(objc.NSObject aClass) { + final _ret = _objc_msgSend_700(_class_NSClassDescription, + _sel_classDescriptionForClass_, aClass.pointer); + return _ret.address == 0 + ? null + : NSClassDescription.castFromPointer(_ret, retain: true, release: true); } - NSString XMLStringWithOptions_(int options) { - final _ret = - _objc_msgSend_1138(this.pointer, _sel_XMLStringWithOptions_, options); - return NSString._(_ret, retain: true, release: true); + objc.NSArray get attributeKeys { + final _ret = _objc_msgSend_6(this.pointer, _sel_attributeKeys); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSString canonicalXMLStringPreservingComments_(bool comments) { - final _ret = _objc_msgSend_1139( - this.pointer, _sel_canonicalXMLStringPreservingComments_, comments); - return NSString._(_ret, retain: true, release: true); + objc.NSArray get toOneRelationshipKeys { + final _ret = _objc_msgSend_6(this.pointer, _sel_toOneRelationshipKeys); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSArray? nodesForXPath_error_( - NSString xpath, ffi.Pointer> error) { - final _ret = _objc_msgSend_443( - this.pointer, _sel_nodesForXPath_error_, xpath.pointer, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + objc.NSArray get toManyRelationshipKeys { + final _ret = _objc_msgSend_6(this.pointer, _sel_toManyRelationshipKeys); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - NSArray? objectsForXQuery_constants_error_( - NSString xquery, - NSDictionary? constants, - ffi.Pointer> error) { - final _ret = _objc_msgSend_1140( - this.pointer, - _sel_objectsForXQuery_constants_error_, - xquery.pointer, - constants?.pointer ?? ffi.nullptr, - error); + objc.NSString? inverseForRelationshipKey_(objc.NSString relationshipKey) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_inverseForRelationshipKey_, relationshipKey.pointer); return _ret.address == 0 ? null - : NSArray._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSArray? objectsForXQuery_error_( - NSString xquery, ffi.Pointer> error) { - final _ret = _objc_msgSend_443( - this.pointer, _sel_objectsForXQuery_error_, xquery.pointer, error); - return _ret.address == 0 - ? null - : NSArray._(_ret, retain: true, release: true); + @override + NSClassDescription init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSClassDescription.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLNode new1() { - final _ret = _objc_msgSend_2(_class_NSXMLNode, _sel_new); - return NSXMLNode._(_ret, retain: false, release: true); + static NSClassDescription new1() { + final _ret = _objc_msgSend_40(_class_NSClassDescription, _sel_new); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } - static NSXMLNode allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSXMLNode, _sel_allocWithZone_, zone); - return NSXMLNode._(_ret, retain: false, release: true); + static NSClassDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_47(_class_NSClassDescription, _sel_allocWithZone_, zone); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } - static NSXMLNode alloc() { - final _ret = _objc_msgSend_2(_class_NSXMLNode, _sel_alloc); - return NSXMLNode._(_ret, retain: false, release: true); + static NSClassDescription alloc() { + final _ret = _objc_msgSend_40(_class_NSClassDescription, _sel_alloc); + return NSClassDescription.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSXMLNode, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSClassDescription, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSXMLNode, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSClassDescription, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSXMLNode, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSClassDescription, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSXMLNode, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSClassDescription, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSXMLNode, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSClassDescription, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSXMLNode, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSClassDescription, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSXMLNode, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSClassDescription, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSXMLNode, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSClassDescription, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSXMLNode, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSClassDescription, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSXMLNode = objc.getClass("NSXMLNode"); - -abstract class NSXMLNodeKind { - static const int NSXMLInvalidKind = 0; - static const int NSXMLDocumentKind = 1; - static const int NSXMLElementKind = 2; - static const int NSXMLAttributeKind = 3; - static const int NSXMLNamespaceKind = 4; - static const int NSXMLProcessingInstructionKind = 5; - static const int NSXMLCommentKind = 6; - static const int NSXMLTextKind = 7; - static const int NSXMLDTDKind = 8; - static const int NSXMLEntityDeclarationKind = 9; - static const int NSXMLAttributeDeclarationKind = 10; - static const int NSXMLElementDeclarationKind = 11; - static const int NSXMLNotationDeclarationKind = 12; -} - -late final _sel_initWithKind_ = objc.registerName("initWithKind:"); -final _objc_msgSend_1105 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int)>(); - -abstract class NSXMLNodeOptions { - static const int NSXMLNodeOptionsNone = 0; - static const int NSXMLNodeIsCDATA = 1; - static const int NSXMLNodeExpandEmptyElement = 2; - static const int NSXMLNodeCompactEmptyElement = 4; - static const int NSXMLNodeUseSingleQuotes = 8; - static const int NSXMLNodeUseDoubleQuotes = 16; - static const int NSXMLNodeNeverEscapeContents = 32; - static const int NSXMLDocumentTidyHTML = 512; - static const int NSXMLDocumentTidyXML = 1024; - static const int NSXMLDocumentValidate = 8192; - static const int NSXMLNodeLoadExternalEntitiesAlways = 16384; - static const int NSXMLNodeLoadExternalEntitiesSameOriginOnly = 32768; - static const int NSXMLNodeLoadExternalEntitiesNever = 524288; - static const int NSXMLDocumentXInclude = 65536; - static const int NSXMLNodePrettyPrint = 131072; - static const int NSXMLDocumentIncludeContentTypeDeclaration = 262144; - static const int NSXMLNodePreserveNamespaceOrder = 1048576; - static const int NSXMLNodePreserveAttributeOrder = 2097152; - static const int NSXMLNodePreserveEntities = 4194304; - static const int NSXMLNodePreservePrefixes = 8388608; - static const int NSXMLNodePreserveCDATA = 16777216; - static const int NSXMLNodePreserveWhitespace = 33554432; - static const int NSXMLNodePreserveDTD = 67108864; - static const int NSXMLNodePreserveCharacterReferences = 134217728; - static const int NSXMLNodePromoteSignificantWhitespace = 268435456; - static const int NSXMLNodePreserveEmptyElements = 6; - static const int NSXMLNodePreserveQuotes = 24; - static const int NSXMLNodePreserveAll = 4293918750; -} - -late final _sel_initWithKind_options_ = - objc.registerName("initWithKind:options:"); -final _objc_msgSend_1106 = objc.msgSendPointer +late final _class_NSClassDescription = objc.getClass("NSClassDescription"); +late final _sel_registerClassDescription_forClass_ = + objc.registerName("registerClassDescription:forClass:"); +final _objc_msgSend_699 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, ffi.Int32, ffi.Int32)>>() + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() .asFunction< - instancetype Function(ffi.Pointer, - ffi.Pointer, int, int)>(); -late final _sel_document = objc.registerName("document"); -late final _sel_documentWithRootElement_ = - objc.registerName("documentWithRootElement:"); -final _objc_msgSend_1107 = objc.msgSendPointer + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_invalidateClassDescriptionCache = + objc.registerName("invalidateClassDescriptionCache"); +late final _sel_classDescriptionForClass_ = + objc.registerName("classDescriptionForClass:"); +final _objc_msgSend_700 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -57408,578 +34853,574 @@ final _objc_msgSend_1107 = objc.msgSendPointer .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_1108 = objc.msgSendPointer +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:"); +final _objc_msgSend_701 = 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_1109 = objc.msgSendPointer + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithSuiteName_className_dictionary_ = + objc.registerName("initWithSuiteName:className:dictionary:"); +final _objc_msgSend_702 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( 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_1110 = objc.msgSendPointer +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_703 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + 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_704 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt 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_setStringValue_ = objc.registerName("setStringValue:"); -late final _sel_setStringValue_resolvingEntities_ = - objc.registerName("setStringValue:resolvingEntities:"); -final _objc_msgSend_1111 = objc.msgSendPointer +late final _sel_matchesAppleEventCode_ = + objc.registerName("matchesAppleEventCode:"); +final _objc_msgSend_705 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Bool)>>() + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() .asFunction< - void Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - bool)>(); -late final _sel_index = objc.registerName("index"); -late final _sel_level = objc.registerName("level"); + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); -class NSXMLDocument extends NSXMLNode { - NSXMLDocument._(ffi.Pointer pointer, +class NSScriptCommandDescription extends objc.NSObject { + NSScriptCommandDescription._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSXMLDocument] that points to the same underlying object as [other]. - static NSXMLDocument castFrom(T other) { - return NSXMLDocument._(other.pointer, retain: true, release: true); - } + /// Constructs a [NSScriptCommandDescription] that points to the same underlying object as [other]. + NSScriptCommandDescription.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [NSXMLDocument] that wraps the given raw object pointer. - static NSXMLDocument castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLDocument._(other, retain: retain, release: release); - } + /// 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); - /// Returns whether [obj] is an instance of [NSXMLDocument]. + /// Returns whether [obj] is an instance of [NSScriptCommandDescription]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSXMLDocument); + obj.pointer, _sel_isKindOfClass_, _class_NSScriptCommandDescription); } @override - NSXMLDocument init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSXMLDocument._(_ret, retain: true, release: true); + objc.NSObject init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSXMLDocument? initWithXMLString_options_error_(NSString string, int mask, - ffi.Pointer> error) { - final _ret = _objc_msgSend_1112(this.pointer, - _sel_initWithXMLString_options_error_, string.pointer, mask, error); + NSScriptCommandDescription? initWithSuiteName_commandName_dictionary_( + objc.NSString suiteName, + objc.NSString commandName, + objc.NSDictionary? commandDeclaration) { + final _ret = _objc_msgSend_702( + this.pointer, + _sel_initWithSuiteName_commandName_dictionary_, + suiteName.pointer, + commandName.pointer, + commandDeclaration?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSXMLDocument._(_ret, retain: true, release: true); + : NSScriptCommandDescription.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDocument? initWithContentsOfURL_options_error_( - NSURL url, int mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_1113(this.pointer, - _sel_initWithContentsOfURL_options_error_, url.pointer, mask, error); + NSScriptCommandDescription? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); return _ret.address == 0 ? null - : NSXMLDocument._(_ret, retain: true, release: true); + : NSScriptCommandDescription.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDocument? initWithData_options_error_( - NSData data, int mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_1114(this.pointer, - _sel_initWithData_options_error_, data.pointer, mask, error); - return _ret.address == 0 - ? null - : NSXMLDocument._(_ret, retain: true, release: true); + objc.NSString get suiteName { + final _ret = _objc_msgSend_12(this.pointer, _sel_suiteName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - NSXMLDocument initWithRootElement_(NSXMLElement? element) { - final _ret = _objc_msgSend_1115(this.pointer, _sel_initWithRootElement_, - element?.pointer ?? ffi.nullptr); - return NSXMLDocument._(_ret, retain: true, release: true); + objc.NSString get commandName { + final _ret = _objc_msgSend_12(this.pointer, _sel_commandName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject replacementClassForClass_(NSObject cls) { - final _ret = _objc_msgSend_124( - _class_NSXMLDocument, _sel_replacementClassForClass_, cls.pointer); - return NSObject._(_ret, retain: true, release: true); + int get appleEventClassCode { + return _objc_msgSend_704(this.pointer, _sel_appleEventClassCode); + } + + int get appleEventCode { + return _objc_msgSend_704(this.pointer, _sel_appleEventCode); } - NSString? get characterEncoding { - final _ret = _objc_msgSend_44(this.pointer, _sel_characterEncoding); + objc.NSString get commandClassName { + final _ret = _objc_msgSend_12(this.pointer, _sel_commandClassName); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString? get returnType { + final _ret = _objc_msgSend_13(this.pointer, _sel_returnType); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set characterEncoding(NSString? value) { - return _objc_msgSend_545(this.pointer, _sel_setCharacterEncoding_, - value?.pointer ?? ffi.nullptr); + int get appleEventCodeForReturnType { + return _objc_msgSend_704(this.pointer, _sel_appleEventCodeForReturnType); } - NSString? get version { - final _ret = _objc_msgSend_44(this.pointer, _sel_version); + objc.NSArray get argumentNames { + final _ret = _objc_msgSend_6(this.pointer, _sel_argumentNames); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + objc.NSString? typeForArgumentWithName_(objc.NSString argumentName) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_typeForArgumentWithName_, argumentName.pointer); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set version(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setVersion_, value?.pointer ?? ffi.nullptr); + int appleEventCodeForArgumentWithName_(objc.NSString argumentName) { + return _objc_msgSend_706(this.pointer, + _sel_appleEventCodeForArgumentWithName_, argumentName.pointer); } - bool get standalone { - return _objc_msgSend_12(this.pointer, _sel_isStandalone); + bool isOptionalArgumentWithName_(objc.NSString argumentName) { + return _objc_msgSend_51( + this.pointer, _sel_isOptionalArgumentWithName_, argumentName.pointer); } - set standalone(bool value) { - return _objc_msgSend_527(this.pointer, _sel_setStandalone_, value); + NSScriptCommand createCommandInstance() { + final _ret = _objc_msgSend_745(this.pointer, _sel_createCommandInstance); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - int get documentContentKind { - return _objc_msgSend_1116(this.pointer, _sel_documentContentKind); + NSScriptCommand createCommandInstanceWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_746( + this.pointer, _sel_createCommandInstanceWithZone_, zone); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - set documentContentKind(int value) { - return _objc_msgSend_1117( - this.pointer, _sel_setDocumentContentKind_, value); + static NSScriptCommandDescription new1() { + final _ret = _objc_msgSend_40(_class_NSScriptCommandDescription, _sel_new); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } - NSString? get MIMEType { - final _ret = _objc_msgSend_44(this.pointer, _sel_MIMEType); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + static NSScriptCommandDescription allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSScriptCommandDescription, _sel_allocWithZone_, zone); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } - set MIMEType(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setMIMEType_, value?.pointer ?? ffi.nullptr); + static NSScriptCommandDescription alloc() { + final _ret = + _objc_msgSend_40(_class_NSScriptCommandDescription, _sel_alloc); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: false, release: true); } - NSXMLDTD? get DTD { - final _ret = _objc_msgSend_1127(this.pointer, _sel_DTD); - return _ret.address == 0 - ? null - : NSXMLDTD._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptCommandDescription, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - set DTD(NSXMLDTD? value) { - return _objc_msgSend_1128( - this.pointer, _sel_setDTD_, value?.pointer ?? ffi.nullptr); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptCommandDescription, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - void setRootElement_(NSXMLElement root) { - _objc_msgSend_1129(this.pointer, _sel_setRootElement_, root.pointer); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7(_class_NSScriptCommandDescription, + _sel_accessInstanceVariablesDirectly); } - NSXMLElement? rootElement() { - final _ret = _objc_msgSend_1130(this.pointer, _sel_rootElement); - return _ret.address == 0 - ? null - : NSXMLElement._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSScriptCommandDescription, _sel_useStoredAccessor); + } + + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptCommandDescription, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptCommandDescription, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); + } + + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptCommandDescription, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); + } + + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptCommandDescription, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSScriptCommandDescription, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} + +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_706 = 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:"); + +class NSScriptCommand extends objc.NSObject { + NSScriptCommand._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); - void insertChild_atIndex_(NSXMLNode child, int index) { - _objc_msgSend_1118( - this.pointer, _sel_insertChild_atIndex_, child.pointer, index); - } + /// Constructs a [NSScriptCommand] that points to the same underlying object as [other]. + NSScriptCommand.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - void insertChildren_atIndex_(NSArray children, int index) { - _objc_msgSend_1119( - this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); - } + /// 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); - void removeChildAtIndex_(int index) { - _objc_msgSend_470(this.pointer, _sel_removeChildAtIndex_, index); + /// Returns whether [obj] is an instance of [NSScriptCommand]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSScriptCommand); } - void setChildren_(NSArray? children) { - _objc_msgSend_843( - this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); + NSScriptCommand initWithCommandDescription_( + NSScriptCommandDescription commandDef) { + final _ret = _objc_msgSend_707( + this.pointer, _sel_initWithCommandDescription_, commandDef.pointer); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - void addChild_(NSXMLNode child) { - _objc_msgSend_1120(this.pointer, _sel_addChild_, child.pointer); + NSScriptCommand? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); + return _ret.address == 0 + ? null + : NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { - _objc_msgSend_1121( - this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); + NSScriptCommandDescription get commandDescription { + final _ret = _objc_msgSend_708(this.pointer, _sel_commandDescription); + return NSScriptCommandDescription.castFromPointer(_ret, + retain: true, release: true); } - NSData get XMLData { - final _ret = _objc_msgSend_43(this.pointer, _sel_XMLData); - return NSData._(_ret, retain: true, release: true); + objc.NSObject? get directParameter { + final _ret = _objc_msgSend_66(this.pointer, _sel_directParameter); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSData XMLDataWithOptions_(int options) { - final _ret = - _objc_msgSend_1131(this.pointer, _sel_XMLDataWithOptions_, options); - return NSData._(_ret, retain: true, release: true); + set directParameter(objc.NSObject? value) { + return _objc_msgSend_188( + this.pointer, _sel_setDirectParameter_, value?.pointer ?? ffi.nullptr); } - NSObject? objectByApplyingXSLT_arguments_error_( - NSData xslt, - NSDictionary? arguments, - ffi.Pointer> error) { - final _ret = _objc_msgSend_1132( - this.pointer, - _sel_objectByApplyingXSLT_arguments_error_, - xslt.pointer, - arguments?.pointer ?? ffi.nullptr, - error); + NSScriptObjectSpecifier? get receiversSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_receiversSpecifier); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - NSObject? objectByApplyingXSLTString_arguments_error_( - NSString xslt, - NSDictionary? arguments, - ffi.Pointer> error) { - final _ret = _objc_msgSend_1133( - this.pointer, - _sel_objectByApplyingXSLTString_arguments_error_, - xslt.pointer, - arguments?.pointer ?? ffi.nullptr, - error); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); + set receiversSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_738(this.pointer, _sel_setReceiversSpecifier_, + value?.pointer ?? ffi.nullptr); } - NSObject? objectByApplyingXSLTAtURL_arguments_error_(NSURL xsltURL, - NSDictionary? argument, ffi.Pointer> error) { - final _ret = _objc_msgSend_1134( - this.pointer, - _sel_objectByApplyingXSLTAtURL_arguments_error_, - xsltURL.pointer, - argument?.pointer ?? ffi.nullptr, - error); + objc.NSObject? get evaluatedReceivers { + final _ret = _objc_msgSend_66(this.pointer, _sel_evaluatedReceivers); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - bool validateAndReturnError_( - ffi.Pointer> error) { - return _objc_msgSend_255(this.pointer, _sel_validateAndReturnError_, error); + objc.NSDictionary? get arguments { + final _ret = _objc_msgSend_65(this.pointer, _sel_arguments); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - @override - NSXMLDocument initWithKind_(int kind) { - final _ret = _objc_msgSend_1105(this.pointer, _sel_initWithKind_, kind); - return NSXMLDocument._(_ret, retain: true, release: true); + set arguments(objc.NSDictionary? value) { + return _objc_msgSend_173( + this.pointer, _sel_setArguments_, value?.pointer ?? ffi.nullptr); } - @override - NSXMLDocument initWithKind_options_(int kind, int options) { - final _ret = _objc_msgSend_1106( - this.pointer, _sel_initWithKind_options_, kind, options); - return NSXMLDocument._(_ret, retain: true, release: true); + objc.NSDictionary? get evaluatedArguments { + final _ret = _objc_msgSend_65(this.pointer, _sel_evaluatedArguments); + return _ret.address == 0 + ? null + : objc.NSDictionary.castFromPointer(_ret, retain: true, release: true); } - static NSObject document() { - final _ret = _objc_msgSend_2(_class_NSXMLDocument, _sel_document); - return NSObject._(_ret, retain: true, release: true); + bool get wellFormed { + return _objc_msgSend_7(this.pointer, _sel_isWellFormed); } - static NSObject documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_1107( - _class_NSXMLDocument, _sel_documentWithRootElement_, element.pointer); - return NSObject._(_ret, retain: true, release: true); + objc.NSObject? performDefaultImplementation() { + final _ret = + _objc_msgSend_66(this.pointer, _sel_performDefaultImplementation); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_(NSString name) { - final _ret = _objc_msgSend_31( - _class_NSXMLDocument, _sel_elementWithName_, name.pointer); - return NSObject._(_ret, retain: true, release: true); + objc.NSObject? executeCommand() { + final _ret = _objc_msgSend_66(this.pointer, _sel_executeCommand); + return _ret.address == 0 + ? null + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSObject elementWithName_URI_(NSString name, NSString URI) { - final _ret = _objc_msgSend_1108(_class_NSXMLDocument, - _sel_elementWithName_URI_, name.pointer, URI.pointer); - return NSObject._(_ret, retain: true, release: true); + int get scriptErrorNumber { + return _objc_msgSend_114(this.pointer, _sel_scriptErrorNumber); } - static NSObject elementWithName_stringValue_(NSString name, NSString string) { - final _ret = _objc_msgSend_1108(_class_NSXMLDocument, - _sel_elementWithName_stringValue_, name.pointer, string.pointer); - return NSObject._(_ret, retain: true, release: true); + set scriptErrorNumber(int value) { + return _objc_msgSend_134(this.pointer, _sel_setScriptErrorNumber_, value); } - static NSObject elementWithName_children_attributes_( - NSString name, NSArray? children, NSArray? attributes) { - final _ret = _objc_msgSend_1109( - _class_NSXMLDocument, - _sel_elementWithName_children_attributes_, - name.pointer, - children?.pointer ?? ffi.nullptr, - attributes?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); + NSAppleEventDescriptor? get scriptErrorOffendingObjectDescriptor { + final _ret = _objc_msgSend_742( + this.pointer, _sel_scriptErrorOffendingObjectDescriptor); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject attributeWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLDocument, - _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + set scriptErrorOffendingObjectDescriptor(NSAppleEventDescriptor? value) { + return _objc_msgSend_743( + this.pointer, + _sel_setScriptErrorOffendingObjectDescriptor_, + value?.pointer ?? ffi.nullptr); } - static NSObject attributeWithName_URI_stringValue_( - NSString name, NSString URI, NSString stringValue) { - final _ret = _objc_msgSend_1074( - _class_NSXMLDocument, - _sel_attributeWithName_URI_stringValue_, - name.pointer, - URI.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + NSAppleEventDescriptor? get scriptErrorExpectedTypeDescriptor { + final _ret = + _objc_msgSend_742(this.pointer, _sel_scriptErrorExpectedTypeDescriptor); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject namespaceWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLDocument, - _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + set scriptErrorExpectedTypeDescriptor(NSAppleEventDescriptor? value) { + return _objc_msgSend_743( + this.pointer, + _sel_setScriptErrorExpectedTypeDescriptor_, + value?.pointer ?? ffi.nullptr); } - static NSObject processingInstructionWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108( - _class_NSXMLDocument, - _sel_processingInstructionWithName_stringValue_, - name.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + objc.NSString? get scriptErrorString { + final _ret = _objc_msgSend_13(this.pointer, _sel_scriptErrorString); + return _ret.address == 0 + ? null + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - static NSObject commentWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31(_class_NSXMLDocument, - _sel_commentWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + set scriptErrorString(objc.NSString? value) { + return _objc_msgSend_46(this.pointer, _sel_setScriptErrorString_, + value?.pointer ?? ffi.nullptr); } - static NSObject textWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLDocument, _sel_textWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + static NSScriptCommand? currentCommand() { + final _ret = _objc_msgSend_744(_class_NSScriptCommand, _sel_currentCommand); + return _ret.address == 0 + ? null + : NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - static NSObject? DTDNodeWithXMLString_(NSString string) { - final _ret = _objc_msgSend_38( - _class_NSXMLDocument, _sel_DTDNodeWithXMLString_, string.pointer); + NSAppleEventDescriptor? get appleEvent { + final _ret = _objc_msgSend_742(this.pointer, _sel_appleEvent); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSString localNameForName_(NSString name) { - final _ret = _objc_msgSend_69( - _class_NSXMLDocument, _sel_localNameForName_, name.pointer); - return NSString._(_ret, retain: true, release: true); + void suspendExecution() { + _objc_msgSend_82(this.pointer, _sel_suspendExecution); } - static NSString? prefixForName_(NSString name) { - final _ret = _objc_msgSend_186( - _class_NSXMLDocument, _sel_prefixForName_, name.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + void resumeExecutionWithResult_(objc.NSObject? result) { + _objc_msgSend_215(this.pointer, _sel_resumeExecutionWithResult_, + result?.pointer ?? ffi.nullptr); } - static NSXMLNode? predefinedNamespaceForPrefix_(NSString name) { - final _ret = _objc_msgSend_1124( - _class_NSXMLDocument, _sel_predefinedNamespaceForPrefix_, name.pointer); - return _ret.address == 0 - ? null - : NSXMLNode._(_ret, retain: true, release: true); + @override + NSScriptCommand init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScriptCommand.castFromPointer(_ret, retain: true, release: true); } - static NSXMLDocument new1() { - final _ret = _objc_msgSend_2(_class_NSXMLDocument, _sel_new); - return NSXMLDocument._(_ret, retain: false, release: true); + static NSScriptCommand new1() { + final _ret = _objc_msgSend_40(_class_NSScriptCommand, _sel_new); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } - static NSXMLDocument allocWithZone_(ffi.Pointer<_NSZone> zone) { + static NSScriptCommand allocWithZone_(ffi.Pointer<_NSZone> zone) { final _ret = - _objc_msgSend_3(_class_NSXMLDocument, _sel_allocWithZone_, zone); - return NSXMLDocument._(_ret, retain: false, release: true); + _objc_msgSend_47(_class_NSScriptCommand, _sel_allocWithZone_, zone); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } - static NSXMLDocument alloc() { - final _ret = _objc_msgSend_2(_class_NSXMLDocument, _sel_alloc); - return NSXMLDocument._(_ret, retain: false, release: true); + static NSScriptCommand alloc() { + final _ret = _objc_msgSend_40(_class_NSScriptCommand, _sel_alloc); + return NSScriptCommand.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSXMLDocument, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptCommand, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSXMLDocument, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptCommand, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSXMLDocument, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSScriptCommand, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSXMLDocument, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_NSScriptCommand, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSXMLDocument, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptCommand, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSXMLDocument, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptCommand, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSXMLDocument, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptCommand, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSXMLDocument, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptCommand, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_NSXMLDocument, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_NSScriptCommand, _sel_classForKeyedUnarchiver); + return objc.NSObject.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_1112 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -final _objc_msgSend_1113 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - 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_1114 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Int32, - ffi.Pointer>)>>() - .asFunction< - instancetype Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - int, - ffi.Pointer>)>(); -late final _sel_initWithRootElement_ = - objc.registerName("initWithRootElement:"); -final _objc_msgSend_1115 = objc.msgSendPointer +late final _class_NSScriptCommand = objc.getClass("NSScriptCommand"); +late final _sel_initWithCommandDescription_ = + objc.registerName("initWithCommandDescription:"); +final _objc_msgSend_707 = objc.msgSendPointer .cast< ffi.NativeFunction< instancetype Function( @@ -57989,804 +35430,1192 @@ final _objc_msgSend_1115 = objc.msgSendPointer .asFunction< instancetype Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_replacementClassForClass_ = - objc.registerName("replacementClassForClass:"); -late final _sel_characterEncoding = objc.registerName("characterEncoding"); -late final _sel_setCharacterEncoding_ = - objc.registerName("setCharacterEncoding:"); -late final _sel_isStandalone = objc.registerName("isStandalone"); -late final _sel_setStandalone_ = objc.registerName("setStandalone:"); - -abstract class NSXMLDocumentContentKind { - static const int NSXMLDocumentXMLKind = 0; - static const int NSXMLDocumentXHTMLKind = 1; - static const int NSXMLDocumentHTMLKind = 2; - static const int NSXMLDocumentTextKind = 3; -} - -late final _sel_documentContentKind = objc.registerName("documentContentKind"); -final _objc_msgSend_1116 = objc.msgSendPointer +late final _sel_commandDescription = objc.registerName("commandDescription"); +final _objc_msgSend_708 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + ffi.Pointer Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< - int Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDocumentContentKind_ = - objc.registerName("setDocumentContentKind:"); -final _objc_msgSend_1117 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - void Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_setMIMEType_ = objc.registerName("setMIMEType:"); +late final _sel_directParameter = objc.registerName("directParameter"); +late final _sel_setDirectParameter_ = objc.registerName("setDirectParameter:"); -class NSXMLDTD extends NSXMLNode { - NSXMLDTD._(ffi.Pointer pointer, +class NSScriptObjectSpecifier extends objc.NSObject { + NSScriptObjectSpecifier._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [NSXMLDTD] that points to the same underlying object as [other]. - static NSXMLDTD castFrom(T other) { - return NSXMLDTD._(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.pointer, retain: true, release: true); - /// Returns a [NSXMLDTD] that wraps the given raw object pointer. - static NSXMLDTD castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLDTD._(other, retain: retain, release: release); - } + /// 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 [NSXMLDTD]. + /// Returns whether [obj] is an instance of [NSScriptObjectSpecifier]. static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSXMLDTD); + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSScriptObjectSpecifier); } - @override - NSXMLDTD init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSXMLDTD._(_ret, retain: true, release: true); + static NSScriptObjectSpecifier? objectSpecifierWithDescriptor_( + NSAppleEventDescriptor descriptor) { + final _ret = _objc_msgSend_734(_class_NSScriptObjectSpecifier, + _sel_objectSpecifierWithDescriptor_, descriptor.pointer); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - @override - NSXMLDTD initWithKind_options_(int kind, int options) { - final _ret = _objc_msgSend_1106( - this.pointer, _sel_initWithKind_options_, kind, options); - return NSXMLDTD._(_ret, retain: true, release: true); + NSScriptObjectSpecifier initWithContainerSpecifier_key_( + NSScriptObjectSpecifier container, objc.NSString property) { + final _ret = _objc_msgSend_735( + this.pointer, + _sel_initWithContainerSpecifier_key_, + container.pointer, + property.pointer); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDTD? initWithContentsOfURL_options_error_( - NSURL url, int mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_1113(this.pointer, - _sel_initWithContentsOfURL_options_error_, url.pointer, mask, error); - return _ret.address == 0 - ? null - : NSXMLDTD._(_ret, retain: true, release: true); + NSScriptObjectSpecifier + initWithContainerClassDescription_containerSpecifier_key_( + NSScriptClassDescription classDesc, + NSScriptObjectSpecifier? container, + objc.NSString property) { + final _ret = _objc_msgSend_736( + this.pointer, + _sel_initWithContainerClassDescription_containerSpecifier_key_, + classDesc.pointer, + container?.pointer ?? ffi.nullptr, + property.pointer); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDTD? initWithData_options_error_( - NSData data, int mask, ffi.Pointer> error) { - final _ret = _objc_msgSend_1114(this.pointer, - _sel_initWithData_options_error_, data.pointer, mask, error); + NSScriptObjectSpecifier? initWithCoder_(objc.NSCoder inCoder) { + final _ret = + _objc_msgSend_231(this.pointer, _sel_initWithCoder_, inCoder.pointer); return _ret.address == 0 ? null - : NSXMLDTD._(_ret, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - NSString? get publicID { - final _ret = _objc_msgSend_44(this.pointer, _sel_publicID); + NSScriptObjectSpecifier? get childSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_childSpecifier); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - set publicID(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setPublicID_, value?.pointer ?? ffi.nullptr); + set childSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_738( + this.pointer, _sel_setChildSpecifier_, value?.pointer ?? ffi.nullptr); } - NSString? get systemID { - final _ret = _objc_msgSend_44(this.pointer, _sel_systemID); + NSScriptObjectSpecifier? get containerSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_containerSpecifier); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - set systemID(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setSystemID_, value?.pointer ?? ffi.nullptr); + set containerSpecifier(NSScriptObjectSpecifier? value) { + return _objc_msgSend_738(this.pointer, _sel_setContainerSpecifier_, + value?.pointer ?? ffi.nullptr); } - void insertChild_atIndex_(NSXMLNode child, int index) { - _objc_msgSend_1118( - this.pointer, _sel_insertChild_atIndex_, child.pointer, index); + bool get containerIsObjectBeingTested { + return _objc_msgSend_7(this.pointer, _sel_containerIsObjectBeingTested); } - void insertChildren_atIndex_(NSArray children, int index) { - _objc_msgSend_1119( - this.pointer, _sel_insertChildren_atIndex_, children.pointer, index); + set containerIsObjectBeingTested(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setContainerIsObjectBeingTested_, value); } - void removeChildAtIndex_(int index) { - _objc_msgSend_470(this.pointer, _sel_removeChildAtIndex_, index); + bool get containerIsRangeContainerObject { + return _objc_msgSend_7(this.pointer, _sel_containerIsRangeContainerObject); } - void setChildren_(NSArray? children) { - _objc_msgSend_843( - this.pointer, _sel_setChildren_, children?.pointer ?? ffi.nullptr); + set containerIsRangeContainerObject(bool value) { + return _objc_msgSend_41( + this.pointer, _sel_setContainerIsRangeContainerObject_, value); } - void addChild_(NSXMLNode child) { - _objc_msgSend_1120(this.pointer, _sel_addChild_, child.pointer); + objc.NSString get key { + final _ret = _objc_msgSend_12(this.pointer, _sel_key); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } - void replaceChildAtIndex_withNode_(int index, NSXMLNode node) { - _objc_msgSend_1121( - this.pointer, _sel_replaceChildAtIndex_withNode_, index, node.pointer); + set key(objc.NSString value) { + return _objc_msgSend_99(this.pointer, _sel_setKey_, value.pointer); } - NSXMLDTDNode? entityDeclarationForName_(NSString name) { - final _ret = _objc_msgSend_1125( - this.pointer, _sel_entityDeclarationForName_, name.pointer); + NSScriptClassDescription? get containerClassDescription { + final _ret = + _objc_msgSend_703(this.pointer, _sel_containerClassDescription); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, retain: true, release: true); + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDTDNode? notationDeclarationForName_(NSString name) { - final _ret = _objc_msgSend_1125( - this.pointer, _sel_notationDeclarationForName_, name.pointer); + set containerClassDescription(NSScriptClassDescription? value) { + return _objc_msgSend_739(this.pointer, _sel_setContainerClassDescription_, + value?.pointer ?? ffi.nullptr); + } + + NSScriptClassDescription? get keyClassDescription { + final _ret = _objc_msgSend_703(this.pointer, _sel_keyClassDescription); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, retain: true, release: true); + : NSScriptClassDescription.castFromPointer(_ret, + retain: true, release: true); } - NSXMLDTDNode? elementDeclarationForName_(NSString name) { - final _ret = _objc_msgSend_1125( - this.pointer, _sel_elementDeclarationForName_, name.pointer); + ffi.Pointer indicesOfObjectsByEvaluatingWithContainer_count_( + objc.NSObject container, ffi.Pointer count) { + return _objc_msgSend_740( + this.pointer, + _sel_indicesOfObjectsByEvaluatingWithContainer_count_, + container.pointer, + count); + } + + objc.NSObject? objectsByEvaluatingWithContainers_(objc.NSObject containers) { + final _ret = _objc_msgSend_741(this.pointer, + _sel_objectsByEvaluatingWithContainers_, containers.pointer); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - NSXMLDTDNode? attributeDeclarationForName_elementName_( - NSString name, NSString elementName) { - final _ret = _objc_msgSend_1126( - this.pointer, - _sel_attributeDeclarationForName_elementName_, - name.pointer, - elementName.pointer); + objc.NSObject? get objectsByEvaluatingSpecifier { + final _ret = + _objc_msgSend_66(this.pointer, _sel_objectsByEvaluatingSpecifier); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, retain: true, release: true); + : objc.NSObject.castFromPointer(_ret, retain: true, release: true); } - static NSXMLDTDNode? predefinedEntityDeclarationForName_(NSString name) { - final _ret = _objc_msgSend_1125(_class_NSXMLDTD, - _sel_predefinedEntityDeclarationForName_, name.pointer); + int get evaluationErrorNumber { + return _objc_msgSend_114(this.pointer, _sel_evaluationErrorNumber); + } + + set evaluationErrorNumber(int value) { + return _objc_msgSend_134( + this.pointer, _sel_setEvaluationErrorNumber_, value); + } + + NSScriptObjectSpecifier? get evaluationErrorSpecifier { + final _ret = _objc_msgSend_737(this.pointer, _sel_evaluationErrorSpecifier); + return _ret.address == 0 + ? null + : NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); + } + + NSAppleEventDescriptor? get descriptor { + final _ret = _objc_msgSend_742(this.pointer, _sel_descriptor); return _ret.address == 0 ? null - : NSXMLDTDNode._(_ret, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } @override - NSXMLDTD initWithKind_(int kind) { - final _ret = _objc_msgSend_1105(this.pointer, _sel_initWithKind_, kind); - return NSXMLDTD._(_ret, retain: true, release: true); + NSScriptObjectSpecifier init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: true, release: true); } - static NSObject document() { - final _ret = _objc_msgSend_2(_class_NSXMLDTD, _sel_document); - return NSObject._(_ret, retain: true, release: true); + static NSScriptObjectSpecifier new1() { + final _ret = _objc_msgSend_40(_class_NSScriptObjectSpecifier, _sel_new); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - static NSObject documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_1107( - _class_NSXMLDTD, _sel_documentWithRootElement_, element.pointer); - return NSObject._(_ret, retain: true, release: true); + static NSScriptObjectSpecifier allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSScriptObjectSpecifier, _sel_allocWithZone_, zone); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - static NSObject elementWithName_(NSString name) { - final _ret = - _objc_msgSend_31(_class_NSXMLDTD, _sel_elementWithName_, name.pointer); - return NSObject._(_ret, retain: true, release: true); + static NSScriptObjectSpecifier alloc() { + final _ret = _objc_msgSend_40(_class_NSScriptObjectSpecifier, _sel_alloc); + return NSScriptObjectSpecifier.castFromPointer(_ret, + retain: false, release: true); } - static NSObject elementWithName_URI_(NSString name, NSString URI) { - final _ret = _objc_msgSend_1108( - _class_NSXMLDTD, _sel_elementWithName_URI_, name.pointer, URI.pointer); - return NSObject._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_selector_object_( + objc.NSObject aTarget, + ffi.Pointer aSelector, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSScriptObjectSpecifier, + _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, + aTarget.pointer, + aSelector, + anArgument?.pointer ?? ffi.nullptr); } - static NSObject elementWithName_stringValue_(NSString name, NSString string) { - final _ret = _objc_msgSend_1108(_class_NSXMLDTD, - _sel_elementWithName_stringValue_, name.pointer, string.pointer); - return NSObject._(_ret, retain: true, release: true); + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSScriptObjectSpecifier, + _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } - static NSObject elementWithName_children_attributes_( - NSString name, NSArray? children, NSArray? attributes) { - final _ret = _objc_msgSend_1109( - _class_NSXMLDTD, - _sel_elementWithName_children_attributes_, - name.pointer, - children?.pointer ?? ffi.nullptr, - attributes?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); + static bool getAccessInstanceVariablesDirectly() { + return _objc_msgSend_7( + _class_NSScriptObjectSpecifier, _sel_accessInstanceVariablesDirectly); } - static NSObject attributeWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLDTD, - _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + static bool useStoredAccessor() { + return _objc_msgSend_7( + _class_NSScriptObjectSpecifier, _sel_useStoredAccessor); } - static NSObject attributeWithName_URI_stringValue_( - NSString name, NSString URI, NSString stringValue) { - final _ret = _objc_msgSend_1074( - _class_NSXMLDTD, - _sel_attributeWithName_URI_stringValue_, - name.pointer, - URI.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSScriptObjectSpecifier, + _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static NSObject namespaceWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLDTD, - _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSScriptObjectSpecifier, + _sel_automaticallyNotifiesObserversForKey_, key.pointer); } - static NSObject processingInstructionWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108( - _class_NSXMLDTD, - _sel_processingInstructionWithName_stringValue_, - name.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + static void setKeys_triggerChangeNotificationsForDependentKey_( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSScriptObjectSpecifier, + _sel_setKeys_triggerChangeNotificationsForDependentKey_, + keys.pointer, + dependentKey.pointer); } - static NSObject commentWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLDTD, _sel_commentWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSScriptObjectSpecifier, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject textWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLDTD, _sel_textWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSScriptObjectSpecifier, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } +} - static NSObject? DTDNodeWithXMLString_(NSString string) { - final _ret = _objc_msgSend_38( - _class_NSXMLDTD, _sel_DTDNodeWithXMLString_, string.pointer); - return _ret.address == 0 - ? null - : NSObject._(_ret, retain: true, release: true); +late final _class_NSScriptObjectSpecifier = + objc.getClass("NSScriptObjectSpecifier"); + +class NSAppleEventDescriptor extends objc.NSObject { + NSAppleEventDescriptor._(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 [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 [NSAppleEventDescriptor]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSAppleEventDescriptor); } - static NSString localNameForName_(NSString name) { + static NSAppleEventDescriptor nullDescriptor() { final _ret = - _objc_msgSend_69(_class_NSXMLDTD, _sel_localNameForName_, name.pointer); - return NSString._(_ret, retain: true, release: true); + _objc_msgSend_709(_class_NSAppleEventDescriptor, _sel_nullDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSString? prefixForName_(NSString name) { - final _ret = - _objc_msgSend_186(_class_NSXMLDTD, _sel_prefixForName_, name.pointer); + static NSAppleEventDescriptor? descriptorWithDescriptorType_bytes_length_( + int descriptorType, ffi.Pointer bytes, int byteCount) { + final _ret = _objc_msgSend_710( + _class_NSAppleEventDescriptor, + _sel_descriptorWithDescriptorType_bytes_length_, + descriptorType, + bytes, + byteCount); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLNode? predefinedNamespaceForPrefix_(NSString name) { - final _ret = _objc_msgSend_1124( - _class_NSXMLDTD, _sel_predefinedNamespaceForPrefix_, name.pointer); + static NSAppleEventDescriptor? descriptorWithDescriptorType_data_( + int descriptorType, objc.NSData? data) { + final _ret = _objc_msgSend_711( + _class_NSAppleEventDescriptor, + _sel_descriptorWithDescriptorType_data_, + descriptorType, + data?.pointer ?? ffi.nullptr); return _ret.address == 0 ? null - : NSXMLNode._(_ret, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTD new1() { - final _ret = _objc_msgSend_2(_class_NSXMLDTD, _sel_new); - return NSXMLDTD._(_ret, retain: false, release: true); + static NSAppleEventDescriptor descriptorWithBoolean_(int boolean) { + final _ret = _objc_msgSend_712( + _class_NSAppleEventDescriptor, _sel_descriptorWithBoolean_, boolean); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTD allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_NSXMLDTD, _sel_allocWithZone_, zone); - return NSXMLDTD._(_ret, retain: false, release: true); + static NSAppleEventDescriptor descriptorWithEnumCode_(int enumerator) { + final _ret = _objc_msgSend_713(_class_NSAppleEventDescriptor, + _sel_descriptorWithEnumCode_, enumerator); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTD alloc() { - final _ret = _objc_msgSend_2(_class_NSXMLDTD, _sel_alloc); - return NSXMLDTD._(_ret, retain: false, release: true); + static NSAppleEventDescriptor descriptorWithInt32_(int signedInt) { + final _ret = _objc_msgSend_714( + _class_NSAppleEventDescriptor, _sel_descriptorWithInt32_, signedInt); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, - ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSXMLDTD, - _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, - aTarget.pointer, - aSelector, - anArgument?.pointer ?? ffi.nullptr); + static NSAppleEventDescriptor descriptorWithDouble_(double doubleValue) { + final _ret = _objc_msgSend_715( + _class_NSAppleEventDescriptor, _sel_descriptorWithDouble_, doubleValue); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithTypeCode_(int typeCode) { + final _ret = _objc_msgSend_713( + _class_NSAppleEventDescriptor, _sel_descriptorWithTypeCode_, typeCode); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithString_(objc.NSString string) { + final _ret = _objc_msgSend_716(_class_NSAppleEventDescriptor, + _sel_descriptorWithString_, string.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithDate_(objc.NSDate date) { + final _ret = _objc_msgSend_717( + _class_NSAppleEventDescriptor, _sel_descriptorWithDate_, date.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } + + static NSAppleEventDescriptor descriptorWithFileURL_(objc.NSURL fileURL) { + final _ret = _objc_msgSend_718(_class_NSAppleEventDescriptor, + _sel_descriptorWithFileURL_, fileURL.pointer); + 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_719( + _class_NSAppleEventDescriptor, + _sel_appleEventWithEventClass_eventID_targetDescriptor_returnID_transactionID_, + eventClass, + eventID, + targetDescriptor?.pointer ?? ffi.nullptr, + returnID, + transactionID); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } + + static NSAppleEventDescriptor listDescriptor() { + final _ret = + _objc_msgSend_709(_class_NSAppleEventDescriptor, _sel_listDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSXMLDTD, - _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); + static NSAppleEventDescriptor recordDescriptor() { + final _ret = + _objc_msgSend_709(_class_NSAppleEventDescriptor, _sel_recordDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSXMLDTD, _sel_accessInstanceVariablesDirectly); + static NSAppleEventDescriptor currentProcessDescriptor() { + final _ret = _objc_msgSend_709( + _class_NSAppleEventDescriptor, _sel_currentProcessDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSXMLDTD, _sel_useStoredAccessor); + static NSAppleEventDescriptor descriptorWithProcessIdentifier_( + int processIdentifier) { + final _ret = _objc_msgSend_714(_class_NSAppleEventDescriptor, + _sel_descriptorWithProcessIdentifier_, processIdentifier); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSXMLDTD, - _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + static NSAppleEventDescriptor descriptorWithBundleIdentifier_( + objc.NSString bundleIdentifier) { + final _ret = _objc_msgSend_716(_class_NSAppleEventDescriptor, + _sel_descriptorWithBundleIdentifier_, bundleIdentifier.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSXMLDTD, - _sel_automaticallyNotifiesObserversForKey_, key.pointer); + static NSAppleEventDescriptor descriptorWithApplicationURL_( + objc.NSURL applicationURL) { + final _ret = _objc_msgSend_718(_class_NSAppleEventDescriptor, + _sel_descriptorWithApplicationURL_, applicationURL.pointer); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSXMLDTD, - _sel_setKeys_triggerChangeNotificationsForDependentKey_, - keys.pointer, - dependentKey.pointer); + NSAppleEventDescriptor initWithAEDescNoCopy_(ffi.Pointer aeDesc) { + final _ret = + _objc_msgSend_720(this.pointer, _sel_initWithAEDescNoCopy_, aeDesc); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = - _objc_msgSend_85(_class_NSXMLDTD, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + NSAppleEventDescriptor? initWithDescriptorType_bytes_length_( + int descriptorType, ffi.Pointer bytes, int byteCount) { + final _ret = _objc_msgSend_721( + this.pointer, + _sel_initWithDescriptorType_bytes_length_, + descriptorType, + bytes, + byteCount); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = _objc_msgSend_2(_class_NSXMLDTD, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + NSAppleEventDescriptor? initWithDescriptorType_data_( + int descriptorType, objc.NSData? data) { + final _ret = _objc_msgSend_722( + this.pointer, + _sel_initWithDescriptorType_data_, + descriptorType, + data?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_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_1118 = 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_1119 = 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_1120 = 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_1121 = 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)>(); + NSAppleEventDescriptor + initWithEventClass_eventID_targetDescriptor_returnID_transactionID_( + int eventClass, + int eventID, + NSAppleEventDescriptor? targetDescriptor, + int returnID, + int transactionID) { + final _ret = _objc_msgSend_723( + this.pointer, + _sel_initWithEventClass_eventID_targetDescriptor_returnID_transactionID_, + eventClass, + eventID, + targetDescriptor?.pointer ?? ffi.nullptr, + returnID, + transactionID); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } -class NSXMLDTDNode extends NSXMLNode { - NSXMLDTDNode._(ffi.Pointer pointer, - {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + NSAppleEventDescriptor initListDescriptor() { + final _ret = _objc_msgSend_40(this.pointer, _sel_initListDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); + } - /// Returns a [NSXMLDTDNode] that points to the same underlying object as [other]. - static NSXMLDTDNode castFrom(T other) { - return NSXMLDTDNode._(other.pointer, retain: true, release: true); + NSAppleEventDescriptor initRecordDescriptor() { + final _ret = _objc_msgSend_40(this.pointer, _sel_initRecordDescriptor); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - /// Returns a [NSXMLDTDNode] that wraps the given raw object pointer. - static NSXMLDTDNode castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return NSXMLDTDNode._(other, retain: retain, release: release); + ffi.Pointer get aeDesc { + return _objc_msgSend_724(this.pointer, _sel_aeDesc); } - /// Returns whether [obj] is an instance of [NSXMLDTDNode]. - static bool isInstance(objc.ObjCObjectBase obj) { - return _objc_msgSend_0( - obj.pointer, _sel_isKindOfClass_, _class_NSXMLDTDNode); + int get descriptorType { + return _objc_msgSend_704(this.pointer, _sel_descriptorType); } - NSXMLDTDNode? initWithXMLString_(NSString string) { - final _ret = - _objc_msgSend_38(this.pointer, _sel_initWithXMLString_, string.pointer); - return _ret.address == 0 - ? null - : NSXMLDTDNode._(_ret, retain: true, release: true); + objc.NSData get data { + final _ret = _objc_msgSend_104(this.pointer, _sel_data); + return objc.NSData.castFromPointer(_ret, retain: true, release: true); } - @override - NSXMLDTDNode initWithKind_options_(int kind, int options) { - final _ret = _objc_msgSend_1106( - this.pointer, _sel_initWithKind_options_, kind, options); - return NSXMLDTDNode._(_ret, retain: true, release: true); + int get booleanValue { + return _objc_msgSend_725(this.pointer, _sel_booleanValue); } - @override - NSXMLDTDNode init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return NSXMLDTDNode._(_ret, retain: true, release: true); + int get enumCodeValue { + return _objc_msgSend_704(this.pointer, _sel_enumCodeValue); } - int get DTDKind { - return _objc_msgSend_1122(this.pointer, _sel_DTDKind); + int get int32Value { + return _objc_msgSend_264(this.pointer, _sel_int32Value); } - set DTDKind(int value) { - return _objc_msgSend_1123(this.pointer, _sel_setDTDKind_, value); + double get doubleValue { + return objc.useMsgSendVariants + ? _objc_msgSend_115Fpret(this.pointer, _sel_doubleValue) + : _objc_msgSend_115(this.pointer, _sel_doubleValue); } - bool get external1 { - return _objc_msgSend_12(this.pointer, _sel_isExternal); + int get typeCodeValue { + return _objc_msgSend_704(this.pointer, _sel_typeCodeValue); } - NSString? get publicID { - final _ret = _objc_msgSend_44(this.pointer, _sel_publicID); + objc.NSString? get stringValue { + final _ret = _objc_msgSend_13(this.pointer, _sel_stringValue); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSString.castFromPointer(_ret, retain: true, release: true); } - set publicID(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setPublicID_, value?.pointer ?? ffi.nullptr); + objc.NSDate? get dateValue { + final _ret = _objc_msgSend_116(this.pointer, _sel_dateValue); + return _ret.address == 0 + ? null + : objc.NSDate.castFromPointer(_ret, retain: true, release: true); } - NSString? get systemID { - final _ret = _objc_msgSend_44(this.pointer, _sel_systemID); + objc.NSURL? get fileURLValue { + final _ret = _objc_msgSend_10(this.pointer, _sel_fileURLValue); return _ret.address == 0 ? null - : NSString._(_ret, retain: true, release: true); + : objc.NSURL.castFromPointer(_ret, retain: true, release: true); } - set systemID(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setSystemID_, value?.pointer ?? ffi.nullptr); + int get eventClass { + return _objc_msgSend_704(this.pointer, _sel_eventClass); } - NSString? get notationName { - final _ret = _objc_msgSend_44(this.pointer, _sel_notationName); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + int get eventID { + return _objc_msgSend_704(this.pointer, _sel_eventID); } - set notationName(NSString? value) { - return _objc_msgSend_545( - this.pointer, _sel_setNotationName_, value?.pointer ?? ffi.nullptr); + int get returnID { + return _objc_msgSend_726(this.pointer, _sel_returnID); } - @override - NSXMLDTDNode initWithKind_(int kind) { - final _ret = _objc_msgSend_1105(this.pointer, _sel_initWithKind_, kind); - return NSXMLDTDNode._(_ret, retain: true, release: true); + int get transactionID { + return _objc_msgSend_264(this.pointer, _sel_transactionID); } - static NSObject document() { - final _ret = _objc_msgSend_2(_class_NSXMLDTDNode, _sel_document); - return NSObject._(_ret, retain: true, release: true); + void setParamDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_727(this.pointer, _sel_setParamDescriptor_forKeyword_, + descriptor.pointer, keyword); } - static NSObject documentWithRootElement_(NSXMLElement element) { - final _ret = _objc_msgSend_1107( - _class_NSXMLDTDNode, _sel_documentWithRootElement_, element.pointer); - return NSObject._(_ret, retain: true, release: true); + NSAppleEventDescriptor? paramDescriptorForKeyword_(int keyword) { + final _ret = _objc_msgSend_728( + this.pointer, _sel_paramDescriptorForKeyword_, keyword); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject elementWithName_(NSString name) { - final _ret = _objc_msgSend_31( - _class_NSXMLDTDNode, _sel_elementWithName_, name.pointer); - return NSObject._(_ret, retain: true, release: true); + void removeParamDescriptorWithKeyword_(int keyword) { + _objc_msgSend_729( + this.pointer, _sel_removeParamDescriptorWithKeyword_, keyword); } - static NSObject elementWithName_URI_(NSString name, NSString URI) { - final _ret = _objc_msgSend_1108(_class_NSXMLDTDNode, - _sel_elementWithName_URI_, name.pointer, URI.pointer); - return NSObject._(_ret, retain: true, release: true); + void setAttributeDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_727(this.pointer, _sel_setAttributeDescriptor_forKeyword_, + descriptor.pointer, keyword); } - static NSObject elementWithName_stringValue_(NSString name, NSString string) { - final _ret = _objc_msgSend_1108(_class_NSXMLDTDNode, - _sel_elementWithName_stringValue_, name.pointer, string.pointer); - return NSObject._(_ret, retain: true, release: true); + NSAppleEventDescriptor? attributeDescriptorForKeyword_(int keyword) { + final _ret = _objc_msgSend_728( + this.pointer, _sel_attributeDescriptorForKeyword_, keyword); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject elementWithName_children_attributes_( - NSString name, NSArray? children, NSArray? attributes) { - final _ret = _objc_msgSend_1109( - _class_NSXMLDTDNode, - _sel_elementWithName_children_attributes_, - name.pointer, - children?.pointer ?? ffi.nullptr, - attributes?.pointer ?? ffi.nullptr); - return NSObject._(_ret, retain: true, release: true); + NSAppleEventDescriptor? sendEventWithOptions_timeout_error_( + int sendOptions, + double timeoutInSeconds, + ffi.Pointer> error) { + final _ret = _objc_msgSend_730( + this.pointer, + _sel_sendEventWithOptions_timeout_error_, + sendOptions, + timeoutInSeconds, + error); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject attributeWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLDTDNode, - _sel_attributeWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + bool get isRecordDescriptor { + return _objc_msgSend_7(this.pointer, _sel_isRecordDescriptor); } - static NSObject attributeWithName_URI_stringValue_( - NSString name, NSString URI, NSString stringValue) { - final _ret = _objc_msgSend_1074( - _class_NSXMLDTDNode, - _sel_attributeWithName_URI_stringValue_, - name.pointer, - URI.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + int get numberOfItems { + return _objc_msgSend_114(this.pointer, _sel_numberOfItems); } - static NSObject namespaceWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108(_class_NSXMLDTDNode, - _sel_namespaceWithName_stringValue_, name.pointer, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + void insertDescriptor_atIndex_(NSAppleEventDescriptor descriptor, int index) { + _objc_msgSend_731(this.pointer, _sel_insertDescriptor_atIndex_, + descriptor.pointer, index); } - static NSObject processingInstructionWithName_stringValue_( - NSString name, NSString stringValue) { - final _ret = _objc_msgSend_1108( - _class_NSXMLDTDNode, - _sel_processingInstructionWithName_stringValue_, - name.pointer, - stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + NSAppleEventDescriptor? descriptorAtIndex_(int index) { + final _ret = + _objc_msgSend_732(this.pointer, _sel_descriptorAtIndex_, index); + return _ret.address == 0 + ? null + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSObject commentWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLDTDNode, _sel_commentWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + void removeDescriptorAtIndex_(int index) { + _objc_msgSend_135(this.pointer, _sel_removeDescriptorAtIndex_, index); } - static NSObject textWithStringValue_(NSString stringValue) { - final _ret = _objc_msgSend_31( - _class_NSXMLDTDNode, _sel_textWithStringValue_, stringValue.pointer); - return NSObject._(_ret, retain: true, release: true); + void setDescriptor_forKeyword_( + NSAppleEventDescriptor descriptor, int keyword) { + _objc_msgSend_727(this.pointer, _sel_setDescriptor_forKeyword_, + descriptor.pointer, keyword); } - static NSObject? DTDNodeWithXMLString_(NSString string) { - final _ret = _objc_msgSend_38( - _class_NSXMLDTDNode, _sel_DTDNodeWithXMLString_, string.pointer); + NSAppleEventDescriptor? descriptorForKeyword_(int keyword) { + final _ret = + _objc_msgSend_728(this.pointer, _sel_descriptorForKeyword_, keyword); return _ret.address == 0 ? null - : NSObject._(_ret, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSString localNameForName_(NSString name) { - final _ret = _objc_msgSend_69( - _class_NSXMLDTDNode, _sel_localNameForName_, name.pointer); - return NSString._(_ret, retain: true, release: true); + void removeDescriptorWithKeyword_(int keyword) { + _objc_msgSend_729(this.pointer, _sel_removeDescriptorWithKeyword_, keyword); } - static NSString? prefixForName_(NSString name) { - final _ret = _objc_msgSend_186( - _class_NSXMLDTDNode, _sel_prefixForName_, name.pointer); - return _ret.address == 0 - ? null - : NSString._(_ret, retain: true, release: true); + int keywordForDescriptorAtIndex_(int index) { + return _objc_msgSend_733( + this.pointer, _sel_keywordForDescriptorAtIndex_, index); } - static NSXMLNode? predefinedNamespaceForPrefix_(NSString name) { - final _ret = _objc_msgSend_1124( - _class_NSXMLDTDNode, _sel_predefinedNamespaceForPrefix_, name.pointer); + NSAppleEventDescriptor? coerceToDescriptorType_(int descriptorType) { + final _ret = _objc_msgSend_728( + this.pointer, _sel_coerceToDescriptorType_, descriptorType); return _ret.address == 0 ? null - : NSXMLNode._(_ret, retain: true, release: true); + : NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTDNode new1() { - final _ret = _objc_msgSend_2(_class_NSXMLDTDNode, _sel_new); - return NSXMLDTDNode._(_ret, retain: false, release: true); + @override + NSAppleEventDescriptor init() { + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: true, release: true); } - static NSXMLDTDNode allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = - _objc_msgSend_3(_class_NSXMLDTDNode, _sel_allocWithZone_, zone); - return NSXMLDTDNode._(_ret, retain: false, release: true); + static NSAppleEventDescriptor new1() { + final _ret = _objc_msgSend_40(_class_NSAppleEventDescriptor, _sel_new); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } - static NSXMLDTDNode alloc() { - final _ret = _objc_msgSend_2(_class_NSXMLDTDNode, _sel_alloc); - return NSXMLDTDNode._(_ret, retain: false, release: true); + static NSAppleEventDescriptor allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_47( + _class_NSAppleEventDescriptor, _sel_allocWithZone_, zone); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); + } + + static NSAppleEventDescriptor alloc() { + final _ret = _objc_msgSend_40(_class_NSAppleEventDescriptor, _sel_alloc); + return NSAppleEventDescriptor.castFromPointer(_ret, + retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( - _class_NSXMLDTDNode, + objc.NSObject? anArgument) { + _objc_msgSend_48( + _class_NSAppleEventDescriptor, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, aSelector, anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_NSXMLDTDNode, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_NSAppleEventDescriptor, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( - _class_NSXMLDTDNode, _sel_accessInstanceVariablesDirectly); + return _objc_msgSend_7( + _class_NSAppleEventDescriptor, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_NSXMLDTDNode, _sel_useStoredAccessor); + return _objc_msgSend_7( + _class_NSAppleEventDescriptor, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_NSXMLDTDNode, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_NSAppleEventDescriptor, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_NSXMLDTDNode, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_NSAppleEventDescriptor, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( - _class_NSXMLDTDNode, + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( + _class_NSAppleEventDescriptor, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_NSXMLDTDNode, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = _objc_msgSend_6( + _class_NSAppleEventDescriptor, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { - final _ret = - _objc_msgSend_2(_class_NSXMLDTDNode, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + static objc.NSObject classForKeyedUnarchiver() { + final _ret = _objc_msgSend_40( + _class_NSAppleEventDescriptor, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } -late final _class_NSXMLDTDNode = objc.getClass("NSXMLDTDNode"); -late final _sel_initWithXMLString_ = objc.registerName("initWithXMLString:"); +late final _class_NSAppleEventDescriptor = + objc.getClass("NSAppleEventDescriptor"); +late final _sel_nullDescriptor = objc.registerName("nullDescriptor"); +final _objc_msgSend_709 = 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_710 = 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_711 = 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_712 = 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_713 = 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_714 = 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_715 = 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_716 = 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_717 = 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_718 = 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_719 = 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:"); -abstract class NSXMLDTDNodeKind { - static const int NSXMLEntityGeneralKind = 1; - static const int NSXMLEntityParsedKind = 2; - static const int NSXMLEntityUnparsedKind = 3; - static const int NSXMLEntityParameterKind = 4; - static const int NSXMLEntityPredefined = 5; - static const int NSXMLAttributeCDATAKind = 6; - static const int NSXMLAttributeIDKind = 7; - static const int NSXMLAttributeIDRefKind = 8; - static const int NSXMLAttributeIDRefsKind = 9; - static const int NSXMLAttributeEntityKind = 10; - static const int NSXMLAttributeEntitiesKind = 11; - static const int NSXMLAttributeNMTokenKind = 12; - static const int NSXMLAttributeNMTokensKind = 13; - static const int NSXMLAttributeEnumerationKind = 14; - static const int NSXMLAttributeNotationKind = 15; - static const int NSXMLElementDeclarationUndefinedKind = 16; - static const int NSXMLElementDeclarationEmptyKind = 17; - static const int NSXMLElementDeclarationAnyKind = 18; - static const int NSXMLElementDeclarationMixedKind = 19; - static const int NSXMLElementDeclarationElementKind = 20; +@ffi.Packed(2) +final class AEDesc extends ffi.Struct { + @ffi.UnsignedInt() + external int descriptorType; + + external ffi.Pointer> dataHandle; } -late final _sel_DTDKind = objc.registerName("DTDKind"); -final _objc_msgSend_1122 = objc.msgSendPointer +final class OpaqueAEDataStorageType extends ffi.Opaque {} + +late final _sel_initWithAEDescNoCopy_ = + objc.registerName("initWithAEDescNoCopy:"); +final _objc_msgSend_720 = 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_721 = 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_722 = 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_723 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Int32 Function(ffi.Pointer, + 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_724 = 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_725 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedChar Function(ffi.Pointer, ffi.Pointer)>>() .asFunction< int Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDTDKind_ = objc.registerName("setDTDKind:"); -final _objc_msgSend_1123 = objc.msgSendPointer +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_726 = 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_727 = 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:"); +final _objc_msgSend_728 = 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_729 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() + ffi.Pointer, ffi.UnsignedInt)>>() .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_1124 = objc.msgSendPointer +late final _sel_setAttributeDescriptor_forKeyword_ = + objc.registerName("setAttributeDescriptor:forKeyword:"); +late final _sel_attributeDescriptorForKeyword_ = + objc.registerName("attributeDescriptorForKeyword:"); + +abstract class NSAppleEventSendOptions { + static const int NSAppleEventSendNoReply = 1; + static const int NSAppleEventSendQueueReply = 2; + static const int NSAppleEventSendWaitForReply = 3; + static const int NSAppleEventSendNeverInteract = 16; + static const int NSAppleEventSendCanInteract = 32; + static const int NSAppleEventSendAlwaysInteract = 48; + static const int NSAppleEventSendCanSwitchLayer = 64; + static const int NSAppleEventSendDontRecord = 4096; + static const int NSAppleEventSendDontExecute = 8192; + static const int NSAppleEventSendDontAnnotate = 65536; + static const int NSAppleEventSendDefaultOptions = 35; +} + +late final _sel_sendEventWithOptions_timeout_error_ = + objc.registerName("sendEventWithOptions:timeout:error:"); +final _objc_msgSend_730 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer, - ffi.Pointer)>>() + ffi.Int32, + 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_731 = 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_732 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Long)>>() .asFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Pointer)>(); -late final _sel_entityDeclarationForName_ = - objc.registerName("entityDeclarationForName:"); -final _objc_msgSend_1125 = objc.msgSendPointer + 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_733 = 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_734 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function( @@ -58796,30 +36625,42 @@ final _objc_msgSend_1125 = objc.msgSendPointer .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_1126 = objc.msgSendPointer +late final _sel_initWithContainerSpecifier_key_ = + objc.registerName("initWithContainerSpecifier:key:"); +final _objc_msgSend_735 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + instancetype Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + instancetype 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_1127 = objc.msgSendPointer +late final _sel_initWithContainerClassDescription_containerSpecifier_key_ = objc + .registerName("initWithContainerClassDescription:containerSpecifier:key:"); +final _objc_msgSend_736 = 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_737 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -58827,8 +36668,8 @@ final _objc_msgSend_1127 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_setDTD_ = objc.registerName("setDTD:"); -final _objc_msgSend_1128 = objc.msgSendPointer +late final _sel_setChildSpecifier_ = objc.registerName("setChildSpecifier:"); +final _objc_msgSend_738 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -58838,8 +36679,24 @@ final _objc_msgSend_1128 = objc.msgSendPointer .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_setRootElement_ = objc.registerName("setRootElement:"); -final _objc_msgSend_1129 = objc.msgSendPointer +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_739 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Void Function( @@ -58849,83 +36706,87 @@ final _objc_msgSend_1129 = objc.msgSendPointer .asFunction< void Function(ffi.Pointer, ffi.Pointer, ffi.Pointer)>(); -late final _sel_rootElement = objc.registerName("rootElement"); -final _objc_msgSend_1130 = 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_1131 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_objectByApplyingXSLT_arguments_error_ = - objc.registerName("objectByApplyingXSLT:arguments:error:"); -final _objc_msgSend_1132 = objc.msgSendPointer +late final _sel_keyClassDescription = objc.registerName("keyClassDescription"); +late final _sel_indicesOfObjectsByEvaluatingWithContainer_count_ = + objc.registerName("indicesOfObjectsByEvaluatingWithContainer:count:"); +final _objc_msgSend_740 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Pointer Function( ffi.Pointer, ffi.Pointer, ffi.Pointer, - ffi.Pointer, - ffi.Pointer>)>>() + ffi.Pointer)>>() .asFunction< - ffi.Pointer Function( + 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_1133 = objc.msgSendPointer + ffi.Pointer)>(); +late final _sel_objectsByEvaluatingWithContainers_ = + objc.registerName("objectsByEvaluatingWithContainers:"); +final _objc_msgSend_741 = 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)>(); +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_742 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(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_1134 = objc.msgSendPointer + 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_743 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Void 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_validateAndReturnError_ = - objc.registerName("validateAndReturnError:"); -late final _sel_rootDocument = objc.registerName("rootDocument"); -final _objc_msgSend_1135 = objc.msgSendPointer + 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_744 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -58933,8 +36794,13 @@ final _objc_msgSend_1135 = objc.msgSendPointer .asFunction< ffi.Pointer Function( ffi.Pointer, ffi.Pointer)>(); -late final _sel_parent = objc.registerName("parent"); -final _objc_msgSend_1136 = objc.msgSendPointer +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_745 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, @@ -58942,205 +36808,134 @@ final _objc_msgSend_1136 = objc.msgSendPointer .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_1137 = 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_1138 = objc.msgSendPointer - .cast< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Int32)>>() - .asFunction< - ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, int)>(); -late final _sel_canonicalXMLStringPreservingComments_ = - objc.registerName("canonicalXMLStringPreservingComments:"); -final _objc_msgSend_1139 = objc.msgSendPointer +late final _sel_createCommandInstanceWithZone_ = + objc.registerName("createCommandInstanceWithZone:"); +final _objc_msgSend_746 = objc.msgSendPointer .cast< ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer, - ffi.Pointer, ffi.Bool)>>() + ffi.Pointer, ffi.Pointer<_NSZone>)>>() .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_1140 = objc.msgSendPointer + ffi.Pointer, ffi.Pointer<_NSZone>)>(); +late final _sel_supportsCommand_ = objc.registerName("supportsCommand:"); +final _objc_msgSend_747 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( + ffi.Bool 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_objectsForXQuery_error_ = - objc.registerName("objectsForXQuery:error:"); -late final _sel_initWithName_URI_ = objc.registerName("initWithName:URI:"); -final _objc_msgSend_1141 = objc.msgSendPointer + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_selectorForCommand_ = objc.registerName("selectorForCommand:"); +final _objc_msgSend_748 = objc.msgSendPointer .cast< ffi.NativeFunction< - instancetype Function( + ffi.Pointer 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:"); -late final _sel_elementsForName_ = objc.registerName("elementsForName:"); -late final _sel_elementsForLocalName_URI_ = - objc.registerName("elementsForLocalName:URI:"); -final _objc_msgSend_1142 = objc.msgSendPointer + 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_749 = 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_addAttribute_ = objc.registerName("addAttribute:"); -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_attributeForName_ = objc.registerName("attributeForName:"); -late final _sel_attributeForLocalName_URI_ = - objc.registerName("attributeForLocalName:URI:"); -final _objc_msgSend_1143 = objc.msgSendPointer + 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_750 = objc.msgSendPointer .cast< ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer, - ffi.Pointer)>>() + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedInt)>>() .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:"); -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:"); + 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:"); -class SwiftClass extends NSObject { +class SwiftClass extends objc.NSObject { SwiftClass._(ffi.Pointer pointer, {bool retain = false, bool release = false}) - : super._(pointer, retain: retain, release: release); + : super.castFromPointer(pointer, retain: retain, release: release); - /// Returns a [SwiftClass] that points to the same underlying object as [other]. - static SwiftClass castFrom(T other) { - return SwiftClass._(other.pointer, retain: true, release: true); - } + /// Constructs a [SwiftClass] that points to the same underlying object as [other]. + SwiftClass.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); - /// Returns a [SwiftClass] that wraps the given raw object pointer. - static SwiftClass castFromPointer(ffi.Pointer other, - {bool retain = false, bool release = false}) { - return SwiftClass._(other, retain: retain, release: release); - } + /// 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); /// Returns whether [obj] is an instance of [SwiftClass]. static bool isInstance(objc.ObjCObjectBase obj) { return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_SwiftClass); } - NSString sayHello() { - final _ret = _objc_msgSend_21(this.pointer, _sel_sayHello); - return NSString._(_ret, retain: true, release: true); + objc.NSString sayHello() { + final _ret = _objc_msgSend_12(this.pointer, _sel_sayHello); + return objc.NSString.castFromPointer(_ret, retain: true, release: true); } int get someField { - return _objc_msgSend_83(this.pointer, _sel_someField); + return _objc_msgSend_114(this.pointer, _sel_someField); } set someField(int value) { - return _objc_msgSend_635(this.pointer, _sel_setSomeField_, value); + return _objc_msgSend_134(this.pointer, _sel_setSomeField_, value); } @override SwiftClass init() { - final _ret = _objc_msgSend_2(this.pointer, _sel_init); - return SwiftClass._(_ret, retain: true, release: true); + final _ret = _objc_msgSend_40(this.pointer, _sel_init); + return SwiftClass.castFromPointer(_ret, retain: true, release: true); } static SwiftClass new1() { - final _ret = _objc_msgSend_2(_class_SwiftClass, _sel_new); - return SwiftClass._(_ret, retain: false, release: true); + final _ret = _objc_msgSend_40(_class_SwiftClass, _sel_new); + return SwiftClass.castFromPointer(_ret, retain: false, release: true); } static SwiftClass allocWithZone_(ffi.Pointer<_NSZone> zone) { - final _ret = _objc_msgSend_3(_class_SwiftClass, _sel_allocWithZone_, zone); - return SwiftClass._(_ret, retain: false, release: true); + final _ret = _objc_msgSend_47(_class_SwiftClass, _sel_allocWithZone_, zone); + return SwiftClass.castFromPointer(_ret, retain: false, release: true); } static SwiftClass alloc() { - final _ret = _objc_msgSend_2(_class_SwiftClass, _sel_alloc); - return SwiftClass._(_ret, retain: false, release: true); + final _ret = _objc_msgSend_40(_class_SwiftClass, _sel_alloc); + return SwiftClass.castFromPointer(_ret, retain: false, release: true); } static void cancelPreviousPerformRequestsWithTarget_selector_object_( - NSObject aTarget, + objc.NSObject aTarget, ffi.Pointer aSelector, - NSObject? anArgument) { - _objc_msgSend_14( + objc.NSObject? anArgument) { + _objc_msgSend_48( _class_SwiftClass, _sel_cancelPreviousPerformRequestsWithTarget_selector_object_, aTarget.pointer, @@ -59148,50 +36943,50 @@ class SwiftClass extends NSObject { anArgument?.pointer ?? ffi.nullptr); } - static void cancelPreviousPerformRequestsWithTarget_(NSObject aTarget) { - _objc_msgSend_15(_class_SwiftClass, + static void cancelPreviousPerformRequestsWithTarget_(objc.NSObject aTarget) { + _objc_msgSend_49(_class_SwiftClass, _sel_cancelPreviousPerformRequestsWithTarget_, aTarget.pointer); } static bool getAccessInstanceVariablesDirectly() { - return _objc_msgSend_12( + return _objc_msgSend_7( _class_SwiftClass, _sel_accessInstanceVariablesDirectly); } static bool useStoredAccessor() { - return _objc_msgSend_12(_class_SwiftClass, _sel_useStoredAccessor); + return _objc_msgSend_7(_class_SwiftClass, _sel_useStoredAccessor); } - static NSSet keyPathsForValuesAffectingValueForKey_(NSString key) { - final _ret = _objc_msgSend_63(_class_SwiftClass, + static objc.NSSet keyPathsForValuesAffectingValueForKey_(objc.NSString key) { + final _ret = _objc_msgSend_50(_class_SwiftClass, _sel_keyPathsForValuesAffectingValueForKey_, key.pointer); - return NSSet._(_ret, retain: true, release: true); + return objc.NSSet.castFromPointer(_ret, retain: true, release: true); } - static bool automaticallyNotifiesObserversForKey_(NSString key) { - return _objc_msgSend_64(_class_SwiftClass, + static bool automaticallyNotifiesObserversForKey_(objc.NSString key) { + return _objc_msgSend_51(_class_SwiftClass, _sel_automaticallyNotifiesObserversForKey_, key.pointer); } static void setKeys_triggerChangeNotificationsForDependentKey_( - NSArray keys, NSString dependentKey) { - _objc_msgSend_88( + objc.NSArray keys, objc.NSString dependentKey) { + _objc_msgSend_52( _class_SwiftClass, _sel_setKeys_triggerChangeNotificationsForDependentKey_, keys.pointer, dependentKey.pointer); } - static NSArray classFallbacksForKeyedArchiver() { - final _ret = _objc_msgSend_85( - _class_SwiftClass, _sel_classFallbacksForKeyedArchiver); - return NSArray._(_ret, retain: true, release: true); + static objc.NSArray classFallbacksForKeyedArchiver() { + final _ret = + _objc_msgSend_6(_class_SwiftClass, _sel_classFallbacksForKeyedArchiver); + return objc.NSArray.castFromPointer(_ret, retain: true, release: true); } - static NSObject classForKeyedUnarchiver() { + static objc.NSObject classForKeyedUnarchiver() { final _ret = - _objc_msgSend_2(_class_SwiftClass, _sel_classForKeyedUnarchiver); - return NSObject._(_ret, retain: true, release: true); + _objc_msgSend_40(_class_SwiftClass, _sel_classForKeyedUnarchiver); + return objc.NSObject.castFromPointer(_ret, retain: true, release: true); } } diff --git a/pkgs/ffigen/ffigen.schema.json b/pkgs/ffigen/ffigen.schema.json index 2116c4f01..a6777c295 100644 --- a/pkgs/ffigen/ffigen.schema.json +++ b/pkgs/ffigen/ffigen.schema.json @@ -367,6 +367,9 @@ "exclude-all-by-default": { "type": "boolean" }, + "generate-for-package-objective-c": { + "type": "boolean" + }, "sort": { "type": "boolean" }, diff --git a/pkgs/ffigen/lib/src/code_generator/imports.dart b/pkgs/ffigen/lib/src/code_generator/imports.dart index 5030743b1..d0b5352ac 100644 --- a/pkgs/ffigen/lib/src/code_generator/imports.dart +++ b/pkgs/ffigen/lib/src/code_generator/imports.dart @@ -8,10 +8,16 @@ import 'writer.dart'; /// A library import which will be written as an import in the generated file. class LibraryImport { final String name; - final String importPath; + final String _importPath; + final String? _importPathWhenImportedByPackageObjC; + String prefix; - LibraryImport(this.name, this.importPath) : prefix = name; + LibraryImport(this.name, this._importPath, + {String? importPathWhenImportedByPackageObjC}) + : _importPathWhenImportedByPackageObjC = + importPathWhenImportedByPackageObjC, + prefix = name; @override bool operator ==(other) { @@ -20,6 +26,13 @@ class LibraryImport { @override int get hashCode => name.hashCode; + + // The import path, which may be different if this library is being imported + // into package:objective_c's generated code. + String importPath(bool generateForPackageObjectiveC) { + if (!generateForPackageObjectiveC) return _importPath; + return _importPathWhenImportedByPackageObjC ?? _importPath; + } } /// An imported type which will be used in the generated code. @@ -75,8 +88,9 @@ class SelfImportedType extends Type { final ffiImport = LibraryImport('ffi', 'dart:ffi'); final ffiPkgImport = LibraryImport('pkg_ffi', 'package:ffi/ffi.dart'); -final objcPkgImport = - LibraryImport('objc', 'package:objective_c/objective_c.dart'); +final objcPkgImport = LibraryImport( + 'objc', 'package:objective_c/objective_c.dart', + importPathWhenImportedByPackageObjC: '../objective_c.dart'); final self = LibraryImport('self', ''); final voidType = ImportedType(ffiImport, 'Void', 'void'); diff --git a/pkgs/ffigen/lib/src/code_generator/library.dart b/pkgs/ffigen/lib/src/code_generator/library.dart index f311ac07e..cbb6d19c9 100644 --- a/pkgs/ffigen/lib/src/code_generator/library.dart +++ b/pkgs/ffigen/lib/src/code_generator/library.dart @@ -29,6 +29,7 @@ class Library { required List bindings, String? header, bool sort = false, + bool generateForPackageObjectiveC = false, StructPackingOverride? packingOverride, Set? libraryImports, }) { @@ -82,6 +83,7 @@ class Library { classDocComment: description, header: header, additionalImports: libraryImports, + generateForPackageObjectiveC: generateForPackageObjectiveC, ); } diff --git a/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart b/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart index 463bd7aa2..7c6028054 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_built_in_functions.dart @@ -9,6 +9,10 @@ import 'writer.dart'; /// Built in functions used by the Objective C bindings. class ObjCBuiltInFunctions { + ObjCBuiltInFunctions(this.generateForPackageObjectiveC); + + final bool generateForPackageObjectiveC; + static const registerName = ObjCImport('registerName'); static const getClass = ObjCImport('getClass'); static const msgSendPointer = ObjCImport('msgSendPointer'); @@ -19,6 +23,41 @@ class ObjCBuiltInFunctions { static const objectBase = ObjCImport('ObjCObjectBase'); static const blockBase = ObjCImport('ObjCBlockBase'); + // Keep in sync with pkgs/objective_c/ffigen_objc.yaml. + static const builtInInterfaces = { + 'NSArray', + 'NSCharacterSet', + 'NSCoder', + 'NSData', + 'NSDate', + 'NSDictionary', + 'NSEnumerator', + 'NSError', + 'NSIndexSet', + 'NSInvocation', + 'NSItemProvider', + 'NSLocale', + 'NSMethodSignature', + 'NSMutableArray', + 'NSMutableData', + 'NSMutableDictionary', + 'NSMutableSet', + 'NSMutableString', + 'NSNotification', + 'NSNumber', + 'NSObject', + 'NSProgress', + 'NSSet', + 'NSString', + 'NSURL', + 'NSURLHandle', + 'NSValue', + 'Protocol', + }; + + bool isBuiltInInterface(String name) => + !generateForPackageObjectiveC && builtInInterfaces.contains(name); + // We need to load a separate instance of objc_msgSend for each signature. If // the return type is a struct, we need to use objc_msgSend_stret instead, and // for float return types we need objc_msgSend_fpret. @@ -52,49 +91,6 @@ class ObjCBuiltInFunctions { sel.addDependencies(dependencies); } } - - final _interfaceRegistry = {}; - void registerInterface(ObjCInterface interface) { - _interfaceRegistry[interface.originalName] = interface; - } - - ObjCInterface get nsData { - return _interfaceRegistry["NSData"] ?? - (ObjCInterface( - originalName: "NSData", - builtInFunctions: this, - )); - } - - static void generateNSStringUtils(Writer w, StringBuffer s) { - // Generate a constructor that wraps stringWithCharacters, and a toString - // method that wraps dataUsingEncoding. - s.write(''' - factory NSString(String str) { - final cstr = str.toNativeUtf16(); - final nsstr = stringWithCharacters_length_(cstr.cast(), str.length); - ${w.ffiPkgLibraryPrefix}.calloc.free(cstr); - return nsstr; - } - - @override - String toString() { - final data = dataUsingEncoding_( - 0x94000100 /* NSUTF16LittleEndianStringEncoding */); - return data!.bytes.cast<${w.ffiPkgLibraryPrefix}.Utf16>().toDartString( - length: length); - } -'''); - } - - static void generateStringUtils(Writer w, StringBuffer s) { - // Generate an extension on String to convert to NSString - s.write(''' -extension StringToNSString on String { - NSString toNSString() => NSString(this); -} -'''); - } } /// A function, global variable, or helper type defined in package:objective_c. @@ -117,7 +113,7 @@ class ObjCInternalGlobal extends NoLookUpBinding { BindingString toBindingString(Writer w) { final s = StringBuffer(); name = w.wrapperLevelUniqueNamer.makeUnique(name); - s.write('late final $name = ${makeValue(w)};'); + s.write('late final $name = ${makeValue(w)};\n'); return BindingString(type: BindingStringType.global, string: s.toString()); } diff --git a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart index ab51ff139..cbc7c193d 100644 --- a/pkgs/ffigen/lib/src/code_generator/objc_interface.dart +++ b/pkgs/ffigen/lib/src/code_generator/objc_interface.dart @@ -55,17 +55,16 @@ class ObjCInterface extends BindingType { super.dartDoc, required this.builtInFunctions, }) : lookupName = lookupName ?? originalName, - super( - name: name ?? originalName, - ) { - builtInFunctions.registerInterface(this); - } + super(name: name ?? originalName); - bool get isNSString => originalName == "NSString"; - bool get isNSData => originalName == "NSData"; + bool get _isBuiltIn => builtInFunctions.isBuiltInInterface(name); @override BindingString toBindingString(Writer w) { + if (_isBuiltIn) { + return BindingString(type: BindingStringType.objcInterface, string: ''); + } + String paramsToString(List params, {required bool isStatic}) { final List stringParams = []; @@ -89,22 +88,20 @@ class ObjCInterface extends BindingType { // Class declaration. s.write(''' -class $name extends ${superType?.name ?? wrapObjType} { +class $name extends ${superType?.getDartType(w) ?? wrapObjType} { $name._($rawObjType pointer, {bool retain = false, bool release = false}) : - ${superTypeIsInPkgObjc ? 'super(pointer, ' : 'super._(pointer,'} - retain: retain, release: release); + ${superTypeIsInPkgObjc ? 'super' : 'super.castFromPointer'} + (pointer, retain: retain, release: release); - /// Returns a [$name] that points to the same underlying object as [other]. - static $name castFrom(T other) { - return $name._(other.pointer, retain: true, release: true); - } + /// Constructs a [$name] that points to the same underlying object as [other]. + $name.castFrom($wrapObjType other) : + this._(other.pointer, retain: true, release: true); - /// Returns a [$name] that wraps the given raw object pointer. - static $name castFromPointer($rawObjType other, - {bool retain = false, bool release = false}) { - return $name._(other, retain: retain, release: release); - } + /// Constructs a [$name] that wraps the given raw object pointer. + $name.castFromPointer($rawObjType other, + {bool retain = false, bool release = false}) : + this._(other, retain: retain, release: release); /// Returns whether [obj] is an instance of [$name]. static bool isInstance($wrapObjType obj) { @@ -118,10 +115,6 @@ class $name extends ${superType?.name ?? wrapObjType} { '''); - if (isNSString) { - ObjCBuiltInFunctions.generateNSStringUtils(w, s); - } - // Methods. for (final m in methods.values) { final methodName = m._getDartMethodName(uniqueNamer); @@ -225,19 +218,14 @@ class $name extends ${superType?.name ?? wrapObjType} { s.write('}\n\n'); - if (isNSString) { - ObjCBuiltInFunctions.generateStringUtils(w, s); - } - return BindingString( type: BindingStringType.objcInterface, string: s.toString()); } @override void addDependencies(Set dependencies) { - if (dependencies.contains(this)) return; + if (dependencies.contains(this) || _isBuiltIn) return; dependencies.add(this); - builtInFunctions.addDependencies(dependencies); _classObject = ObjCInternalGlobal('_class_$originalName', (Writer w) => '${ObjCBuiltInFunctions.getClass.gen(w)}("$lookupName")') @@ -246,14 +234,6 @@ class $name extends ${superType?.name ?? wrapObjType} { _isKindOfClassMsgSend = builtInFunctions.getMsgSendFunc( BooleanType(), [ObjCMethodParam(PointerType(objCObjectType), 'clazz')]); - if (isNSString) { - _addNSStringMethods(); - } - - if (isNSData) { - _addNSDataMethods(); - } - if (superType != null) { superType!.addDependencies(dependencies); _copyMethodsFromSuperType(); @@ -263,6 +243,8 @@ class $name extends ${superType?.name ?? wrapObjType} { for (final m in methods.values) { m.addDependencies(dependencies, builtInFunctions); } + + builtInFunctions.addDependencies(dependencies); } void _copyMethodsFromSuperType() { @@ -345,50 +327,12 @@ class $name extends ${superType?.name ?? wrapObjType} { methods[method.originalName] = method; } - void _addNSStringMethods() { - addMethod(ObjCMethod( - originalName: 'stringWithCharacters:length:', - kind: ObjCMethodKind.method, - isClass: true, - returnType: this, - params_: [ - ObjCMethodParam(PointerType(wCharType), 'characters'), - ObjCMethodParam(unsignedIntType, 'length'), - ], - )); - addMethod(ObjCMethod( - originalName: 'dataUsingEncoding:', - kind: ObjCMethodKind.method, - isClass: false, - returnType: builtInFunctions.nsData, - params_: [ - ObjCMethodParam(unsignedIntType, 'encoding'), - ], - )); - addMethod(ObjCMethod( - originalName: 'length', - kind: ObjCMethodKind.propertyGetter, - isClass: false, - returnType: unsignedIntType, - params_: [], - )); - } - - void _addNSDataMethods() { - addMethod(ObjCMethod( - originalName: 'bytes', - kind: ObjCMethodKind.propertyGetter, - isClass: false, - returnType: PointerType(voidType), - params_: [], - )); - } - @override String getCType(Writer w) => PointerType(objCObjectType).getCType(w); @override - String getDartType(Writer w) => name; + String getDartType(Writer w) => + _isBuiltIn ? '${w.objcPkgPrefix}.$name' : name; @override bool get sameFfiDartAndCType => true; @@ -417,7 +361,7 @@ class $name extends ${superType?.name ?? wrapObjType} { required bool objCRetain, String? objCEnclosingClass, }) => - ObjCInterface.generateConstructor(name, value, objCRetain); + ObjCInterface.generateConstructor(getDartType(w), value, objCRetain); static String generateConstructor( String className, @@ -425,7 +369,7 @@ class $name extends ${superType?.name ?? wrapObjType} { bool objCRetain, ) { final ownershipFlags = 'retain: $objCRetain, release: true'; - return '$className._($value, $ownershipFlags)'; + return '$className.castFromPointer($value, $ownershipFlags)'; } // Utils for converting between the internal types passed to native code, and diff --git a/pkgs/ffigen/lib/src/code_generator/pointer.dart b/pkgs/ffigen/lib/src/code_generator/pointer.dart index 563846aa6..963b7549e 100644 --- a/pkgs/ffigen/lib/src/code_generator/pointer.dart +++ b/pkgs/ffigen/lib/src/code_generator/pointer.dart @@ -94,7 +94,9 @@ class ObjCObjectPointer extends PointerType { ObjCObjectPointer._() : super._(objCObjectType); @override - String getDartType(Writer w) => 'NSObject'; + String getDartType(Writer w) => w.generateForPackageObjectiveC + ? 'NSObject' + : '${w.objcPkgPrefix}.NSObject'; @override bool get sameDartAndCType => false; @@ -117,5 +119,5 @@ class ObjCObjectPointer extends PointerType { required bool objCRetain, String? objCEnclosingClass, }) => - ObjCInterface.generateConstructor('NSObject', value, objCRetain); + ObjCInterface.generateConstructor(getDartType(w), value, objCRetain); } diff --git a/pkgs/ffigen/lib/src/code_generator/writer.dart b/pkgs/ffigen/lib/src/code_generator/writer.dart index cec1fdd4b..5094b5b91 100644 --- a/pkgs/ffigen/lib/src/code_generator/writer.dart +++ b/pkgs/ffigen/lib/src/code_generator/writer.dart @@ -34,6 +34,8 @@ class Writer { final String? classDocComment; + final bool generateForPackageObjectiveC; + String? _ffiLibraryPrefix; String get ffiLibraryPrefix { if (_ffiLibraryPrefix != null) { @@ -119,6 +121,7 @@ class Writer { Set? additionalImports, this.classDocComment, this.header, + required this.generateForPackageObjectiveC, }) { final globalLevelNameSet = noLookUpBindings.map((e) => e.name).toSet(); final wrapperLevelNameSet = lookUpBindings.map((e) => e.name).toSet(); @@ -306,9 +309,8 @@ class Writer { // Write neccesary imports. for (final lib in _usedImports) { - result - ..write("import '${lib.importPath}' as ${lib.prefix};") - ..write('\n'); + final path = lib.importPath(generateForPackageObjectiveC); + result.write("import '$path' as ${lib.prefix};\n"); } result.write(s); diff --git a/pkgs/ffigen/lib/src/config_provider/config.dart b/pkgs/ffigen/lib/src/config_provider/config.dart index 69740f4b7..1e6e36684 100644 --- a/pkgs/ffigen/lib/src/config_provider/config.dart +++ b/pkgs/ffigen/lib/src/config_provider/config.dart @@ -98,6 +98,14 @@ class Config { bool get excludeAllByDefault => _excludeAllByDefault; late bool _excludeAllByDefault; + /// Undocumented option that changes code generation for package:objective_c. + /// The main difference is whether NSObject etc are imported from + /// package:objective_c (the default) or code genned like any other class. + /// This is necessary because package:objective_c can't import NSObject from + /// itself. + bool get generateForPackageObjectiveC => _generateForPackageObjectiveC; + late bool _generateForPackageObjectiveC; + /// If generated bindings should be sorted alphabetically. bool get sort => _sort; late bool _sort; @@ -602,6 +610,13 @@ class Config { defaultValue: (node) => false, resultOrDefault: (node) => _excludeAllByDefault = node.value as bool, ), + HeterogeneousMapEntry( + key: strings.generateForPackageObjectiveC, + valueConfigSpec: BoolConfigSpec(), + defaultValue: (node) => false, + resultOrDefault: (node) => + _generateForPackageObjectiveC = node.value as bool, + ), HeterogeneousMapEntry( key: strings.sort, valueConfigSpec: BoolConfigSpec(), diff --git a/pkgs/ffigen/lib/src/config_provider/spec_utils.dart b/pkgs/ffigen/lib/src/config_provider/spec_utils.dart index 31326ace9..41860e89c 100644 --- a/pkgs/ffigen/lib/src/config_provider/spec_utils.dart +++ b/pkgs/ffigen/lib/src/config_provider/spec_utils.dart @@ -92,15 +92,15 @@ Map symbolFileImportExtractor( final uniqueNamer = UniqueNamer(libraryImports.keys .followedBy([strings.defaultSymbolFileImportPrefix]).toSet()); for (final file in (symbolFile[strings.files] as YamlMap).keys) { - final existingImports = - libraryImports.values.where((element) => element.importPath == file); + final existingImports = libraryImports.values + .where((element) => element.importPath(false) == file); if (existingImports.isEmpty) { final name = uniqueNamer.makeUnique(strings.defaultSymbolFileImportPrefix); libraryImports[name] = LibraryImport(name, file as String); } final libraryImport = libraryImports.values.firstWhere( - (element) => element.importPath == file, + (element) => element.importPath(false) == file, ); loadImportedTypes( symbolFile[strings.files][file] as YamlMap, resultMap, libraryImport); diff --git a/pkgs/ffigen/lib/src/executables/ffigen.dart b/pkgs/ffigen/lib/src/executables/ffigen.dart index 1c6008592..dde472381 100644 --- a/pkgs/ffigen/lib/src/executables/ffigen.dart +++ b/pkgs/ffigen/lib/src/executables/ffigen.dart @@ -17,6 +17,7 @@ final _ansi = Ansi(Ansi.terminalSupportsAnsi); const compilerOpts = 'compiler-opts'; const ignoreSourceErrors = 'ignore-source-errors'; +const format = 'format'; const conf = 'config'; const help = 'help'; const verbose = 'verbose'; @@ -36,7 +37,7 @@ String errorPen(String str) { return '${_ansi.red}$str${_ansi.none}'; } -void main(List args) async { +Future main(List args) async { // Parses the cmd args. This will print usage and exit if --help was passed. final argResult = getArgResults(args); @@ -57,7 +58,7 @@ void main(List args) async { // Generate file for the parsed bindings. final gen = File(config.output); - library.generateFile(gen); + library.generateFile(gen, format: argResult[format] as bool); _logger .info(successPen('Finished, Bindings generated in ${gen.absolute.path}')); @@ -168,6 +169,12 @@ ArgResults getArgResults(List args) { help: 'Ignore any compiler warnings/errors in source header files', negatable: false, ); + parser.addFlag( + format, + help: 'Format the generated code.', + defaultsTo: true, + negatable: true, + ); ArgResults results; try { diff --git a/pkgs/ffigen/lib/src/header_parser/data.dart b/pkgs/ffigen/lib/src/header_parser/data.dart index bab37af43..15cceb5d4 100644 --- a/pkgs/ffigen/lib/src/header_parser/data.dart +++ b/pkgs/ffigen/lib/src/header_parser/data.dart @@ -57,6 +57,7 @@ void initializeGlobals({required Config config}) { _unnamedEnumConstants = []; _cursorIndex = CursorIndex(); _bindingsIndex = BindingsIndex(); - _objCBuiltInFunctions = ObjCBuiltInFunctions(); + _objCBuiltInFunctions = + ObjCBuiltInFunctions(config.generateForPackageObjectiveC); hasSourceErrors = false; } diff --git a/pkgs/ffigen/lib/src/header_parser/parser.dart b/pkgs/ffigen/lib/src/header_parser/parser.dart index fce0b4926..8f14fab8a 100644 --- a/pkgs/ffigen/lib/src/header_parser/parser.dart +++ b/pkgs/ffigen/lib/src/header_parser/parser.dart @@ -26,11 +26,12 @@ Library parse(Config c) { final library = Library( bindings: bindings, - name: config.wrapperName, - description: config.wrapperDocComment, - header: config.preamble, - sort: config.sort, - packingOverride: config.structPackingOverride, + name: c.wrapperName, + description: c.wrapperDocComment, + header: c.preamble, + sort: c.sort, + generateForPackageObjectiveC: c.generateForPackageObjectiveC, + packingOverride: c.structPackingOverride, libraryImports: c.libraryImports.values.toSet(), ); diff --git a/pkgs/ffigen/lib/src/strings.dart b/pkgs/ffigen/lib/src/strings.dart index b14a51791..cc1397a7f 100644 --- a/pkgs/ffigen/lib/src/strings.dart +++ b/pkgs/ffigen/lib/src/strings.dart @@ -74,6 +74,7 @@ const typedefs = 'typedefs'; const objcInterfaces = 'objc-interfaces'; const excludeAllByDefault = 'exclude-all-by-default'; +const generateForPackageObjectiveC = 'generate-for-package-objective-c'; // Sub-fields of Declarations. const include = 'include'; diff --git a/pkgs/ffigen/test/example_tests/objective_c_example_test.dart b/pkgs/ffigen/test/example_tests/objective_c_example_test.dart index 22b07f1c2..2c0444998 100644 --- a/pkgs/ffigen/test/example_tests/objective_c_example_test.dart +++ b/pkgs/ffigen/test/example_tests/objective_c_example_test.dart @@ -25,14 +25,11 @@ void main() { // Verify that the output contains all the methods and classes that the // example app uses. - expect(output, contains('class NSString extends NSObject {')); - expect(output, contains('class NSURL extends NSObject {')); - expect( - output, contains('static NSURL fileURLWithPath_(NSString path) {')); - expect(output, contains('class AVAudioPlayer extends NSObject {')); + expect(output, contains('class AVAudioPlayer extends objc.NSObject {')); expect( output, - contains('AVAudioPlayer? initWithContentsOfURL_error_(NSURL url, ' + contains( + 'AVAudioPlayer? initWithContentsOfURL_error_(objc.NSURL url, ' 'ffi.Pointer> outError) {')); expect(output, contains('double get duration {')); expect(output, contains('bool play() {')); diff --git a/pkgs/ffigen/test/example_tests/swift_example_test.dart b/pkgs/ffigen/test/example_tests/swift_example_test.dart index 6e6bdb23e..ff5811164 100644 --- a/pkgs/ffigen/test/example_tests/swift_example_test.dart +++ b/pkgs/ffigen/test/example_tests/swift_example_test.dart @@ -51,8 +51,7 @@ void main() { // Verify that the output contains all the methods and classes that the // example app uses. - expect(output, contains('class NSString extends NSObject {')); - expect(output, contains('class SwiftClass extends NSObject {')); + expect(output, contains('class SwiftClass extends objc.NSObject {')); expect(output, contains('static SwiftClass new1() {')); expect(output, contains('NSString sayHello() {')); expect(output, contains('int get someField {')); diff --git a/pkgs/ffigen/test/native_objc_test/is_instance_test.dart b/pkgs/ffigen/test/native_objc_test/is_instance_test.dart index 172ced2fc..de8beeea4 100644 --- a/pkgs/ffigen/test/native_objc_test/is_instance_test.dart +++ b/pkgs/ffigen/test/native_objc_test/is_instance_test.dart @@ -9,7 +9,9 @@ import 'dart:ffi'; import 'dart:io'; +import 'package:objective_c/objective_c.dart'; import 'package:test/test.dart'; + import '../test_utils.dart'; import 'is_instance_bindings.dart'; import 'util.dart'; diff --git a/pkgs/ffigen/test/native_objc_test/nullable_inheritance_test.dart b/pkgs/ffigen/test/native_objc_test/nullable_inheritance_test.dart index 3c1f694fe..06dd6a756 100644 --- a/pkgs/ffigen/test/native_objc_test/nullable_inheritance_test.dart +++ b/pkgs/ffigen/test/native_objc_test/nullable_inheritance_test.dart @@ -8,7 +8,9 @@ import 'dart:ffi'; import 'dart:io'; +import 'package:objective_c/objective_c.dart'; import 'package:test/test.dart'; + import '../test_utils.dart'; import 'nullable_inheritance_bindings.dart'; import 'util.dart'; diff --git a/pkgs/ffigen/test/native_objc_test/nullable_test.dart b/pkgs/ffigen/test/native_objc_test/nullable_test.dart index 94df841d6..134048e41 100644 --- a/pkgs/ffigen/test/native_objc_test/nullable_test.dart +++ b/pkgs/ffigen/test/native_objc_test/nullable_test.dart @@ -8,7 +8,9 @@ import 'dart:ffi'; import 'dart:io'; +import 'package:objective_c/objective_c.dart'; import 'package:test/test.dart'; + import '../test_utils.dart'; import 'nullable_bindings.dart'; import 'util.dart'; diff --git a/pkgs/ffigen/test/native_objc_test/string_test.dart b/pkgs/ffigen/test/native_objc_test/string_test.dart index 5a9ca92d1..fc429763b 100644 --- a/pkgs/ffigen/test/native_objc_test/string_test.dart +++ b/pkgs/ffigen/test/native_objc_test/string_test.dart @@ -8,7 +8,9 @@ import 'dart:ffi'; import 'dart:io'; +import 'package:objective_c/objective_c.dart'; import 'package:test/test.dart'; + import '../test_utils.dart'; import 'string_bindings.dart'; import 'util.dart'; diff --git a/pkgs/ffigen/test/regen.dart b/pkgs/ffigen/test/regen.dart index ec5296449..cec13ec7f 100644 --- a/pkgs/ffigen/test/regen.dart +++ b/pkgs/ffigen/test/regen.dart @@ -60,4 +60,8 @@ Future main(List args) async { 'example/simple/config.yaml', 'example/simple/generated_bindings.dart'); _regenConfig('example/c_json/config.yaml', 'example/c_json/cjson_generated_bindings.dart'); + _regenConfig( + 'example/swift/config.yaml', 'example/swift/swift_api_bindings.dart'); + _regenConfig('example/objective_c/config.yaml', + 'example/objective_c/avf_audio_bindings.dart'); } diff --git a/pkgs/ffigen/tool/coverage.sh b/pkgs/ffigen/tool/coverage.sh index 9c9c24581..b5c35e4aa 100755 --- a/pkgs/ffigen/tool/coverage.sh +++ b/pkgs/ffigen/tool/coverage.sh @@ -12,4 +12,4 @@ dart pub global activate coverage # Generate coverage report. dart run --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=3000 test & dart pub global run coverage:collect_coverage --wait-paused --uri=http://127.0.0.1:3000/ -o coverage.json --resume-isolates --scope-output=ffigen --scope-output=objective_c -dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --lcov -i coverage.json -o lcov.info +dart pub global run coverage:format_coverage --check-ignore --packages=.dart_tool/package_config.json --lcov -i coverage.json -o lcov.info diff --git a/pkgs/objective_c/CHANGELOG.md b/pkgs/objective_c/CHANGELOG.md index efb02f5a2..73ec74755 100644 --- a/pkgs/objective_c/CHANGELOG.md +++ b/pkgs/objective_c/CHANGELOG.md @@ -1,5 +1,6 @@ ## 0.0.1-wip - Move sharable code from ffigen's generated code into this package, including - ObjCObjectBase, and ObjCBlockBase, as well as the core Objective C runtime - functions (except objc_msgSend, which is library specific). + `ObjCObjectBase`, and `ObjCBlockBase`, as well as the core Objective C runtime + functions (except `objc_msgSend`, which is library specific). +- Move core ObjC classes such as `NSString` into this package. diff --git a/pkgs/objective_c/analysis_options.yaml b/pkgs/objective_c/analysis_options.yaml index 22c406e13..a2ac23069 100644 --- a/pkgs/objective_c/analysis_options.yaml +++ b/pkgs/objective_c/analysis_options.yaml @@ -1,6 +1,8 @@ include: package:flutter_lints/flutter.yaml analyzer: + exclude: + - tool/data/extra_methods.dart language: strict-casts: true strict-inference: true diff --git a/pkgs/objective_c/ffigen.yaml b/pkgs/objective_c/ffigen_c.yaml similarity index 71% rename from pkgs/objective_c/ffigen.yaml rename to pkgs/objective_c/ffigen_c.yaml index dbfabf528..7e2c98baa 100644 --- a/pkgs/objective_c/ffigen.yaml +++ b/pkgs/objective_c/ffigen_c.yaml @@ -1,15 +1,13 @@ -# Run with `dart run ffigen --config ffigen.yaml`. -name: ObjectiveCBindings -description: | - Bindings for `src/objective_c.h` and `src/objective_c_runtime.h`. - - Regenerate bindings with `dart run ffigen --config ffigen.yaml`. -output: 'lib/src/objective_c_bindings_generated.dart' +# Generate bindings for the C headers. +# Regenerate bindings with `dart run tool/generate_code.dart`. +name: CBindings +output: 'lib/src/c_bindings_generated.dart' headers: entry-points: - 'src/objective_c.h' - 'src/objective_c_runtime.h' ffi-native: +generate-for-package-objective-c: true functions: leaf: include: @@ -34,6 +32,10 @@ preamble: | // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. + // Bindings for `src/objective_c.h` and `src/objective_c_runtime.h`. + // Regenerate bindings with `dart run tool/generate_code.dart`. + // ignore_for_file: always_specify_types // ignore_for_file: camel_case_types // ignore_for_file: non_constant_identifier_names + // coverage:ignore-file diff --git a/pkgs/objective_c/ffigen_objc.yaml b/pkgs/objective_c/ffigen_objc.yaml new file mode 100644 index 000000000..4be46b550 --- /dev/null +++ b/pkgs/objective_c/ffigen_objc.yaml @@ -0,0 +1,56 @@ +# Generate bindings for the ObjC headers. +# Regenerate bindings with `dart run tool/generate_code.dart`. +name: ObjectiveCBindings +language: objc +output: 'lib/src/objective_c_bindings_generated.dart' +headers: + entry-points: + - 'src/foundation.h' +ffi-native: +exclude-all-by-default: true +generate-for-package-objective-c: true +objc-interfaces: + # Keep in sync with ffigen's ObjCBuiltInFunctions.builtInInterfaces. + include: + - NSArray + - NSCharacterSet + - NSCoder + - NSData + - NSDate + - NSDictionary + - NSEnumerator + - NSError + - NSIndexSet + - NSInvocation + - NSItemProvider + - NSLocale + - NSMethodSignature + - NSMutableArray + - NSMutableData + - NSMutableDictionary + - NSMutableSet + - NSMutableString + - NSNotification + - NSNumber + - NSObject + - NSProgress + - NSSet + - NSString + - NSURL + - NSURLHandle + - NSValue + - Protocol +preamble: | + // Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file + // for details. All rights reserved. Use of this source code is governed by a + // BSD-style license that can be found in the LICENSE file. + + // Bindings for `src/foundation.h`. + // Regenerate bindings with `dart run tool/generate_code.dart`. + + // ignore_for_file: always_specify_types + // ignore_for_file: camel_case_types + // ignore_for_file: non_constant_identifier_names + // coverage:ignore-file + + import 'package:ffi/ffi.dart' as pkg_ffi; diff --git a/pkgs/objective_c/lib/objective_c.dart b/pkgs/objective_c/lib/objective_c.dart index 754a061a7..ed4ad2bf6 100644 --- a/pkgs/objective_c/lib/objective_c.dart +++ b/pkgs/objective_c/lib/objective_c.dart @@ -3,7 +3,8 @@ // BSD-style license that can be found in the LICENSE file. export 'src/core.dart'; -export 'src/objective_c_bindings_generated.dart' +export 'src/ns_string.dart'; +export 'src/c_bindings_generated.dart' show ObjCSelector, ObjCObject, @@ -12,3 +13,35 @@ export 'src/objective_c_bindings_generated.dart' objectRelease, blockCopy, blockRelease; + +// Keep in sync with pkgs/objective_c/ffigen_objc.yaml. +export 'src/objective_c_bindings_generated.dart' + show + NSArray, + NSCharacterSet, + NSCoder, + NSData, + NSDate, + NSDictionary, + NSEnumerator, + NSError, + NSIndexSet, + NSInvocation, + NSItemProvider, + NSLocale, + NSMethodSignature, + NSMutableArray, + NSMutableData, + NSMutableDictionary, + NSMutableSet, + NSMutableString, + NSNotification, + NSNumber, + NSObject, + NSProgress, + NSSet, + NSString, + NSURL, + NSURLHandle, + NSValue, + Protocol; diff --git a/pkgs/objective_c/lib/src/c_bindings_generated.dart b/pkgs/objective_c/lib/src/c_bindings_generated.dart new file mode 100644 index 000000000..d2282d69b --- /dev/null +++ b/pkgs/objective_c/lib/src/c_bindings_generated.dart @@ -0,0 +1,111 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Bindings for `src/objective_c.h` and `src/objective_c_runtime.h`. +// Regenerate bindings with `dart run tool/generate_code.dart`. + +// ignore_for_file: always_specify_types +// ignore_for_file: camel_case_types +// ignore_for_file: non_constant_identifier_names +// coverage:ignore-file + +// AUTO GENERATED FILE, DO NOT EDIT. +// +// Generated by `package:ffigen`. +// ignore_for_file: type=lint +import 'dart:ffi' as ffi; + +@ffi.Native Function(ffi.Pointer)>( + symbol: "sel_registerName", isLeaf: true) +external ffi.Pointer registerName( + ffi.Pointer name, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: "objc_getClass", isLeaf: true) +external ffi.Pointer getClass( + ffi.Pointer name, +); + +@ffi.Native Function(ffi.Pointer)>( + symbol: "objc_retain", isLeaf: true) +external ffi.Pointer objectRetain( + ffi.Pointer object, +); + +@ffi.Native)>( + symbol: "objc_release", isLeaf: true) +external void objectRelease( + ffi.Pointer object, +); + +@ffi.Native(symbol: "objc_msgSend") +external void msgSend(); + +@ffi.Native(symbol: "objc_msgSend_fpret") +external void msgSendFpret(); + +@ffi.Native(symbol: "objc_msgSend_stret") +external void msgSendStret(); + +@ffi.Native>(symbol: "_NSConcreteGlobalBlock") +external final ffi.Pointer NSConcreteGlobalBlock; + +@ffi.Native Function(ffi.Pointer)>( + symbol: "_Block_copy", isLeaf: true) +external ffi.Pointer blockCopy( + ffi.Pointer object, +); + +@ffi.Native)>( + symbol: "_Block_release", isLeaf: true) +external void blockRelease( + ffi.Pointer object, +); + +final class _ObjCSelector extends ffi.Opaque {} + +final class _ObjCObject extends ffi.Opaque {} + +typedef ObjCSelector = _ObjCSelector; +typedef ObjCObject = _ObjCObject; + +final class _ObjCBlockDesc extends ffi.Struct { + @ffi.UnsignedLong() + external int reserved; + + @ffi.UnsignedLong() + external int size; + + external ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer dst, ffi.Pointer src)>> + copy_helper; + + external ffi + .Pointer src)>> + dispose_helper; + + external ffi.Pointer signature; +} + +final class _ObjCBlock extends ffi.Struct { + external ffi.Pointer isa; + + @ffi.Int() + external int flags; + + @ffi.Int() + external int reserved; + + external ffi.Pointer invoke; + + external ffi.Pointer descriptor; + + external ffi.Pointer target; +} + +typedef ObjCBlockDesc = _ObjCBlockDesc; +typedef ObjCBlock = _ObjCBlock; diff --git a/pkgs/objective_c/lib/src/core.dart b/pkgs/objective_c/lib/src/core.dart index f06c16c9b..8fccdab20 100644 --- a/pkgs/objective_c/lib/src/core.dart +++ b/pkgs/objective_c/lib/src/core.dart @@ -6,18 +6,18 @@ import 'dart:ffi'; import 'package:ffi/ffi.dart'; -import 'objective_c_bindings_generated.dart' as objc; +import 'c_bindings_generated.dart' as c; -Pointer registerName(String name) { +Pointer registerName(String name) { final cstr = name.toNativeUtf8(); - final sel = objc.registerName(cstr.cast()); + final sel = c.registerName(cstr.cast()); calloc.free(cstr); return sel; } -Pointer getClass(String name) { +Pointer getClass(String name) { final cstr = name.toNativeUtf8(); - final clazz = objc.getClass(cstr.cast()); + final clazz = c.getClass(cstr.cast()); calloc.free(cstr); if (clazz == nullptr) { throw Exception('Failed to load Objective-C class: $name'); @@ -26,11 +26,11 @@ Pointer getClass(String name) { } final msgSendPointer = - Native.addressOf>(objc.msgSend); + Native.addressOf>(c.msgSend); final msgSendFpretPointer = - Native.addressOf>(objc.msgSendFpret); + Native.addressOf>(c.msgSendFpret); final msgSendStretPointer = - Native.addressOf>(objc.msgSendStret); + Native.addressOf>(c.msgSendStret); final useMsgSendVariants = Abi.current() == Abi.iosX64 || Abi.current() == Abi.macosX64; @@ -87,47 +87,46 @@ class _ObjCFinalizable implements Finalizable { void _release(Pointer ptr) => throw UnimplementedError(); } -class ObjCObjectBase extends _ObjCFinalizable { +class ObjCObjectBase extends _ObjCFinalizable { ObjCObjectBase(super.ptr, {required super.retain, required super.release}); static final _objectFinalizer = NativeFinalizer( - Native.addressOf)>>( - objc.objectRelease) + Native.addressOf)>>( + c.objectRelease) .cast()); @override NativeFinalizer get _finalizer => _objectFinalizer; @override - void _retain(Pointer ptr) => objc.objectRetain(ptr); + void _retain(Pointer ptr) => c.objectRetain(ptr); @override - void _release(Pointer ptr) => objc.objectRelease(ptr); + void _release(Pointer ptr) => c.objectRelease(ptr); } -class ObjCBlockBase extends _ObjCFinalizable { +class ObjCBlockBase extends _ObjCFinalizable { ObjCBlockBase(super.ptr, {required super.retain, required super.release}); static final _blockFinalizer = NativeFinalizer( - Native.addressOf)>>( - objc.blockRelease) + Native.addressOf)>>( + c.blockRelease) .cast()); @override NativeFinalizer get _finalizer => _blockFinalizer; @override - void _retain(Pointer ptr) => objc.blockCopy(ptr); + void _retain(Pointer ptr) => c.blockCopy(ptr); @override - void _release(Pointer ptr) => objc.blockRelease(ptr); + void _release(Pointer ptr) => c.blockRelease(ptr); } -Pointer _newBlockDesc() { - final desc = - calloc.allocate(sizeOf()); +Pointer _newBlockDesc() { + final desc = calloc.allocate(sizeOf()); desc.ref.reserved = 0; - desc.ref.size = sizeOf(); + desc.ref.size = sizeOf(); desc.ref.copy_helper = nullptr; desc.ref.dispose_helper = nullptr; desc.ref.signature = nullptr; @@ -136,15 +135,15 @@ Pointer _newBlockDesc() { final _blockDesc = _newBlockDesc(); -Pointer newBlock(Pointer invoke, Pointer target) { - final b = calloc.allocate(sizeOf()); - b.ref.isa = objc.NSConcreteGlobalBlock; +Pointer newBlock(Pointer invoke, Pointer target) { + final b = calloc.allocate(sizeOf()); + b.ref.isa = c.NSConcreteGlobalBlock; b.ref.flags = 0; b.ref.reserved = 0; b.ref.invoke = invoke; b.ref.target = target; b.ref.descriptor = _blockDesc; - final copy = objc.blockCopy(b.cast()).cast(); + final copy = c.blockCopy(b.cast()).cast(); calloc.free(b); return copy; } diff --git a/pkgs/objective_c/lib/src/ns_string.dart b/pkgs/objective_c/lib/src/ns_string.dart new file mode 100644 index 000000000..721180316 --- /dev/null +++ b/pkgs/objective_c/lib/src/ns_string.dart @@ -0,0 +1,9 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'objective_c_bindings_generated.dart'; + +extension StringToNSString on String { + NSString toNSString() => NSString(this); +} diff --git a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart index b586c2dbf..3dff896c0 100644 --- a/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart +++ b/pkgs/objective_c/lib/src/objective_c_bindings_generated.dart @@ -2,106 +2,16037 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. +// Bindings for `src/foundation.h`. +// Regenerate bindings with `dart run tool/generate_code.dart`. + // ignore_for_file: always_specify_types // ignore_for_file: camel_case_types // ignore_for_file: non_constant_identifier_names +// coverage:ignore-file + +import 'package:ffi/ffi.dart' as pkg_ffi; // AUTO GENERATED FILE, DO NOT EDIT. // // Generated by `package:ffigen`. // ignore_for_file: type=lint import 'dart:ffi' as ffi; +import '../objective_c.dart' as objc; + +class NSObject extends objc.ObjCObjectBase { + NSObject._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSObject] that points to the same underlying object as [other]. + NSObject.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSObject] that wraps the given raw object pointer. + NSObject.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSObject]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSObject); + } + + static void load() { + _objc_msgSend_1(_class_NSObject, _sel_load); + } + + static void initialize() { + _objc_msgSend_1(_class_NSObject, _sel_initialize); + } + + NSObject init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject new1() { + final _ret = _objc_msgSend_2(_class_NSObject, _sel_new); + return NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static NSObject allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSObject, _sel_allocWithZone_, zone); + return NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static NSObject alloc() { + final _ret = _objc_msgSend_2(_class_NSObject, _sel_alloc); + return NSObject.castFromPointer(_ret, retain: false, release: true); + } + + void dealloc() { + _objc_msgSend_1(this.pointer, _sel_dealloc); + } + + void finalize() { + _objc_msgSend_1(this.pointer, _sel_finalize); + } + + NSObject copy() { + final _ret = _objc_msgSend_2(this.pointer, _sel_copy); + return NSObject.castFromPointer(_ret, retain: false, release: true); + } + + NSObject mutableCopy() { + final _ret = _objc_msgSend_2(this.pointer, _sel_mutableCopy); + return NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static NSObject copyWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSObject, _sel_copyWithZone_, zone); + return NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static NSObject mutableCopyWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSObject, _sel_mutableCopyWithZone_, zone); + return NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static bool instancesRespondToSelector_( + ffi.Pointer aSelector) { + return _objc_msgSend_4( + _class_NSObject, _sel_instancesRespondToSelector_, aSelector); + } + + static bool conformsToProtocol_(Protocol protocol) { + return _objc_msgSend_5( + _class_NSObject, _sel_conformsToProtocol_, protocol.pointer); + } + + ffi.Pointer> methodForSelector_( + ffi.Pointer aSelector) { + return _objc_msgSend_6(this.pointer, _sel_methodForSelector_, aSelector); + } + + static ffi.Pointer> + instanceMethodForSelector_(ffi.Pointer aSelector) { + return _objc_msgSend_6( + _class_NSObject, _sel_instanceMethodForSelector_, aSelector); + } + + void doesNotRecognizeSelector_(ffi.Pointer aSelector) { + _objc_msgSend_7(this.pointer, _sel_doesNotRecognizeSelector_, aSelector); + } + + NSObject forwardingTargetForSelector_( + ffi.Pointer aSelector) { + final _ret = _objc_msgSend_8( + this.pointer, _sel_forwardingTargetForSelector_, aSelector); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void forwardInvocation_(NSInvocation anInvocation) { + _objc_msgSend_9( + this.pointer, _sel_forwardInvocation_, anInvocation.pointer); + } + + NSMethodSignature methodSignatureForSelector_( + ffi.Pointer aSelector) { + final _ret = _objc_msgSend_10( + this.pointer, _sel_methodSignatureForSelector_, aSelector); + return NSMethodSignature.castFromPointer(_ret, retain: true, release: true); + } + + static NSMethodSignature instanceMethodSignatureForSelector_( + ffi.Pointer aSelector) { + final _ret = _objc_msgSend_10( + _class_NSObject, _sel_instanceMethodSignatureForSelector_, aSelector); + return NSMethodSignature.castFromPointer(_ret, retain: true, release: true); + } + + bool allowsWeakReference() { + return _objc_msgSend_11(this.pointer, _sel_allowsWeakReference); + } + + bool retainWeakReference() { + return _objc_msgSend_11(this.pointer, _sel_retainWeakReference); + } + + static bool isSubclassOfClass_(NSObject aClass) { + return _objc_msgSend_0( + _class_NSObject, _sel_isSubclassOfClass_, aClass.pointer); + } + + static bool resolveClassMethod_(ffi.Pointer sel) { + return _objc_msgSend_4(_class_NSObject, _sel_resolveClassMethod_, sel); + } + + static bool resolveInstanceMethod_(ffi.Pointer sel) { + return _objc_msgSend_4(_class_NSObject, _sel_resolveInstanceMethod_, sel); + } + + static int hash() { + return _objc_msgSend_12(_class_NSObject, _sel_hash); + } + + static NSObject superclass() { + final _ret = _objc_msgSend_2(_class_NSObject, _sel_superclass); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject class1() { + final _ret = _objc_msgSend_2(_class_NSObject, _sel_class); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSString description() { + final _ret = _objc_msgSend_32(_class_NSObject, _sel_description); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString debugDescription() { + final _ret = _objc_msgSend_32(_class_NSObject, _sel_debugDescription); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static int version() { + return _objc_msgSend_86(_class_NSObject, _sel_version); + } + + static void setVersion_(int aVersion) { + _objc_msgSend_284(_class_NSObject, _sel_setVersion_, aVersion); + } + + NSObject get classForCoder { + final _ret = _objc_msgSend_2(this.pointer, _sel_classForCoder); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? replacementObjectForCoder_(NSCoder coder) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_replacementObjectForCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? awakeAfterUsingCoder_(NSCoder coder) { + final _ret = _objc_msgSend_14( + this.pointer, _sel_awakeAfterUsingCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: false, release: true); + } + + static void poseAsClass_(NSObject aClass) { + _objc_msgSend_198(_class_NSObject, _sel_poseAsClass_, aClass.pointer); + } + + NSObject get autoContentAccessingProxy { + final _ret = _objc_msgSend_2(this.pointer, _sel_autoContentAccessingProxy); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void URL_resourceDataDidBecomeAvailable_(NSURL sender, NSData newBytes) { + _objc_msgSend_285(this.pointer, _sel_URL_resourceDataDidBecomeAvailable_, + sender.pointer, newBytes.pointer); + } + + void URLResourceDidFinishLoading_(NSURL sender) { + _objc_msgSend_286( + this.pointer, _sel_URLResourceDidFinishLoading_, sender.pointer); + } + + void URLResourceDidCancelLoading_(NSURL sender) { + _objc_msgSend_286( + this.pointer, _sel_URLResourceDidCancelLoading_, sender.pointer); + } + + void URL_resourceDidFailLoadingWithReason_(NSURL sender, NSString reason) { + _objc_msgSend_287(this.pointer, _sel_URL_resourceDidFailLoadingWithReason_, + sender.pointer, reason.pointer); + } +} + +late final _class_NSObject = objc.getClass("NSObject"); +late final _sel_load = objc.registerName("load"); +final _objc_msgSend_1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initialize = objc.registerName("initialize"); +typedef instancetype = ffi.Pointer; +typedef Dartinstancetype = NSObject; +late final _sel_init = objc.registerName("init"); +final _objc_msgSend_2 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_new = objc.registerName("new"); + +final class _NSZone extends ffi.Opaque {} + +late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); +final _objc_msgSend_3 = 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_dealloc = objc.registerName("dealloc"); +late final _sel_finalize = objc.registerName("finalize"); +late final _sel_copy = objc.registerName("copy"); +late final _sel_mutableCopy = objc.registerName("mutableCopy"); +late final _sel_copyWithZone_ = objc.registerName("copyWithZone:"); +late final _sel_mutableCopyWithZone_ = + objc.registerName("mutableCopyWithZone:"); +late final _sel_instancesRespondToSelector_ = + objc.registerName("instancesRespondToSelector:"); +final _objc_msgSend_4 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class Protocol extends objc.ObjCObjectBase { + Protocol._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [Protocol] that points to the same underlying object as [other]. + Protocol.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [Protocol] that wraps the given raw object pointer. + Protocol.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [Protocol]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_Protocol); + } +} + +late final _class_Protocol = objc.getClass("Protocol"); +final _objc_msgSend_0 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_conformsToProtocol_ = objc.registerName("conformsToProtocol:"); +final _objc_msgSend_5 = 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_methodForSelector_ = objc.registerName("methodForSelector:"); +final _objc_msgSend_6 = 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_instanceMethodForSelector_ = + objc.registerName("instanceMethodForSelector:"); +late final _sel_doesNotRecognizeSelector_ = + objc.registerName("doesNotRecognizeSelector:"); +final _objc_msgSend_7 = 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_forwardingTargetForSelector_ = + objc.registerName("forwardingTargetForSelector:"); +final _objc_msgSend_8 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSInvocation extends objc.ObjCObjectBase { + NSInvocation._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSInvocation] that points to the same underlying object as [other]. + NSInvocation.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSInvocation] that wraps the given raw object pointer. + NSInvocation.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSInvocation]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSInvocation); + } +} + +late final _class_NSInvocation = objc.getClass("NSInvocation"); +late final _sel_forwardInvocation_ = objc.registerName("forwardInvocation:"); +final _objc_msgSend_9 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +class NSMethodSignature extends objc.ObjCObjectBase { + NSMethodSignature._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSMethodSignature] that points to the same underlying object as [other]. + NSMethodSignature.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMethodSignature] that wraps the given raw object pointer. + NSMethodSignature.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMethodSignature]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMethodSignature); + } +} + +late final _class_NSMethodSignature = objc.getClass("NSMethodSignature"); +late final _sel_methodSignatureForSelector_ = + objc.registerName("methodSignatureForSelector:"); +final _objc_msgSend_10 = 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_instanceMethodSignatureForSelector_ = + objc.registerName("instanceMethodSignatureForSelector:"); +late final _sel_allowsWeakReference = objc.registerName("allowsWeakReference"); +final _objc_msgSend_11 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_retainWeakReference = objc.registerName("retainWeakReference"); +late final _sel_isSubclassOfClass_ = objc.registerName("isSubclassOfClass:"); +late final _sel_resolveClassMethod_ = objc.registerName("resolveClassMethod:"); +late final _sel_resolveInstanceMethod_ = + objc.registerName("resolveInstanceMethod:"); +late final _sel_hash = objc.registerName("hash"); +final _objc_msgSend_12 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_superclass = objc.registerName("superclass"); +late final _sel_class = objc.registerName("class"); + +class NSString extends NSObject { + factory NSString(String str) { + final cstr = str.toNativeUtf16(); + final nsstr = stringWithCharacters_length_(cstr.cast(), str.length); + pkg_ffi.calloc.free(cstr); + return nsstr; + } + + @override + String toString() { + final data = + dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); + return data!.bytes.cast().toDartString(length: length); + } + + NSString._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSString] that points to the same underlying object as [other]. + NSString.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSString] that wraps the given raw object pointer. + NSString.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSString]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSString); + } + + int get length { + return _objc_msgSend_12(this.pointer, _sel_length); + } + + int characterAtIndex_(int index) { + return _objc_msgSend_13(this.pointer, _sel_characterAtIndex_, index); + } + + @override + NSString init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString substringFromIndex_(int from) { + final _ret = _objc_msgSend_15(this.pointer, _sel_substringFromIndex_, from); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString substringToIndex_(int to) { + final _ret = _objc_msgSend_15(this.pointer, _sel_substringToIndex_, to); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString substringWithRange_(_NSRange range) { + final _ret = + _objc_msgSend_16(this.pointer, _sel_substringWithRange_, range); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + void getCharacters_range_( + ffi.Pointer buffer, _NSRange range) { + _objc_msgSend_17(this.pointer, _sel_getCharacters_range_, buffer, range); + } + + int compare_(NSString string) { + return _objc_msgSend_18(this.pointer, _sel_compare_, string.pointer); + } + + int compare_options_(NSString string, int mask) { + return _objc_msgSend_19( + this.pointer, _sel_compare_options_, string.pointer, mask); + } + + int compare_options_range_( + NSString string, int mask, _NSRange rangeOfReceiverToCompare) { + return _objc_msgSend_20(this.pointer, _sel_compare_options_range_, + string.pointer, mask, rangeOfReceiverToCompare); + } + + int compare_options_range_locale_(NSString string, int mask, + _NSRange rangeOfReceiverToCompare, NSObject? locale) { + return _objc_msgSend_21( + this.pointer, + _sel_compare_options_range_locale_, + string.pointer, + mask, + rangeOfReceiverToCompare, + locale?.pointer ?? ffi.nullptr); + } + + int caseInsensitiveCompare_(NSString string) { + return _objc_msgSend_18( + this.pointer, _sel_caseInsensitiveCompare_, string.pointer); + } + + int localizedCompare_(NSString string) { + return _objc_msgSend_18( + this.pointer, _sel_localizedCompare_, string.pointer); + } + + int localizedCaseInsensitiveCompare_(NSString string) { + return _objc_msgSend_18( + this.pointer, _sel_localizedCaseInsensitiveCompare_, string.pointer); + } + + int localizedStandardCompare_(NSString string) { + return _objc_msgSend_18( + this.pointer, _sel_localizedStandardCompare_, string.pointer); + } + + bool isEqualToString_(NSString aString) { + return _objc_msgSend_22( + this.pointer, _sel_isEqualToString_, aString.pointer); + } + + bool hasPrefix_(NSString str) { + return _objc_msgSend_22(this.pointer, _sel_hasPrefix_, str.pointer); + } + + bool hasSuffix_(NSString str) { + return _objc_msgSend_22(this.pointer, _sel_hasSuffix_, str.pointer); + } + + NSString commonPrefixWithString_options_(NSString str, int mask) { + final _ret = _objc_msgSend_23( + this.pointer, _sel_commonPrefixWithString_options_, str.pointer, mask); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool containsString_(NSString str) { + return _objc_msgSend_22(this.pointer, _sel_containsString_, str.pointer); + } + + bool localizedCaseInsensitiveContainsString_(NSString str) { + return _objc_msgSend_22(this.pointer, + _sel_localizedCaseInsensitiveContainsString_, str.pointer); + } + + bool localizedStandardContainsString_(NSString str) { + return _objc_msgSend_22( + this.pointer, _sel_localizedStandardContainsString_, str.pointer); + } + + void localizedStandardRangeOfString_( + ffi.Pointer<_NSRange> stret, NSString str) { + objc.useMsgSendVariants + ? _objc_msgSend_24Stret(stret, this.pointer, + _sel_localizedStandardRangeOfString_, str.pointer) + : stret.ref = _objc_msgSend_24( + this.pointer, _sel_localizedStandardRangeOfString_, str.pointer); + } + + void rangeOfString_(ffi.Pointer<_NSRange> stret, NSString searchString) { + objc.useMsgSendVariants + ? _objc_msgSend_24Stret( + stret, this.pointer, _sel_rangeOfString_, searchString.pointer) + : stret.ref = _objc_msgSend_24( + this.pointer, _sel_rangeOfString_, searchString.pointer); + } + + void rangeOfString_options_( + ffi.Pointer<_NSRange> stret, NSString searchString, int mask) { + objc.useMsgSendVariants + ? _objc_msgSend_25Stret(stret, this.pointer, + _sel_rangeOfString_options_, searchString.pointer, mask) + : stret.ref = _objc_msgSend_25(this.pointer, + _sel_rangeOfString_options_, searchString.pointer, mask); + } + + void rangeOfString_options_range_(ffi.Pointer<_NSRange> stret, + NSString searchString, int mask, _NSRange rangeOfReceiverToSearch) { + objc.useMsgSendVariants + ? _objc_msgSend_26Stret( + stret, + this.pointer, + _sel_rangeOfString_options_range_, + searchString.pointer, + mask, + rangeOfReceiverToSearch) + : stret.ref = _objc_msgSend_26( + this.pointer, + _sel_rangeOfString_options_range_, + searchString.pointer, + mask, + rangeOfReceiverToSearch); + } + + void rangeOfString_options_range_locale_( + ffi.Pointer<_NSRange> stret, + NSString searchString, + int mask, + _NSRange rangeOfReceiverToSearch, + NSLocale? locale) { + objc.useMsgSendVariants + ? _objc_msgSend_27Stret( + stret, + this.pointer, + _sel_rangeOfString_options_range_locale_, + searchString.pointer, + mask, + rangeOfReceiverToSearch, + locale?.pointer ?? ffi.nullptr) + : stret.ref = _objc_msgSend_27( + this.pointer, + _sel_rangeOfString_options_range_locale_, + searchString.pointer, + mask, + rangeOfReceiverToSearch, + locale?.pointer ?? ffi.nullptr); + } + + void rangeOfCharacterFromSet_( + ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet) { + objc.useMsgSendVariants + ? _objc_msgSend_229Stret(stret, this.pointer, + _sel_rangeOfCharacterFromSet_, searchSet.pointer) + : stret.ref = _objc_msgSend_229( + this.pointer, _sel_rangeOfCharacterFromSet_, searchSet.pointer); + } + + void rangeOfCharacterFromSet_options_( + ffi.Pointer<_NSRange> stret, NSCharacterSet searchSet, int mask) { + objc.useMsgSendVariants + ? _objc_msgSend_230Stret(stret, this.pointer, + _sel_rangeOfCharacterFromSet_options_, searchSet.pointer, mask) + : stret.ref = _objc_msgSend_230(this.pointer, + _sel_rangeOfCharacterFromSet_options_, searchSet.pointer, mask); + } + + void rangeOfCharacterFromSet_options_range_(ffi.Pointer<_NSRange> stret, + NSCharacterSet searchSet, int mask, _NSRange rangeOfReceiverToSearch) { + objc.useMsgSendVariants + ? _objc_msgSend_231Stret( + stret, + this.pointer, + _sel_rangeOfCharacterFromSet_options_range_, + searchSet.pointer, + mask, + rangeOfReceiverToSearch) + : stret.ref = _objc_msgSend_231( + this.pointer, + _sel_rangeOfCharacterFromSet_options_range_, + searchSet.pointer, + mask, + rangeOfReceiverToSearch); + } + + void rangeOfComposedCharacterSequenceAtIndex_( + ffi.Pointer<_NSRange> stret, int index) { + objc.useMsgSendVariants + ? _objc_msgSend_232Stret(stret, this.pointer, + _sel_rangeOfComposedCharacterSequenceAtIndex_, index) + : stret.ref = _objc_msgSend_232( + this.pointer, _sel_rangeOfComposedCharacterSequenceAtIndex_, index); + } + + void rangeOfComposedCharacterSequencesForRange_( + ffi.Pointer<_NSRange> stret, _NSRange range) { + objc.useMsgSendVariants + ? _objc_msgSend_233Stret(stret, this.pointer, + _sel_rangeOfComposedCharacterSequencesForRange_, range) + : stret.ref = _objc_msgSend_233(this.pointer, + _sel_rangeOfComposedCharacterSequencesForRange_, range); + } + + NSString stringByAppendingString_(NSString aString) { + final _ret = _objc_msgSend_101( + this.pointer, _sel_stringByAppendingString_, aString.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString stringByAppendingFormat_(NSString format) { + final _ret = _objc_msgSend_101( + this.pointer, _sel_stringByAppendingFormat_, format.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + double get doubleValue { + return objc.useMsgSendVariants + ? _objc_msgSend_90Fpret(this.pointer, _sel_doubleValue) + : _objc_msgSend_90(this.pointer, _sel_doubleValue); + } + + double get floatValue { + return objc.useMsgSendVariants + ? _objc_msgSend_89Fpret(this.pointer, _sel_floatValue) + : _objc_msgSend_89(this.pointer, _sel_floatValue); + } + + int get intValue { + return _objc_msgSend_84(this.pointer, _sel_intValue); + } + + int get integerValue { + return _objc_msgSend_86(this.pointer, _sel_integerValue); + } + + int get longLongValue { + return _objc_msgSend_87(this.pointer, _sel_longLongValue); + } + + bool get boolValue { + return _objc_msgSend_11(this.pointer, _sel_boolValue); + } + + NSString get uppercaseString { + final _ret = _objc_msgSend_32(this.pointer, _sel_uppercaseString); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get lowercaseString { + final _ret = _objc_msgSend_32(this.pointer, _sel_lowercaseString); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get capitalizedString { + final _ret = _objc_msgSend_32(this.pointer, _sel_capitalizedString); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get localizedUppercaseString { + final _ret = _objc_msgSend_32(this.pointer, _sel_localizedUppercaseString); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get localizedLowercaseString { + final _ret = _objc_msgSend_32(this.pointer, _sel_localizedLowercaseString); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get localizedCapitalizedString { + final _ret = + _objc_msgSend_32(this.pointer, _sel_localizedCapitalizedString); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString uppercaseStringWithLocale_(NSLocale? locale) { + final _ret = _objc_msgSend_234(this.pointer, + _sel_uppercaseStringWithLocale_, locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString lowercaseStringWithLocale_(NSLocale? locale) { + final _ret = _objc_msgSend_234(this.pointer, + _sel_lowercaseStringWithLocale_, locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString capitalizedStringWithLocale_(NSLocale? locale) { + final _ret = _objc_msgSend_234(this.pointer, + _sel_capitalizedStringWithLocale_, locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + void getLineStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer lineEndPtr, + ffi.Pointer contentsEndPtr, + _NSRange range) { + _objc_msgSend_235(this.pointer, _sel_getLineStart_end_contentsEnd_forRange_, + startPtr, lineEndPtr, contentsEndPtr, range); + } + + void lineRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { + objc.useMsgSendVariants + ? _objc_msgSend_233Stret( + stret, this.pointer, _sel_lineRangeForRange_, range) + : stret.ref = + _objc_msgSend_233(this.pointer, _sel_lineRangeForRange_, range); + } -@ffi.Native Function(ffi.Pointer)>( - symbol: 'sel_registerName', isLeaf: true) -external ffi.Pointer registerName( - ffi.Pointer name, -); + void getParagraphStart_end_contentsEnd_forRange_( + ffi.Pointer startPtr, + ffi.Pointer parEndPtr, + ffi.Pointer contentsEndPtr, + _NSRange range) { + _objc_msgSend_235( + this.pointer, + _sel_getParagraphStart_end_contentsEnd_forRange_, + startPtr, + parEndPtr, + contentsEndPtr, + range); + } -@ffi.Native Function(ffi.Pointer)>( - symbol: 'objc_getClass', isLeaf: true) -external ffi.Pointer getClass( - ffi.Pointer name, -); + void paragraphRangeForRange_(ffi.Pointer<_NSRange> stret, _NSRange range) { + objc.useMsgSendVariants + ? _objc_msgSend_233Stret( + stret, this.pointer, _sel_paragraphRangeForRange_, range) + : stret.ref = _objc_msgSend_233( + this.pointer, _sel_paragraphRangeForRange_, range); + } -@ffi.Native Function(ffi.Pointer)>( - symbol: 'objc_retain', isLeaf: true) -external ffi.Pointer objectRetain( - ffi.Pointer object, -); + void enumerateSubstringsInRange_options_usingBlock_(_NSRange range, int opts, + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool block) { + _objc_msgSend_236( + this.pointer, + _sel_enumerateSubstringsInRange_options_usingBlock_, + range, + opts, + block.pointer); + } -@ffi.Native)>( - symbol: 'objc_release', isLeaf: true) -external void objectRelease( - ffi.Pointer object, -); + void enumerateLinesUsingBlock_(ObjCBlock_ffiVoid_NSString_bool block) { + _objc_msgSend_237( + this.pointer, _sel_enumerateLinesUsingBlock_, block.pointer); + } -@ffi.Native(symbol: 'objc_msgSend') -external void msgSend(); + ffi.Pointer get UTF8String { + return _objc_msgSend_57(this.pointer, _sel_UTF8String); + } -@ffi.Native(symbol: 'objc_msgSend_fpret') -external void msgSendFpret(); + int get fastestEncoding { + return _objc_msgSend_12(this.pointer, _sel_fastestEncoding); + } -@ffi.Native(symbol: 'objc_msgSend_stret') -external void msgSendStret(); + int get smallestEncoding { + return _objc_msgSend_12(this.pointer, _sel_smallestEncoding); + } -@ffi.Native>(symbol: '_NSConcreteGlobalBlock') -external final ffi.Pointer NSConcreteGlobalBlock; + NSData? dataUsingEncoding_allowLossyConversion_(int encoding, bool lossy) { + final _ret = _objc_msgSend_238(this.pointer, + _sel_dataUsingEncoding_allowLossyConversion_, encoding, lossy); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } -@ffi.Native Function(ffi.Pointer)>( - symbol: '_Block_copy', isLeaf: true) -external ffi.Pointer blockCopy( - ffi.Pointer object, -); + NSData? dataUsingEncoding_(int encoding) { + final _ret = + _objc_msgSend_239(this.pointer, _sel_dataUsingEncoding_, encoding); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } -@ffi.Native)>( - symbol: '_Block_release', isLeaf: true) -external void blockRelease( - ffi.Pointer object, -); + bool canBeConvertedToEncoding_(int encoding) { + return _objc_msgSend_121( + this.pointer, _sel_canBeConvertedToEncoding_, encoding); + } -final class _ObjCSelector extends ffi.Opaque {} + ffi.Pointer cStringUsingEncoding_(int encoding) { + return _objc_msgSend_240( + this.pointer, _sel_cStringUsingEncoding_, encoding); + } -final class _ObjCObject extends ffi.Opaque {} + bool getCString_maxLength_encoding_( + ffi.Pointer buffer, int maxBufferCount, int encoding) { + return _objc_msgSend_241(this.pointer, _sel_getCString_maxLength_encoding_, + buffer, maxBufferCount, encoding); + } -typedef ObjCSelector = _ObjCSelector; -typedef ObjCObject = _ObjCObject; + bool getBytes_maxLength_usedLength_encoding_options_range_remainingRange_( + ffi.Pointer buffer, + int maxBufferCount, + ffi.Pointer usedBufferCount, + int encoding, + int options, + _NSRange range, + ffi.Pointer<_NSRange> leftover) { + return _objc_msgSend_242( + this.pointer, + _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_, + buffer, + maxBufferCount, + usedBufferCount, + encoding, + options, + range, + leftover); + } -final class _ObjCBlockDesc extends ffi.Struct { + int maximumLengthOfBytesUsingEncoding_(int enc) { + return _objc_msgSend_118( + this.pointer, _sel_maximumLengthOfBytesUsingEncoding_, enc); + } + + int lengthOfBytesUsingEncoding_(int enc) { + return _objc_msgSend_118( + this.pointer, _sel_lengthOfBytesUsingEncoding_, enc); + } + + static ffi.Pointer getAvailableStringEncodings() { + return _objc_msgSend_243(_class_NSString, _sel_availableStringEncodings); + } + + static NSString localizedNameOfStringEncoding_(int encoding) { + final _ret = _objc_msgSend_15( + _class_NSString, _sel_localizedNameOfStringEncoding_, encoding); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static int getDefaultCStringEncoding() { + return _objc_msgSend_12(_class_NSString, _sel_defaultCStringEncoding); + } + + NSString get decomposedStringWithCanonicalMapping { + final _ret = _objc_msgSend_32( + this.pointer, _sel_decomposedStringWithCanonicalMapping); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get precomposedStringWithCanonicalMapping { + final _ret = _objc_msgSend_32( + this.pointer, _sel_precomposedStringWithCanonicalMapping); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get decomposedStringWithCompatibilityMapping { + final _ret = _objc_msgSend_32( + this.pointer, _sel_decomposedStringWithCompatibilityMapping); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get precomposedStringWithCompatibilityMapping { + final _ret = _objc_msgSend_32( + this.pointer, _sel_precomposedStringWithCompatibilityMapping); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSArray componentsSeparatedByString_(NSString separator) { + final _ret = _objc_msgSend_244( + this.pointer, _sel_componentsSeparatedByString_, separator.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray componentsSeparatedByCharactersInSet_(NSCharacterSet separator) { + final _ret = _objc_msgSend_245(this.pointer, + _sel_componentsSeparatedByCharactersInSet_, separator.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSString stringByTrimmingCharactersInSet_(NSCharacterSet set) { + final _ret = _objc_msgSend_246( + this.pointer, _sel_stringByTrimmingCharactersInSet_, set.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString stringByPaddingToLength_withString_startingAtIndex_( + int newLength, NSString padString, int padIndex) { + final _ret = _objc_msgSend_247( + this.pointer, + _sel_stringByPaddingToLength_withString_startingAtIndex_, + newLength, + padString.pointer, + padIndex); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString stringByFoldingWithOptions_locale_(int options, NSLocale? locale) { + final _ret = _objc_msgSend_248( + this.pointer, + _sel_stringByFoldingWithOptions_locale_, + options, + locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString stringByReplacingOccurrencesOfString_withString_options_range_( + NSString target, + NSString replacement, + int options, + _NSRange searchRange) { + final _ret = _objc_msgSend_249( + this.pointer, + _sel_stringByReplacingOccurrencesOfString_withString_options_range_, + target.pointer, + replacement.pointer, + options, + searchRange); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString stringByReplacingOccurrencesOfString_withString_( + NSString target, NSString replacement) { + final _ret = _objc_msgSend_250( + this.pointer, + _sel_stringByReplacingOccurrencesOfString_withString_, + target.pointer, + replacement.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString stringByReplacingCharactersInRange_withString_( + _NSRange range, NSString replacement) { + final _ret = _objc_msgSend_251( + this.pointer, + _sel_stringByReplacingCharactersInRange_withString_, + range, + replacement.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? stringByApplyingTransform_reverse_( + NSString transform, bool reverse) { + final _ret = _objc_msgSend_252(this.pointer, + _sel_stringByApplyingTransform_reverse_, transform.pointer, reverse); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool writeToURL_atomically_encoding_error_(NSURL url, bool useAuxiliaryFile, + int enc, ffi.Pointer> error) { + return _objc_msgSend_253( + this.pointer, + _sel_writeToURL_atomically_encoding_error_, + url.pointer, + useAuxiliaryFile, + enc, + error); + } + + bool writeToFile_atomically_encoding_error_( + NSString path, + bool useAuxiliaryFile, + int enc, + ffi.Pointer> error) { + return _objc_msgSend_254( + this.pointer, + _sel_writeToFile_atomically_encoding_error_, + path.pointer, + useAuxiliaryFile, + enc, + error); + } + + NSString get description { + final _ret = _objc_msgSend_32(this.pointer, _sel_description); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + int get hash { + return _objc_msgSend_12(this.pointer, _sel_hash); + } + + NSString initWithCharactersNoCopy_length_freeWhenDone_( + ffi.Pointer characters, int length, bool freeBuffer) { + final _ret = _objc_msgSend_255( + this.pointer, + _sel_initWithCharactersNoCopy_length_freeWhenDone_, + characters, + length, + freeBuffer); + return NSString.castFromPointer(_ret, retain: false, release: true); + } + + NSString initWithCharactersNoCopy_length_deallocator_( + ffi.Pointer chars, + int len, + ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong? deallocator) { + final _ret = _objc_msgSend_256( + this.pointer, + _sel_initWithCharactersNoCopy_length_deallocator_, + chars, + len, + deallocator?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: false, release: true); + } + + NSString initWithCharacters_length_( + ffi.Pointer characters, int length) { + final _ret = _objc_msgSend_257( + this.pointer, _sel_initWithCharacters_length_, characters, length); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithUTF8String_(ffi.Pointer nullTerminatedCString) { + final _ret = _objc_msgSend_258( + this.pointer, _sel_initWithUTF8String_, nullTerminatedCString); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString initWithString_(NSString aString) { + final _ret = + _objc_msgSend_42(this.pointer, _sel_initWithString_, aString.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString initWithFormat_(NSString format) { + final _ret = + _objc_msgSend_42(this.pointer, _sel_initWithFormat_, format.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString initWithFormat_arguments_( + NSString format, ffi.Pointer<__va_list_tag> argList) { + final _ret = _objc_msgSend_259( + this.pointer, _sel_initWithFormat_arguments_, format.pointer, argList); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString initWithFormat_locale_(NSString format, NSObject? locale) { + final _ret = _objc_msgSend_260(this.pointer, _sel_initWithFormat_locale_, + format.pointer, locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString initWithFormat_locale_arguments_( + NSString format, NSObject? locale, ffi.Pointer<__va_list_tag> argList) { + final _ret = _objc_msgSend_261( + this.pointer, + _sel_initWithFormat_locale_arguments_, + format.pointer, + locale?.pointer ?? ffi.nullptr, + argList); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _objc_msgSend_262( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_error_, + format.pointer, + validFormatSpecifiers.pointer, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + ffi.Pointer> error) { + final _ret = _objc_msgSend_263( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_, + format.pointer, + validFormatSpecifiers.pointer, + locale?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithValidatedFormat_validFormatSpecifiers_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer<__va_list_tag> argList, + ffi.Pointer> error) { + final _ret = _objc_msgSend_264( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_, + format.pointer, + validFormatSpecifiers.pointer, + argList, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? + initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + ffi.Pointer<__va_list_tag> argList, + ffi.Pointer> error) { + final _ret = _objc_msgSend_265( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_, + format.pointer, + validFormatSpecifiers.pointer, + locale?.pointer ?? ffi.nullptr, + argList, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithData_encoding_(NSData data, int encoding) { + final _ret = _objc_msgSend_266( + this.pointer, _sel_initWithData_encoding_, data.pointer, encoding); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithBytes_length_encoding_( + ffi.Pointer bytes, int len, int encoding) { + final _ret = _objc_msgSend_267(this.pointer, + _sel_initWithBytes_length_encoding_, bytes, len, encoding); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithBytesNoCopy_length_encoding_freeWhenDone_( + ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { + final _ret = _objc_msgSend_268( + this.pointer, + _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_, + bytes, + len, + encoding, + freeBuffer); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: false, release: true); + } + + NSString? initWithBytesNoCopy_length_encoding_deallocator_( + ffi.Pointer bytes, + int len, + int encoding, + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { + final _ret = _objc_msgSend_269( + this.pointer, + _sel_initWithBytesNoCopy_length_encoding_deallocator_, + bytes, + len, + encoding, + deallocator?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: false, release: true); + } + + static NSString string() { + final _ret = _objc_msgSend_2(_class_NSString, _sel_string); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString stringWithString_(NSString string) { + final _ret = _objc_msgSend_42( + _class_NSString, _sel_stringWithString_, string.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString stringWithCharacters_length_( + ffi.Pointer characters, int length) { + final _ret = _objc_msgSend_257( + _class_NSString, _sel_stringWithCharacters_length_, characters, length); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? stringWithUTF8String_( + ffi.Pointer nullTerminatedCString) { + final _ret = _objc_msgSend_258( + _class_NSString, _sel_stringWithUTF8String_, nullTerminatedCString); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString stringWithFormat_(NSString format) { + final _ret = _objc_msgSend_42( + _class_NSString, _sel_stringWithFormat_, format.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString localizedStringWithFormat_(NSString format) { + final _ret = _objc_msgSend_42( + _class_NSString, _sel_localizedStringWithFormat_, format.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? stringWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _objc_msgSend_262( + _class_NSString, + _sel_stringWithValidatedFormat_validFormatSpecifiers_error_, + format.pointer, + validFormatSpecifiers.pointer, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? + localizedStringWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _objc_msgSend_262( + _class_NSString, + _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_, + format.pointer, + validFormatSpecifiers.pointer, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithCString_encoding_( + ffi.Pointer nullTerminatedCString, int encoding) { + final _ret = _objc_msgSend_270(this.pointer, _sel_initWithCString_encoding_, + nullTerminatedCString, encoding); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? stringWithCString_encoding_( + ffi.Pointer cString, int enc) { + final _ret = _objc_msgSend_270( + _class_NSString, _sel_stringWithCString_encoding_, cString, enc); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithContentsOfURL_encoding_error_( + NSURL url, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_271(this.pointer, + _sel_initWithContentsOfURL_encoding_error_, url.pointer, enc, error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithContentsOfFile_encoding_error_( + NSString path, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_272(this.pointer, + _sel_initWithContentsOfFile_encoding_error_, path.pointer, enc, error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? stringWithContentsOfURL_encoding_error_( + NSURL url, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_271(_class_NSString, + _sel_stringWithContentsOfURL_encoding_error_, url.pointer, enc, error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? stringWithContentsOfFile_encoding_error_( + NSString path, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_272( + _class_NSString, + _sel_stringWithContentsOfFile_encoding_error_, + path.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithContentsOfURL_usedEncoding_error_( + NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_273( + this.pointer, + _sel_initWithContentsOfURL_usedEncoding_error_, + url.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? initWithContentsOfFile_usedEncoding_error_( + NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_274( + this.pointer, + _sel_initWithContentsOfFile_usedEncoding_error_, + path.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? stringWithContentsOfURL_usedEncoding_error_( + NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_273( + _class_NSString, + _sel_stringWithContentsOfURL_usedEncoding_error_, + url.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString? stringWithContentsOfFile_usedEncoding_error_( + NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_274( + _class_NSString, + _sel_stringWithContentsOfFile_usedEncoding_error_, + path.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NSData data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _objc_msgSend_275( + _class_NSString, + _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_, + data.pointer, + opts?.pointer ?? ffi.nullptr, + string, + usedLossyConversion); + } + + NSObject propertyList() { + final _ret = _objc_msgSend_2(this.pointer, _sel_propertyList); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary? propertyListFromStringsFileFormat() { + final _ret = + _objc_msgSend_276(this.pointer, _sel_propertyListFromStringsFileFormat); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + ffi.Pointer cString() { + return _objc_msgSend_57(this.pointer, _sel_cString); + } + + ffi.Pointer lossyCString() { + return _objc_msgSend_57(this.pointer, _sel_lossyCString); + } + + int cStringLength() { + return _objc_msgSend_12(this.pointer, _sel_cStringLength); + } + + void getCString_(ffi.Pointer bytes) { + _objc_msgSend_277(this.pointer, _sel_getCString_, bytes); + } + + void getCString_maxLength_(ffi.Pointer bytes, int maxLength) { + _objc_msgSend_278( + this.pointer, _sel_getCString_maxLength_, bytes, maxLength); + } + + void getCString_maxLength_range_remainingRange_(ffi.Pointer bytes, + int maxLength, _NSRange aRange, ffi.Pointer<_NSRange> leftoverRange) { + _objc_msgSend_279( + this.pointer, + _sel_getCString_maxLength_range_remainingRange_, + bytes, + maxLength, + aRange, + leftoverRange); + } + + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _objc_msgSend_37(this.pointer, _sel_writeToFile_atomically_, + path.pointer, useAuxiliaryFile); + } + + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _objc_msgSend_158( + this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); + } + + NSObject? initWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_49( + this.pointer, _sel_initWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? initWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_214( + this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? stringWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_49( + _class_NSString, _sel_stringWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? stringWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_214( + _class_NSString, _sel_stringWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? initWithCStringNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool freeBuffer) { + final _ret = _objc_msgSend_280( + this.pointer, + _sel_initWithCStringNoCopy_length_freeWhenDone_, + bytes, + length, + freeBuffer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: false, release: true); + } + + NSObject? initWithCString_length_(ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_270( + this.pointer, _sel_initWithCString_length_, bytes, length); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? initWithCString_(ffi.Pointer bytes) { + final _ret = _objc_msgSend_258(this.pointer, _sel_initWithCString_, bytes); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? stringWithCString_length_( + ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_270( + _class_NSString, _sel_stringWithCString_length_, bytes, length); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? stringWithCString_(ffi.Pointer bytes) { + final _ret = + _objc_msgSend_258(_class_NSString, _sel_stringWithCString_, bytes); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void getCharacters_(ffi.Pointer buffer) { + _objc_msgSend_281(this.pointer, _sel_getCharacters_, buffer); + } + + NSString? stringByAddingPercentEncodingWithAllowedCharacters_( + NSCharacterSet allowedCharacters) { + final _ret = _objc_msgSend_282( + this.pointer, + _sel_stringByAddingPercentEncodingWithAllowedCharacters_, + allowedCharacters.pointer); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get stringByRemovingPercentEncoding { + final _ret = + _objc_msgSend_55(this.pointer, _sel_stringByRemovingPercentEncoding); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? stringByAddingPercentEscapesUsingEncoding_(int enc) { + final _ret = _objc_msgSend_283( + this.pointer, _sel_stringByAddingPercentEscapesUsingEncoding_, enc); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? stringByReplacingPercentEscapesUsingEncoding_(int enc) { + final _ret = _objc_msgSend_283( + this.pointer, _sel_stringByReplacingPercentEscapesUsingEncoding_, enc); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSString new1() { + final _ret = _objc_msgSend_2(_class_NSString, _sel_new); + return NSString.castFromPointer(_ret, retain: false, release: true); + } + + static NSString allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSString, _sel_allocWithZone_, zone); + return NSString.castFromPointer(_ret, retain: false, release: true); + } + + static NSString alloc() { + final _ret = _objc_msgSend_2(_class_NSString, _sel_alloc); + return NSString.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSString = objc.getClass("NSString"); +late final _sel_length = objc.registerName("length"); +late final _sel_characterAtIndex_ = objc.registerName("characterAtIndex:"); +final _objc_msgSend_13 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedShort Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, int)>(); + +class NSCoder extends objc.ObjCObjectBase { + NSCoder._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSCoder] that points to the same underlying object as [other]. + NSCoder.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSCoder] that wraps the given raw object pointer. + NSCoder.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSCoder]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSCoder); + } +} + +late final _class_NSCoder = objc.getClass("NSCoder"); +late final _sel_initWithCoder_ = objc.registerName("initWithCoder:"); +final _objc_msgSend_14 = 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_substringFromIndex_ = objc.registerName("substringFromIndex:"); +final _objc_msgSend_15 = 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_substringToIndex_ = objc.registerName("substringToIndex:"); + +final class _NSRange extends ffi.Struct { @ffi.UnsignedLong() - external int reserved; + external int location; @ffi.UnsignedLong() - external int size; + external int length; +} - external ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer dst, ffi.Pointer src)>> - copy_helper; +late final _sel_substringWithRange_ = objc.registerName("substringWithRange:"); +final _objc_msgSend_16 = 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_getCharacters_range_ = + objc.registerName("getCharacters:range:"); +final _objc_msgSend_17 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); - external ffi - .Pointer src)>> - dispose_helper; +abstract class NSComparisonResult { + static const int NSOrderedAscending = -1; + static const int NSOrderedSame = 0; + static const int NSOrderedDescending = 1; +} + +late final _sel_compare_ = objc.registerName("compare:"); +final _objc_msgSend_18 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSStringCompareOptions { + static const int NSCaseInsensitiveSearch = 1; + static const int NSLiteralSearch = 2; + static const int NSBackwardsSearch = 4; + static const int NSAnchoredSearch = 8; + static const int NSNumericSearch = 64; + static const int NSDiacriticInsensitiveSearch = 128; + static const int NSWidthInsensitiveSearch = 256; + static const int NSForcedOrderingSearch = 512; + static const int NSRegularExpressionSearch = 1024; +} + +late final _sel_compare_options_ = objc.registerName("compare:options:"); +final _objc_msgSend_19 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_compare_options_range_ = + objc.registerName("compare:options:range:"); +final _objc_msgSend_20 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_compare_options_range_locale_ = + objc.registerName("compare:options:range:locale:"); +final _objc_msgSend_21 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); +late final _sel_caseInsensitiveCompare_ = + objc.registerName("caseInsensitiveCompare:"); +late final _sel_localizedCompare_ = objc.registerName("localizedCompare:"); +late final _sel_localizedCaseInsensitiveCompare_ = + objc.registerName("localizedCaseInsensitiveCompare:"); +late final _sel_localizedStandardCompare_ = + objc.registerName("localizedStandardCompare:"); +late final _sel_isEqualToString_ = objc.registerName("isEqualToString:"); +final _objc_msgSend_22 = 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_hasPrefix_ = objc.registerName("hasPrefix:"); +late final _sel_hasSuffix_ = objc.registerName("hasSuffix:"); +late final _sel_commonPrefixWithString_options_ = + objc.registerName("commonPrefixWithString:options:"); +final _objc_msgSend_23 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_containsString_ = objc.registerName("containsString:"); +late final _sel_localizedCaseInsensitiveContainsString_ = + objc.registerName("localizedCaseInsensitiveContainsString:"); +late final _sel_localizedStandardContainsString_ = + objc.registerName("localizedStandardContainsString:"); +late final _sel_localizedStandardRangeOfString_ = + objc.registerName("localizedStandardRangeOfString:"); +final _objc_msgSend_24 = 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_24Stret = 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_rangeOfString_ = objc.registerName("rangeOfString:"); +late final _sel_rangeOfString_options_ = + objc.registerName("rangeOfString:options:"); +final _objc_msgSend_25 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +final _objc_msgSend_25Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_rangeOfString_options_range_ = + objc.registerName("rangeOfString:options:range:"); +final _objc_msgSend_26 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +final _objc_msgSend_26Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); + +class NSLocale extends objc.ObjCObjectBase { + NSLocale._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSLocale] that points to the same underlying object as [other]. + NSLocale.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSLocale] that wraps the given raw object pointer. + NSLocale.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); - external ffi.Pointer signature; + /// Returns whether [obj] is an instance of [NSLocale]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSLocale); + } } -final class _ObjCBlock extends ffi.Struct { - external ffi.Pointer isa; +late final _class_NSLocale = objc.getClass("NSLocale"); +late final _sel_rangeOfString_options_range_locale_ = + objc.registerName("rangeOfString:options:range:locale:"); +final _objc_msgSend_27 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); +final _objc_msgSend_27Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer)>(); + +class NSCharacterSet extends NSObject { + NSCharacterSet._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSCharacterSet] that points to the same underlying object as [other]. + NSCharacterSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSCharacterSet] that wraps the given raw object pointer. + NSCharacterSet.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSCharacterSet]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSCharacterSet); + } + + static NSCharacterSet getControlCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_controlCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getWhitespaceCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_whitespaceCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getWhitespaceAndNewlineCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_whitespaceAndNewlineCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getDecimalDigitCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_decimalDigitCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getLetterCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_letterCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getLowercaseLetterCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_lowercaseLetterCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getUppercaseLetterCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_uppercaseLetterCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getNonBaseCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_nonBaseCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getAlphanumericCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_alphanumericCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getDecomposableCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_decomposableCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getIllegalCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_illegalCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getPunctuationCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_punctuationCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getCapitalizedLetterCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_capitalizedLetterCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getSymbolCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_symbolCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getNewlineCharacterSet() { + final _ret = + _objc_msgSend_28(_class_NSCharacterSet, _sel_newlineCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSCharacterSet characterSetWithRange_(_NSRange aRange) { + final _ret = _objc_msgSend_29( + _class_NSCharacterSet, _sel_characterSetWithRange_, aRange); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet characterSetWithCharactersInString_(NSString aString) { + final _ret = _objc_msgSend_30(_class_NSCharacterSet, + _sel_characterSetWithCharactersInString_, aString.pointer); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet characterSetWithBitmapRepresentation_(NSData data) { + final _ret = _objc_msgSend_222(_class_NSCharacterSet, + _sel_characterSetWithBitmapRepresentation_, data.pointer); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet? characterSetWithContentsOfFile_(NSString fName) { + final _ret = _objc_msgSend_223(_class_NSCharacterSet, + _sel_characterSetWithContentsOfFile_, fName.pointer); + return _ret.address == 0 + ? null + : NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + NSCharacterSet initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_224(this.pointer, _sel_initWithCoder_, coder.pointer); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + bool characterIsMember_(int aCharacter) { + return _objc_msgSend_225(this.pointer, _sel_characterIsMember_, aCharacter); + } + + NSData get bitmapRepresentation { + final _ret = _objc_msgSend_54(this.pointer, _sel_bitmapRepresentation); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSCharacterSet get invertedSet { + final _ret = _objc_msgSend_28(this.pointer, _sel_invertedSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + bool longCharacterIsMember_(int theLongChar) { + return _objc_msgSend_226( + this.pointer, _sel_longCharacterIsMember_, theLongChar); + } + + bool isSupersetOfSet_(NSCharacterSet theOtherSet) { + return _objc_msgSend_227( + this.pointer, _sel_isSupersetOfSet_, theOtherSet.pointer); + } + + bool hasMemberInPlane_(int thePlane) { + return _objc_msgSend_228(this.pointer, _sel_hasMemberInPlane_, thePlane); + } + + static NSCharacterSet getURLUserAllowedCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_URLUserAllowedCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getURLPasswordAllowedCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_URLPasswordAllowedCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getURLHostAllowedCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_URLHostAllowedCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getURLPathAllowedCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_URLPathAllowedCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getURLQueryAllowedCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_URLQueryAllowedCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet getURLFragmentAllowedCharacterSet() { + final _ret = _objc_msgSend_28( + _class_NSCharacterSet, _sel_URLFragmentAllowedCharacterSet); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSCharacterSet init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSCharacterSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSCharacterSet new1() { + final _ret = _objc_msgSend_2(_class_NSCharacterSet, _sel_new); + return NSCharacterSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSCharacterSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSCharacterSet, _sel_allocWithZone_, zone); + return NSCharacterSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSCharacterSet alloc() { + final _ret = _objc_msgSend_2(_class_NSCharacterSet, _sel_alloc); + return NSCharacterSet.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSCharacterSet = objc.getClass("NSCharacterSet"); +late final _sel_controlCharacterSet = objc.registerName("controlCharacterSet"); +final _objc_msgSend_28 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_whitespaceCharacterSet = + objc.registerName("whitespaceCharacterSet"); +late final _sel_whitespaceAndNewlineCharacterSet = + objc.registerName("whitespaceAndNewlineCharacterSet"); +late final _sel_decimalDigitCharacterSet = + objc.registerName("decimalDigitCharacterSet"); +late final _sel_letterCharacterSet = objc.registerName("letterCharacterSet"); +late final _sel_lowercaseLetterCharacterSet = + objc.registerName("lowercaseLetterCharacterSet"); +late final _sel_uppercaseLetterCharacterSet = + objc.registerName("uppercaseLetterCharacterSet"); +late final _sel_nonBaseCharacterSet = objc.registerName("nonBaseCharacterSet"); +late final _sel_alphanumericCharacterSet = + objc.registerName("alphanumericCharacterSet"); +late final _sel_decomposableCharacterSet = + objc.registerName("decomposableCharacterSet"); +late final _sel_illegalCharacterSet = objc.registerName("illegalCharacterSet"); +late final _sel_punctuationCharacterSet = + objc.registerName("punctuationCharacterSet"); +late final _sel_capitalizedLetterCharacterSet = + objc.registerName("capitalizedLetterCharacterSet"); +late final _sel_symbolCharacterSet = objc.registerName("symbolCharacterSet"); +late final _sel_newlineCharacterSet = objc.registerName("newlineCharacterSet"); +late final _sel_characterSetWithRange_ = + objc.registerName("characterSetWithRange:"); +final _objc_msgSend_29 = 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_characterSetWithCharactersInString_ = + objc.registerName("characterSetWithCharactersInString:"); +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)>(); + +class NSData extends NSObject { + NSData._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSData] that points to the same underlying object as [other]. + NSData.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSData] that wraps the given raw object pointer. + NSData.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSData]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSData); + } + + int get length { + return _objc_msgSend_12(this.pointer, _sel_length); + } + + ffi.Pointer get bytes { + return _objc_msgSend_31(this.pointer, _sel_bytes); + } + + NSString get description { + final _ret = _objc_msgSend_32(this.pointer, _sel_description); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + void getBytes_length_(ffi.Pointer buffer, int length) { + _objc_msgSend_33(this.pointer, _sel_getBytes_length_, buffer, length); + } + + void getBytes_range_(ffi.Pointer buffer, _NSRange range) { + _objc_msgSend_34(this.pointer, _sel_getBytes_range_, buffer, range); + } + + bool isEqualToData_(NSData other) { + return _objc_msgSend_35(this.pointer, _sel_isEqualToData_, other.pointer); + } + + NSData subdataWithRange_(_NSRange range) { + final _ret = _objc_msgSend_36(this.pointer, _sel_subdataWithRange_, range); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _objc_msgSend_37(this.pointer, _sel_writeToFile_atomically_, + path.pointer, useAuxiliaryFile); + } + + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _objc_msgSend_158( + this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); + } + + bool writeToFile_options_error_(NSString path, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _objc_msgSend_206(this.pointer, _sel_writeToFile_options_error_, + path.pointer, writeOptionsMask, errorPtr); + } + + bool writeToURL_options_error_(NSURL url, int writeOptionsMask, + ffi.Pointer> errorPtr) { + return _objc_msgSend_207(this.pointer, _sel_writeToURL_options_error_, + url.pointer, writeOptionsMask, errorPtr); + } + + void rangeOfData_options_range_(ffi.Pointer<_NSRange> stret, + NSData dataToFind, int mask, _NSRange searchRange) { + objc.useMsgSendVariants + ? _objc_msgSend_208Stret( + stret, + this.pointer, + _sel_rangeOfData_options_range_, + dataToFind.pointer, + mask, + searchRange) + : stret.ref = _objc_msgSend_208( + this.pointer, + _sel_rangeOfData_options_range_, + dataToFind.pointer, + mask, + searchRange); + } + + void enumerateByteRangesUsingBlock_( + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool block) { + _objc_msgSend_209( + this.pointer, _sel_enumerateByteRangesUsingBlock_, block.pointer); + } + + static NSData data() { + final _ret = _objc_msgSend_2(_class_NSData, _sel_data); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSData dataWithBytes_length_(ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + _class_NSData, _sel_dataWithBytes_length_, bytes, length); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSData dataWithBytesNoCopy_length_( + ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + _class_NSData, _sel_dataWithBytesNoCopy_length_, bytes, length); + return NSData.castFromPointer(_ret, retain: false, release: true); + } + + static NSData dataWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool b) { + final _ret = _objc_msgSend_211(_class_NSData, + _sel_dataWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); + return NSData.castFromPointer(_ret, retain: false, release: true); + } + + static NSData? dataWithContentsOfFile_options_error_(NSString path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_212( + _class_NSData, + _sel_dataWithContentsOfFile_options_error_, + path.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSData? dataWithContentsOfURL_options_error_(NSURL url, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_213( + _class_NSData, + _sel_dataWithContentsOfURL_options_error_, + url.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSData? dataWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_49( + _class_NSData, _sel_dataWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSData? dataWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_214( + _class_NSData, _sel_dataWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData initWithBytes_length_(ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + this.pointer, _sel_initWithBytes_length_, bytes, length); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData initWithBytesNoCopy_length_(ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + this.pointer, _sel_initWithBytesNoCopy_length_, bytes, length); + return NSData.castFromPointer(_ret, retain: false, release: true); + } + + NSData initWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool b) { + final _ret = _objc_msgSend_211(this.pointer, + _sel_initWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); + return NSData.castFromPointer(_ret, retain: false, release: true); + } + + NSData initWithBytesNoCopy_length_deallocator_(ffi.Pointer bytes, + int length, ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { + final _ret = _objc_msgSend_215( + this.pointer, + _sel_initWithBytesNoCopy_length_deallocator_, + bytes, + length, + deallocator?.pointer ?? ffi.nullptr); + return NSData.castFromPointer(_ret, retain: false, release: true); + } + + NSData? initWithContentsOfFile_options_error_(NSString path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_212( + this.pointer, + _sel_initWithContentsOfFile_options_error_, + path.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData? initWithContentsOfURL_options_error_(NSURL url, int readOptionsMask, + ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_213( + this.pointer, + _sel_initWithContentsOfURL_options_error_, + url.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData? initWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_49( + this.pointer, _sel_initWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData? initWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_214( + this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData initWithData_(NSData data) { + final _ret = + _objc_msgSend_216(this.pointer, _sel_initWithData_, data.pointer); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSData dataWithData_(NSData data) { + final _ret = + _objc_msgSend_216(_class_NSData, _sel_dataWithData_, data.pointer); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData? initWithBase64EncodedString_options_( + NSString base64String, int options) { + final _ret = _objc_msgSend_217( + this.pointer, + _sel_initWithBase64EncodedString_options_, + base64String.pointer, + options); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSString base64EncodedStringWithOptions_(int options) { + final _ret = _objc_msgSend_218( + this.pointer, _sel_base64EncodedStringWithOptions_, options); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSData? initWithBase64EncodedData_options_(NSData base64Data, int options) { + final _ret = _objc_msgSend_219(this.pointer, + _sel_initWithBase64EncodedData_options_, base64Data.pointer, options); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData base64EncodedDataWithOptions_(int options) { + final _ret = _objc_msgSend_220( + this.pointer, _sel_base64EncodedDataWithOptions_, options); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData? decompressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _objc_msgSend_221(this.pointer, + _sel_decompressedDataUsingAlgorithm_error_, algorithm, error); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData? compressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _objc_msgSend_221(this.pointer, + _sel_compressedDataUsingAlgorithm_error_, algorithm, error); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + void getBytes_(ffi.Pointer buffer) { + _objc_msgSend_64(this.pointer, _sel_getBytes_, buffer); + } + + static NSObject? dataWithContentsOfMappedFile_(NSString path) { + final _ret = _objc_msgSend_49( + _class_NSData, _sel_dataWithContentsOfMappedFile_, path.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? initWithContentsOfMappedFile_(NSString path) { + final _ret = _objc_msgSend_49( + this.pointer, _sel_initWithContentsOfMappedFile_, path.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? initWithBase64Encoding_(NSString base64String) { + final _ret = _objc_msgSend_49( + this.pointer, _sel_initWithBase64Encoding_, base64String.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSString base64Encoding() { + final _ret = _objc_msgSend_32(this.pointer, _sel_base64Encoding); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSData init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSData new1() { + final _ret = _objc_msgSend_2(_class_NSData, _sel_new); + return NSData.castFromPointer(_ret, retain: false, release: true); + } + + static NSData allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSData, _sel_allocWithZone_, zone); + return NSData.castFromPointer(_ret, retain: false, release: true); + } + + static NSData alloc() { + final _ret = _objc_msgSend_2(_class_NSData, _sel_alloc); + return NSData.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSData = objc.getClass("NSData"); +late final _sel_bytes = objc.registerName("bytes"); +final _objc_msgSend_31 = 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"); +final _objc_msgSend_32 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_getBytes_length_ = objc.registerName("getBytes:length:"); +final _objc_msgSend_33 = 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_getBytes_range_ = objc.registerName("getBytes:range:"); +final _objc_msgSend_34 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, _NSRange)>(); +late final _sel_isEqualToData_ = objc.registerName("isEqualToData:"); +final _objc_msgSend_35 = 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_subdataWithRange_ = objc.registerName("subdataWithRange:"); +final _objc_msgSend_36 = 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_writeToFile_atomically_ = + objc.registerName("writeToFile:atomically:"); +final _objc_msgSend_37 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); + +class NSURL extends NSObject { + NSURL._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURL] that points to the same underlying object as [other]. + NSURL.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURL] that wraps the given raw object pointer. + NSURL.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURL]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSURL); + } + + NSURL? initWithScheme_host_path_( + NSString scheme, NSString? host, NSString path) { + final _ret = _objc_msgSend_38(this.pointer, _sel_initWithScheme_host_path_, + scheme.pointer, host?.pointer ?? ffi.nullptr, path.pointer); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL initFileURLWithPath_isDirectory_relativeToURL_( + NSString path, bool isDir, NSURL? baseURL) { + final _ret = _objc_msgSend_39( + this.pointer, + _sel_initFileURLWithPath_isDirectory_relativeToURL_, + path.pointer, + isDir, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL initFileURLWithPath_relativeToURL_(NSString path, NSURL? baseURL) { + final _ret = _objc_msgSend_40( + this.pointer, + _sel_initFileURLWithPath_relativeToURL_, + path.pointer, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL initFileURLWithPath_isDirectory_(NSString path, bool isDir) { + final _ret = _objc_msgSend_41(this.pointer, + _sel_initFileURLWithPath_isDirectory_, path.pointer, isDir); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL initFileURLWithPath_(NSString path) { + final _ret = + _objc_msgSend_42(this.pointer, _sel_initFileURLWithPath_, path.pointer); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL fileURLWithPath_isDirectory_relativeToURL_( + NSString path, bool isDir, NSURL? baseURL) { + final _ret = _objc_msgSend_43( + _class_NSURL, + _sel_fileURLWithPath_isDirectory_relativeToURL_, + path.pointer, + isDir, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL fileURLWithPath_relativeToURL_(NSString path, NSURL? baseURL) { + final _ret = _objc_msgSend_44( + _class_NSURL, + _sel_fileURLWithPath_relativeToURL_, + path.pointer, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL fileURLWithPath_isDirectory_(NSString path, bool isDir) { + final _ret = _objc_msgSend_45( + _class_NSURL, _sel_fileURLWithPath_isDirectory_, path.pointer, isDir); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL fileURLWithPath_(NSString path) { + final _ret = + _objc_msgSend_46(_class_NSURL, _sel_fileURLWithPath_, path.pointer); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + ffi.Pointer path, bool isDir, NSURL? baseURL) { + final _ret = _objc_msgSend_47( + this.pointer, + _sel_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_, + path, + isDir, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_( + ffi.Pointer path, bool isDir, NSURL? baseURL) { + final _ret = _objc_msgSend_48( + _class_NSURL, + _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_, + path, + isDir, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? initWithString_(NSString URLString) { + final _ret = + _objc_msgSend_49(this.pointer, _sel_initWithString_, URLString.pointer); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? initWithString_relativeToURL_(NSString URLString, NSURL? baseURL) { + final _ret = _objc_msgSend_50( + this.pointer, + _sel_initWithString_relativeToURL_, + URLString.pointer, + baseURL?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL? URLWithString_(NSString URLString) { + final _ret = + _objc_msgSend_49(_class_NSURL, _sel_URLWithString_, URLString.pointer); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL? URLWithString_relativeToURL_( + NSString URLString, NSURL? baseURL) { + final _ret = _objc_msgSend_50( + _class_NSURL, + _sel_URLWithString_relativeToURL_, + URLString.pointer, + baseURL?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? initWithString_encodingInvalidCharacters_( + NSString URLString, bool encodingInvalidCharacters) { + final _ret = _objc_msgSend_51( + this.pointer, + _sel_initWithString_encodingInvalidCharacters_, + URLString.pointer, + encodingInvalidCharacters); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL? URLWithString_encodingInvalidCharacters_( + NSString URLString, bool encodingInvalidCharacters) { + final _ret = _objc_msgSend_51( + _class_NSURL, + _sel_URLWithString_encodingInvalidCharacters_, + URLString.pointer, + encodingInvalidCharacters); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL initWithDataRepresentation_relativeToURL_(NSData data, NSURL? baseURL) { + final _ret = _objc_msgSend_52( + this.pointer, + _sel_initWithDataRepresentation_relativeToURL_, + data.pointer, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL URLWithDataRepresentation_relativeToURL_( + NSData data, NSURL? baseURL) { + final _ret = _objc_msgSend_53( + _class_NSURL, + _sel_URLWithDataRepresentation_relativeToURL_, + data.pointer, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL initAbsoluteURLWithDataRepresentation_relativeToURL_( + NSData data, NSURL? baseURL) { + final _ret = _objc_msgSend_52( + this.pointer, + _sel_initAbsoluteURLWithDataRepresentation_relativeToURL_, + data.pointer, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL absoluteURLWithDataRepresentation_relativeToURL_( + NSData data, NSURL? baseURL) { + final _ret = _objc_msgSend_53( + _class_NSURL, + _sel_absoluteURLWithDataRepresentation_relativeToURL_, + data.pointer, + baseURL?.pointer ?? ffi.nullptr); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSData get dataRepresentation { + final _ret = _objc_msgSend_54(this.pointer, _sel_dataRepresentation); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get absoluteString { + final _ret = _objc_msgSend_55(this.pointer, _sel_absoluteString); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get relativeString { + final _ret = _objc_msgSend_32(this.pointer, _sel_relativeString); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? get baseURL { + final _ret = _objc_msgSend_56(this.pointer, _sel_baseURL); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? get absoluteURL { + final _ret = _objc_msgSend_56(this.pointer, _sel_absoluteURL); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get scheme { + final _ret = _objc_msgSend_55(this.pointer, _sel_scheme); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get resourceSpecifier { + final _ret = _objc_msgSend_55(this.pointer, _sel_resourceSpecifier); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get host { + final _ret = _objc_msgSend_55(this.pointer, _sel_host); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber? get port { + final _ret = _objc_msgSend_94(this.pointer, _sel_port); + return _ret.address == 0 + ? null + : NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get user { + final _ret = _objc_msgSend_55(this.pointer, _sel_user); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get password { + final _ret = _objc_msgSend_55(this.pointer, _sel_password); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get path { + final _ret = _objc_msgSend_55(this.pointer, _sel_path); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get fragment { + final _ret = _objc_msgSend_55(this.pointer, _sel_fragment); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get parameterString { + final _ret = _objc_msgSend_55(this.pointer, _sel_parameterString); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get query { + final _ret = _objc_msgSend_55(this.pointer, _sel_query); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get relativePath { + final _ret = _objc_msgSend_55(this.pointer, _sel_relativePath); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool get hasDirectoryPath { + return _objc_msgSend_11(this.pointer, _sel_hasDirectoryPath); + } + + bool getFileSystemRepresentation_maxLength_( + ffi.Pointer buffer, int maxBufferLength) { + return _objc_msgSend_95(this.pointer, + _sel_getFileSystemRepresentation_maxLength_, buffer, maxBufferLength); + } + + ffi.Pointer get fileSystemRepresentation { + return _objc_msgSend_57(this.pointer, _sel_fileSystemRepresentation); + } + + bool get fileURL { + return _objc_msgSend_11(this.pointer, _sel_isFileURL); + } + + NSURL? get standardizedURL { + final _ret = _objc_msgSend_56(this.pointer, _sel_standardizedURL); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + bool isFileReferenceURL() { + return _objc_msgSend_11(this.pointer, _sel_isFileReferenceURL); + } + + NSURL? fileReferenceURL() { + final _ret = _objc_msgSend_56(this.pointer, _sel_fileReferenceURL); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? get filePathURL { + final _ret = _objc_msgSend_56(this.pointer, _sel_filePathURL); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + bool getResourceValue_forKey_error_( + ffi.Pointer> value, + NSString key, + ffi.Pointer> error) { + return _objc_msgSend_96(this.pointer, _sel_getResourceValue_forKey_error_, + value, key.pointer, error); + } + + NSObject? resourceValuesForKeys_error_( + NSArray keys, ffi.Pointer> error) { + final _ret = _objc_msgSend_159( + this.pointer, _sel_resourceValuesForKeys_error_, keys.pointer, error); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool setResourceValue_forKey_error_(NSObject? value, NSString key, + ffi.Pointer> error) { + return _objc_msgSend_160(this.pointer, _sel_setResourceValue_forKey_error_, + value?.pointer ?? ffi.nullptr, key.pointer, error); + } + + bool setResourceValues_error_( + NSObject keyedValues, ffi.Pointer> error) { + return _objc_msgSend_161(this.pointer, _sel_setResourceValues_error_, + keyedValues.pointer, error); + } + + void removeCachedResourceValueForKey_(NSString key) { + _objc_msgSend_162( + this.pointer, _sel_removeCachedResourceValueForKey_, key.pointer); + } + + void removeAllCachedResourceValues() { + _objc_msgSend_1(this.pointer, _sel_removeAllCachedResourceValues); + } + + void setTemporaryResourceValue_forKey_(NSObject? value, NSString key) { + _objc_msgSend_163(this.pointer, _sel_setTemporaryResourceValue_forKey_, + value?.pointer ?? ffi.nullptr, key.pointer); + } + + NSData? + bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_( + int options, + NSArray? keys, + NSURL? relativeURL, + ffi.Pointer> error) { + final _ret = _objc_msgSend_164( + this.pointer, + _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_, + options, + keys?.pointer ?? ffi.nullptr, + relativeURL?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? + initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + NSData bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _objc_msgSend_165( + this.pointer, + _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_, + bookmarkData.pointer, + options, + relativeURL?.pointer ?? ffi.nullptr, + isStale, + error); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL? + URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_( + NSData bookmarkData, + int options, + NSURL? relativeURL, + ffi.Pointer isStale, + ffi.Pointer> error) { + final _ret = _objc_msgSend_165( + _class_NSURL, + _sel_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_, + bookmarkData.pointer, + options, + relativeURL?.pointer ?? ffi.nullptr, + isStale, + error); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? resourceValuesForKeys_fromBookmarkData_( + NSArray keys, NSData bookmarkData) { + final _ret = _objc_msgSend_166( + _class_NSURL, + _sel_resourceValuesForKeys_fromBookmarkData_, + keys.pointer, + bookmarkData.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static bool writeBookmarkData_toURL_options_error_( + NSData bookmarkData, + NSURL bookmarkFileURL, + int options, + ffi.Pointer> error) { + return _objc_msgSend_167( + _class_NSURL, + _sel_writeBookmarkData_toURL_options_error_, + bookmarkData.pointer, + bookmarkFileURL.pointer, + options, + error); + } + + static NSData? bookmarkDataWithContentsOfURL_error_( + NSURL bookmarkFileURL, ffi.Pointer> error) { + final _ret = _objc_msgSend_168( + _class_NSURL, + _sel_bookmarkDataWithContentsOfURL_error_, + bookmarkFileURL.pointer, + error); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL? URLByResolvingAliasFileAtURL_options_error_( + NSURL url, int options, ffi.Pointer> error) { + final _ret = _objc_msgSend_169( + _class_NSURL, + _sel_URLByResolvingAliasFileAtURL_options_error_, + url.pointer, + options, + error); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + bool startAccessingSecurityScopedResource() { + return _objc_msgSend_11( + this.pointer, _sel_startAccessingSecurityScopedResource); + } + + void stopAccessingSecurityScopedResource() { + _objc_msgSend_1(this.pointer, _sel_stopAccessingSecurityScopedResource); + } + + bool getPromisedItemResourceValue_forKey_error_( + ffi.Pointer> value, + NSString key, + ffi.Pointer> error) { + return _objc_msgSend_96( + this.pointer, + _sel_getPromisedItemResourceValue_forKey_error_, + value, + key.pointer, + error); + } + + NSDictionary? promisedItemResourceValuesForKeys_error_( + NSArray keys, ffi.Pointer> error) { + final _ret = _objc_msgSend_189(this.pointer, + _sel_promisedItemResourceValuesForKeys_error_, keys.pointer, error); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + bool checkPromisedItemIsReachableAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_190( + this.pointer, _sel_checkPromisedItemIsReachableAndReturnError_, error); + } + + static NSURL? fileURLWithPathComponents_(NSArray components) { + final _ret = _objc_msgSend_191( + _class_NSURL, _sel_fileURLWithPathComponents_, components.pointer); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSArray? get pathComponents { + final _ret = _objc_msgSend_192(this.pointer, _sel_pathComponents); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get lastPathComponent { + final _ret = _objc_msgSend_55(this.pointer, _sel_lastPathComponent); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get pathExtension { + final _ret = _objc_msgSend_55(this.pointer, _sel_pathExtension); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? URLByAppendingPathComponent_(NSString pathComponent) { + final _ret = _objc_msgSend_193( + this.pointer, _sel_URLByAppendingPathComponent_, pathComponent.pointer); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? URLByAppendingPathComponent_isDirectory_( + NSString pathComponent, bool isDirectory) { + final _ret = _objc_msgSend_194( + this.pointer, + _sel_URLByAppendingPathComponent_isDirectory_, + pathComponent.pointer, + isDirectory); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? get URLByDeletingLastPathComponent { + final _ret = + _objc_msgSend_56(this.pointer, _sel_URLByDeletingLastPathComponent); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? URLByAppendingPathExtension_(NSString pathExtension) { + final _ret = _objc_msgSend_193( + this.pointer, _sel_URLByAppendingPathExtension_, pathExtension.pointer); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? get URLByDeletingPathExtension { + final _ret = + _objc_msgSend_56(this.pointer, _sel_URLByDeletingPathExtension); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + bool checkResourceIsReachableAndReturnError_( + ffi.Pointer> error) { + return _objc_msgSend_190( + this.pointer, _sel_checkResourceIsReachableAndReturnError_, error); + } + + NSURL? get URLByStandardizingPath { + final _ret = _objc_msgSend_56(this.pointer, _sel_URLByStandardizingPath); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSURL? get URLByResolvingSymlinksInPath { + final _ret = + _objc_msgSend_56(this.pointer, _sel_URLByResolvingSymlinksInPath); + return _ret.address == 0 + ? null + : NSURL.castFromPointer(_ret, retain: true, release: true); + } + + NSData? resourceDataUsingCache_(bool shouldUseCache) { + final _ret = _objc_msgSend_195( + this.pointer, _sel_resourceDataUsingCache_, shouldUseCache); + return _ret.address == 0 + ? null + : NSData.castFromPointer(_ret, retain: true, release: true); + } + + void loadResourceDataNotifyingClient_usingCache_( + NSObject client, bool shouldUseCache) { + _objc_msgSend_196( + this.pointer, + _sel_loadResourceDataNotifyingClient_usingCache_, + client.pointer, + shouldUseCache); + } + + NSObject? propertyForKey_(NSString propertyKey) { + final _ret = _objc_msgSend_49( + this.pointer, _sel_propertyForKey_, propertyKey.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool setResourceData_(NSData data) { + return _objc_msgSend_35(this.pointer, _sel_setResourceData_, data.pointer); + } + + bool setProperty_forKey_(NSObject property, NSString propertyKey) { + return _objc_msgSend_197(this.pointer, _sel_setProperty_forKey_, + property.pointer, propertyKey.pointer); + } + + NSURLHandle? URLHandleUsingCache_(bool shouldUseCache) { + final _ret = _objc_msgSend_205( + this.pointer, _sel_URLHandleUsingCache_, shouldUseCache); + return _ret.address == 0 + ? null + : NSURLHandle.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSURL init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSURL.castFromPointer(_ret, retain: true, release: true); + } + + static NSURL new1() { + final _ret = _objc_msgSend_2(_class_NSURL, _sel_new); + return NSURL.castFromPointer(_ret, retain: false, release: true); + } + + static NSURL allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSURL, _sel_allocWithZone_, zone); + return NSURL.castFromPointer(_ret, retain: false, release: true); + } + + static NSURL alloc() { + final _ret = _objc_msgSend_2(_class_NSURL, _sel_alloc); + return NSURL.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSURL = objc.getClass("NSURL"); +late final _sel_initWithScheme_host_path_ = + objc.registerName("initWithScheme:host:path:"); +final _objc_msgSend_38 = 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_initFileURLWithPath_isDirectory_relativeToURL_ = + objc.registerName("initFileURLWithPath:isDirectory:relativeToURL:"); +final _objc_msgSend_39 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); +late final _sel_initFileURLWithPath_relativeToURL_ = + objc.registerName("initFileURLWithPath:relativeToURL:"); +final _objc_msgSend_40 = 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_initFileURLWithPath_isDirectory_ = + objc.registerName("initFileURLWithPath:isDirectory:"); +final _objc_msgSend_41 = 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_initFileURLWithPath_ = + objc.registerName("initFileURLWithPath:"); +final _objc_msgSend_42 = 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_fileURLWithPath_isDirectory_relativeToURL_ = + objc.registerName("fileURLWithPath:isDirectory:relativeToURL:"); +final _objc_msgSend_43 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); +late final _sel_fileURLWithPath_relativeToURL_ = + objc.registerName("fileURLWithPath:relativeToURL:"); +final _objc_msgSend_44 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_fileURLWithPath_isDirectory_ = + objc.registerName("fileURLWithPath:isDirectory:"); +final _objc_msgSend_45 = 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_fileURLWithPath_ = objc.registerName("fileURLWithPath:"); +final _objc_msgSend_46 = 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_initFileURLWithFileSystemRepresentation_isDirectory_relativeToURL_ = + objc.registerName( + "initFileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); +final _objc_msgSend_47 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); +late final _sel_fileURLWithFileSystemRepresentation_isDirectory_relativeToURL_ = + objc.registerName( + "fileURLWithFileSystemRepresentation:isDirectory:relativeToURL:"); +final _objc_msgSend_48 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + ffi.Pointer)>(); +late final _sel_initWithString_ = objc.registerName("initWithString:"); +final _objc_msgSend_49 = 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_relativeToURL_ = + objc.registerName("initWithString:relativeToURL:"); +final _objc_msgSend_50 = 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_URLWithString_ = objc.registerName("URLWithString:"); +late final _sel_URLWithString_relativeToURL_ = + objc.registerName("URLWithString:relativeToURL:"); +late final _sel_initWithString_encodingInvalidCharacters_ = + objc.registerName("initWithString:encodingInvalidCharacters:"); +final _objc_msgSend_51 = 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_URLWithString_encodingInvalidCharacters_ = + objc.registerName("URLWithString:encodingInvalidCharacters:"); +late final _sel_initWithDataRepresentation_relativeToURL_ = + objc.registerName("initWithDataRepresentation:relativeToURL:"); +final _objc_msgSend_52 = 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_URLWithDataRepresentation_relativeToURL_ = + objc.registerName("URLWithDataRepresentation:relativeToURL:"); +final _objc_msgSend_53 = 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_initAbsoluteURLWithDataRepresentation_relativeToURL_ = + objc.registerName("initAbsoluteURLWithDataRepresentation:relativeToURL:"); +late final _sel_absoluteURLWithDataRepresentation_relativeToURL_ = + objc.registerName("absoluteURLWithDataRepresentation:relativeToURL:"); +late final _sel_dataRepresentation = objc.registerName("dataRepresentation"); +final _objc_msgSend_54 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_absoluteString = objc.registerName("absoluteString"); +final _objc_msgSend_55 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_relativeString = objc.registerName("relativeString"); +late final _sel_baseURL = objc.registerName("baseURL"); +final _objc_msgSend_56 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_absoluteURL = objc.registerName("absoluteURL"); +late final _sel_scheme = objc.registerName("scheme"); +late final _sel_resourceSpecifier = objc.registerName("resourceSpecifier"); +late final _sel_host = objc.registerName("host"); + +class NSNumber extends NSValue { + NSNumber._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSNumber] that points to the same underlying object as [other]. + NSNumber.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSNumber] that wraps the given raw object pointer. + NSNumber.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSNumber]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSNumber); + } + + @override + NSNumber? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithChar_(int value) { + final _ret = _objc_msgSend_67(this.pointer, _sel_initWithChar_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithUnsignedChar_(int value) { + final _ret = + _objc_msgSend_68(this.pointer, _sel_initWithUnsignedChar_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithShort_(int value) { + final _ret = _objc_msgSend_69(this.pointer, _sel_initWithShort_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithUnsignedShort_(int value) { + final _ret = + _objc_msgSend_70(this.pointer, _sel_initWithUnsignedShort_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithInt_(int value) { + final _ret = _objc_msgSend_71(this.pointer, _sel_initWithInt_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithUnsignedInt_(int value) { + final _ret = + _objc_msgSend_72(this.pointer, _sel_initWithUnsignedInt_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithLong_(int value) { + final _ret = _objc_msgSend_73(this.pointer, _sel_initWithLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithUnsignedLong_(int value) { + final _ret = + _objc_msgSend_74(this.pointer, _sel_initWithUnsignedLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithLongLong_(int value) { + final _ret = _objc_msgSend_75(this.pointer, _sel_initWithLongLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithUnsignedLongLong_(int value) { + final _ret = + _objc_msgSend_76(this.pointer, _sel_initWithUnsignedLongLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithFloat_(double value) { + final _ret = _objc_msgSend_77(this.pointer, _sel_initWithFloat_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithDouble_(double value) { + final _ret = _objc_msgSend_78(this.pointer, _sel_initWithDouble_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithBool_(bool value) { + final _ret = _objc_msgSend_79(this.pointer, _sel_initWithBool_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithInteger_(int value) { + final _ret = _objc_msgSend_73(this.pointer, _sel_initWithInteger_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + NSNumber initWithUnsignedInteger_(int value) { + final _ret = + _objc_msgSend_74(this.pointer, _sel_initWithUnsignedInteger_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + int get charValue { + return _objc_msgSend_80(this.pointer, _sel_charValue); + } + + int get unsignedCharValue { + return _objc_msgSend_81(this.pointer, _sel_unsignedCharValue); + } + + int get shortValue { + return _objc_msgSend_82(this.pointer, _sel_shortValue); + } + + int get unsignedShortValue { + return _objc_msgSend_83(this.pointer, _sel_unsignedShortValue); + } + + int get intValue { + return _objc_msgSend_84(this.pointer, _sel_intValue); + } + + int get unsignedIntValue { + return _objc_msgSend_85(this.pointer, _sel_unsignedIntValue); + } + + int get longValue { + return _objc_msgSend_86(this.pointer, _sel_longValue); + } + + int get unsignedLongValue { + return _objc_msgSend_12(this.pointer, _sel_unsignedLongValue); + } + + int get longLongValue { + return _objc_msgSend_87(this.pointer, _sel_longLongValue); + } + + int get unsignedLongLongValue { + return _objc_msgSend_88(this.pointer, _sel_unsignedLongLongValue); + } + + double get floatValue { + return objc.useMsgSendVariants + ? _objc_msgSend_89Fpret(this.pointer, _sel_floatValue) + : _objc_msgSend_89(this.pointer, _sel_floatValue); + } + + double get doubleValue { + return objc.useMsgSendVariants + ? _objc_msgSend_90Fpret(this.pointer, _sel_doubleValue) + : _objc_msgSend_90(this.pointer, _sel_doubleValue); + } + + bool get boolValue { + return _objc_msgSend_11(this.pointer, _sel_boolValue); + } + + int get integerValue { + return _objc_msgSend_86(this.pointer, _sel_integerValue); + } + + int get unsignedIntegerValue { + return _objc_msgSend_12(this.pointer, _sel_unsignedIntegerValue); + } + + NSString get stringValue { + final _ret = _objc_msgSend_32(this.pointer, _sel_stringValue); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + int compare_(NSNumber otherNumber) { + return _objc_msgSend_91(this.pointer, _sel_compare_, otherNumber.pointer); + } + + bool isEqualToNumber_(NSNumber number) { + return _objc_msgSend_92( + this.pointer, _sel_isEqualToNumber_, number.pointer); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _objc_msgSend_93(this.pointer, _sel_descriptionWithLocale_, + locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithChar_(int value) { + final _ret = _objc_msgSend_67(_class_NSNumber, _sel_numberWithChar_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithUnsignedChar_(int value) { + final _ret = + _objc_msgSend_68(_class_NSNumber, _sel_numberWithUnsignedChar_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithShort_(int value) { + final _ret = + _objc_msgSend_69(_class_NSNumber, _sel_numberWithShort_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithUnsignedShort_(int value) { + final _ret = + _objc_msgSend_70(_class_NSNumber, _sel_numberWithUnsignedShort_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithInt_(int value) { + final _ret = _objc_msgSend_71(_class_NSNumber, _sel_numberWithInt_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithUnsignedInt_(int value) { + final _ret = + _objc_msgSend_72(_class_NSNumber, _sel_numberWithUnsignedInt_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithLong_(int value) { + final _ret = _objc_msgSend_73(_class_NSNumber, _sel_numberWithLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithUnsignedLong_(int value) { + final _ret = + _objc_msgSend_74(_class_NSNumber, _sel_numberWithUnsignedLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithLongLong_(int value) { + final _ret = + _objc_msgSend_75(_class_NSNumber, _sel_numberWithLongLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithUnsignedLongLong_(int value) { + final _ret = _objc_msgSend_76( + _class_NSNumber, _sel_numberWithUnsignedLongLong_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithFloat_(double value) { + final _ret = + _objc_msgSend_77(_class_NSNumber, _sel_numberWithFloat_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithDouble_(double value) { + final _ret = + _objc_msgSend_78(_class_NSNumber, _sel_numberWithDouble_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithBool_(bool value) { + final _ret = _objc_msgSend_79(_class_NSNumber, _sel_numberWithBool_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithInteger_(int value) { + final _ret = + _objc_msgSend_73(_class_NSNumber, _sel_numberWithInteger_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber numberWithUnsignedInteger_(int value) { + final _ret = _objc_msgSend_74( + _class_NSNumber, _sel_numberWithUnsignedInteger_, value); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSNumber initWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_58( + this.pointer, _sel_initWithBytes_objCType_, value, type); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue valueWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_59( + _class_NSNumber, _sel_valueWithBytes_objCType_, value, type); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue value_withObjCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_59( + _class_NSNumber, _sel_value_withObjCType_, value, type); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue valueWithNonretainedObject_(NSObject? anObject) { + final _ret = _objc_msgSend_60(_class_NSNumber, + _sel_valueWithNonretainedObject_, anObject?.pointer ?? ffi.nullptr); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue valueWithPointer_(ffi.Pointer pointer) { + final _ret = + _objc_msgSend_62(_class_NSNumber, _sel_valueWithPointer_, pointer); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue valueWithRange_(_NSRange range) { + final _ret = _objc_msgSend_65(_class_NSNumber, _sel_valueWithRange_, range); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSNumber init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSNumber.castFromPointer(_ret, retain: true, release: true); + } + + static NSNumber new1() { + final _ret = _objc_msgSend_2(_class_NSNumber, _sel_new); + return NSNumber.castFromPointer(_ret, retain: false, release: true); + } + + static NSNumber allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSNumber, _sel_allocWithZone_, zone); + return NSNumber.castFromPointer(_ret, retain: false, release: true); + } + + static NSNumber alloc() { + final _ret = _objc_msgSend_2(_class_NSNumber, _sel_alloc); + return NSNumber.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSNumber = objc.getClass("NSNumber"); + +class NSValue extends NSObject { + NSValue._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSValue] that points to the same underlying object as [other]. + NSValue.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSValue] that wraps the given raw object pointer. + NSValue.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSValue]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSValue); + } + + void getValue_size_(ffi.Pointer value, int size) { + _objc_msgSend_33(this.pointer, _sel_getValue_size_, value, size); + } + + ffi.Pointer get objCType { + return _objc_msgSend_57(this.pointer, _sel_objCType); + } + + NSValue initWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_58( + this.pointer, _sel_initWithBytes_objCType_, value, type); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + NSValue? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue valueWithBytes_objCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = _objc_msgSend_59( + _class_NSValue, _sel_valueWithBytes_objCType_, value, type); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue value_withObjCType_( + ffi.Pointer value, ffi.Pointer type) { + final _ret = + _objc_msgSend_59(_class_NSValue, _sel_value_withObjCType_, value, type); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue valueWithNonretainedObject_(NSObject? anObject) { + final _ret = _objc_msgSend_60(_class_NSValue, + _sel_valueWithNonretainedObject_, anObject?.pointer ?? ffi.nullptr); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? get nonretainedObjectValue { + final _ret = _objc_msgSend_61(this.pointer, _sel_nonretainedObjectValue); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue valueWithPointer_(ffi.Pointer pointer) { + final _ret = + _objc_msgSend_62(_class_NSValue, _sel_valueWithPointer_, pointer); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + ffi.Pointer get pointerValue { + return _objc_msgSend_31(this.pointer, _sel_pointerValue); + } + + bool isEqualToValue_(NSValue value) { + return _objc_msgSend_63(this.pointer, _sel_isEqualToValue_, value.pointer); + } + + void getValue_(ffi.Pointer value) { + _objc_msgSend_64(this.pointer, _sel_getValue_, value); + } + + static NSValue valueWithRange_(_NSRange range) { + final _ret = _objc_msgSend_65(_class_NSValue, _sel_valueWithRange_, range); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + void getRangeValue(ffi.Pointer<_NSRange> stret) { + objc.useMsgSendVariants + ? _objc_msgSend_66Stret(stret, this.pointer, _sel_rangeValue) + : stret.ref = _objc_msgSend_66(this.pointer, _sel_rangeValue); + } + + @override + NSValue init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSValue.castFromPointer(_ret, retain: true, release: true); + } + + static NSValue new1() { + final _ret = _objc_msgSend_2(_class_NSValue, _sel_new); + return NSValue.castFromPointer(_ret, retain: false, release: true); + } + + static NSValue allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSValue, _sel_allocWithZone_, zone); + return NSValue.castFromPointer(_ret, retain: false, release: true); + } + + static NSValue alloc() { + final _ret = _objc_msgSend_2(_class_NSValue, _sel_alloc); + return NSValue.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSValue = objc.getClass("NSValue"); +late final _sel_getValue_size_ = objc.registerName("getValue:size:"); +late final _sel_objCType = objc.registerName("objCType"); +final _objc_msgSend_57 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithBytes_objCType_ = + objc.registerName("initWithBytes:objCType:"); +final _objc_msgSend_58 = 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:"); +final _objc_msgSend_59 = 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_value_withObjCType_ = objc.registerName("value:withObjCType:"); +late final _sel_valueWithNonretainedObject_ = + objc.registerName("valueWithNonretainedObject:"); +final _objc_msgSend_60 = 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_nonretainedObjectValue = + objc.registerName("nonretainedObjectValue"); +final _objc_msgSend_61 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_valueWithPointer_ = objc.registerName("valueWithPointer:"); +final _objc_msgSend_62 = 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_pointerValue = objc.registerName("pointerValue"); +late final _sel_isEqualToValue_ = objc.registerName("isEqualToValue:"); +final _objc_msgSend_63 = 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_getValue_ = objc.registerName("getValue:"); +final _objc_msgSend_64 = 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_valueWithRange_ = objc.registerName("valueWithRange:"); +final _objc_msgSend_65 = 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_rangeValue = objc.registerName("rangeValue"); +final _objc_msgSend_66 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_66Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer)>(); +late final _sel_initWithChar_ = objc.registerName("initWithChar:"); +final _objc_msgSend_67 = 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_initWithUnsignedChar_ = + objc.registerName("initWithUnsignedChar:"); +final _objc_msgSend_68 = 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_initWithShort_ = objc.registerName("initWithShort:"); +final _objc_msgSend_69 = 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_initWithUnsignedShort_ = + objc.registerName("initWithUnsignedShort:"); +final _objc_msgSend_70 = 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_initWithInt_ = objc.registerName("initWithInt:"); +final _objc_msgSend_71 = 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_initWithUnsignedInt_ = + objc.registerName("initWithUnsignedInt:"); +final _objc_msgSend_72 = 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_initWithLong_ = objc.registerName("initWithLong:"); +final _objc_msgSend_73 = 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_initWithUnsignedLong_ = + objc.registerName("initWithUnsignedLong:"); +final _objc_msgSend_74 = 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_initWithLongLong_ = objc.registerName("initWithLongLong:"); +final _objc_msgSend_75 = 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_initWithUnsignedLongLong_ = + objc.registerName("initWithUnsignedLongLong:"); +final _objc_msgSend_76 = 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_initWithFloat_ = objc.registerName("initWithFloat:"); +final _objc_msgSend_77 = 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_initWithDouble_ = objc.registerName("initWithDouble:"); +final _objc_msgSend_78 = 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_initWithBool_ = objc.registerName("initWithBool:"); +final _objc_msgSend_79 = 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_initWithInteger_ = objc.registerName("initWithInteger:"); +late final _sel_initWithUnsignedInteger_ = + objc.registerName("initWithUnsignedInteger:"); +late final _sel_charValue = objc.registerName("charValue"); +final _objc_msgSend_80 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Char Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_unsignedCharValue = objc.registerName("unsignedCharValue"); +final _objc_msgSend_81 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedChar Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_shortValue = objc.registerName("shortValue"); +final _objc_msgSend_82 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Short Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_unsignedShortValue = objc.registerName("unsignedShortValue"); +final _objc_msgSend_83 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedShort Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_intValue = objc.registerName("intValue"); +final _objc_msgSend_84 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_unsignedIntValue = objc.registerName("unsignedIntValue"); +final _objc_msgSend_85 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedInt Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_longValue = objc.registerName("longValue"); +final _objc_msgSend_86 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_unsignedLongValue = objc.registerName("unsignedLongValue"); +late final _sel_longLongValue = objc.registerName("longLongValue"); +final _objc_msgSend_87 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.LongLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_unsignedLongLongValue = + objc.registerName("unsignedLongLongValue"); +final _objc_msgSend_88 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLongLong Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_floatValue = objc.registerName("floatValue"); +final _objc_msgSend_89 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_89Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Float Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_doubleValue = objc.registerName("doubleValue"); +final _objc_msgSend_90 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_90Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_boolValue = objc.registerName("boolValue"); +late final _sel_integerValue = objc.registerName("integerValue"); +late final _sel_unsignedIntegerValue = + objc.registerName("unsignedIntegerValue"); +late final _sel_stringValue = objc.registerName("stringValue"); +final _objc_msgSend_91 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isEqualToNumber_ = objc.registerName("isEqualToNumber:"); +final _objc_msgSend_92 = 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_descriptionWithLocale_ = + objc.registerName("descriptionWithLocale:"); +final _objc_msgSend_93 = 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_numberWithChar_ = objc.registerName("numberWithChar:"); +late final _sel_numberWithUnsignedChar_ = + objc.registerName("numberWithUnsignedChar:"); +late final _sel_numberWithShort_ = objc.registerName("numberWithShort:"); +late final _sel_numberWithUnsignedShort_ = + objc.registerName("numberWithUnsignedShort:"); +late final _sel_numberWithInt_ = objc.registerName("numberWithInt:"); +late final _sel_numberWithUnsignedInt_ = + objc.registerName("numberWithUnsignedInt:"); +late final _sel_numberWithLong_ = objc.registerName("numberWithLong:"); +late final _sel_numberWithUnsignedLong_ = + objc.registerName("numberWithUnsignedLong:"); +late final _sel_numberWithLongLong_ = objc.registerName("numberWithLongLong:"); +late final _sel_numberWithUnsignedLongLong_ = + objc.registerName("numberWithUnsignedLongLong:"); +late final _sel_numberWithFloat_ = objc.registerName("numberWithFloat:"); +late final _sel_numberWithDouble_ = objc.registerName("numberWithDouble:"); +late final _sel_numberWithBool_ = objc.registerName("numberWithBool:"); +late final _sel_numberWithInteger_ = objc.registerName("numberWithInteger:"); +late final _sel_numberWithUnsignedInteger_ = + objc.registerName("numberWithUnsignedInteger:"); +late final _sel_port = objc.registerName("port"); +final _objc_msgSend_94 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_user = objc.registerName("user"); +late final _sel_password = objc.registerName("password"); +late final _sel_path = objc.registerName("path"); +late final _sel_fragment = objc.registerName("fragment"); +late final _sel_parameterString = objc.registerName("parameterString"); +late final _sel_query = objc.registerName("query"); +late final _sel_relativePath = objc.registerName("relativePath"); +late final _sel_hasDirectoryPath = objc.registerName("hasDirectoryPath"); +late final _sel_getFileSystemRepresentation_maxLength_ = + objc.registerName("getFileSystemRepresentation:maxLength:"); +final _objc_msgSend_95 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int)>(); +late final _sel_fileSystemRepresentation = + objc.registerName("fileSystemRepresentation"); +late final _sel_isFileURL = objc.registerName("isFileURL"); +late final _sel_standardizedURL = objc.registerName("standardizedURL"); +late final _sel_isFileReferenceURL = objc.registerName("isFileReferenceURL"); +late final _sel_fileReferenceURL = objc.registerName("fileReferenceURL"); +late final _sel_filePathURL = objc.registerName("filePathURL"); + +class NSError extends objc.ObjCObjectBase { + NSError._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSError] that points to the same underlying object as [other]. + NSError.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSError] that wraps the given raw object pointer. + NSError.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSError]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSError); + } +} + +late final _class_NSError = objc.getClass("NSError"); +late final _sel_getResourceValue_forKey_error_ = + objc.registerName("getResourceValue:forKey:error:"); +final _objc_msgSend_96 = 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>)>(); + +class NSArray extends NSObject { + NSArray._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSArray] that points to the same underlying object as [other]. + NSArray.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSArray] that wraps the given raw object pointer. + NSArray.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSArray]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSArray); + } + + int get count { + return _objc_msgSend_12(this.pointer, _sel_count); + } + + NSObject objectAtIndex_(int index) { + final _ret = _objc_msgSend_97(this.pointer, _sel_objectAtIndex_, index); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSArray init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray arrayByAddingObject_(NSObject anObject) { + final _ret = _objc_msgSend_99( + this.pointer, _sel_arrayByAddingObject_, anObject.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray arrayByAddingObjectsFromArray_(NSArray otherArray) { + final _ret = _objc_msgSend_100( + this.pointer, _sel_arrayByAddingObjectsFromArray_, otherArray.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSString componentsJoinedByString_(NSString separator) { + final _ret = _objc_msgSend_101( + this.pointer, _sel_componentsJoinedByString_, separator.pointer); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool containsObject_(NSObject anObject) { + return _objc_msgSend_0( + this.pointer, _sel_containsObject_, anObject.pointer); + } + + NSString get description { + final _ret = _objc_msgSend_32(this.pointer, _sel_description); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _objc_msgSend_93(this.pointer, _sel_descriptionWithLocale_, + locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString descriptionWithLocale_indent_(NSObject? locale, int level) { + final _ret = _objc_msgSend_102( + this.pointer, + _sel_descriptionWithLocale_indent_, + locale?.pointer ?? ffi.nullptr, + level); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? firstObjectCommonWithArray_(NSArray otherArray) { + final _ret = _objc_msgSend_103( + this.pointer, _sel_firstObjectCommonWithArray_, otherArray.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void getObjects_range_( + ffi.Pointer> objects, _NSRange range) { + _objc_msgSend_104(this.pointer, _sel_getObjects_range_, objects, range); + } + + int indexOfObject_(NSObject anObject) { + return _objc_msgSend_105( + this.pointer, _sel_indexOfObject_, anObject.pointer); + } + + int indexOfObject_inRange_(NSObject anObject, _NSRange range) { + return _objc_msgSend_106( + this.pointer, _sel_indexOfObject_inRange_, anObject.pointer, range); + } + + int indexOfObjectIdenticalTo_(NSObject anObject) { + return _objc_msgSend_105( + this.pointer, _sel_indexOfObjectIdenticalTo_, anObject.pointer); + } + + int indexOfObjectIdenticalTo_inRange_(NSObject anObject, _NSRange range) { + return _objc_msgSend_106(this.pointer, + _sel_indexOfObjectIdenticalTo_inRange_, anObject.pointer, range); + } + + bool isEqualToArray_(NSArray otherArray) { + return _objc_msgSend_107( + this.pointer, _sel_isEqualToArray_, otherArray.pointer); + } + + NSObject? get firstObject { + final _ret = _objc_msgSend_61(this.pointer, _sel_firstObject); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? get lastObject { + final _ret = _objc_msgSend_61(this.pointer, _sel_lastObject); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSEnumerator objectEnumerator() { + final _ret = _objc_msgSend_108(this.pointer, _sel_objectEnumerator); + return NSEnumerator.castFromPointer(_ret, retain: true, release: true); + } + + NSEnumerator reverseObjectEnumerator() { + final _ret = _objc_msgSend_108(this.pointer, _sel_reverseObjectEnumerator); + return NSEnumerator.castFromPointer(_ret, retain: true, release: true); + } + + NSData get sortedArrayHint { + final _ret = _objc_msgSend_54(this.pointer, _sel_sortedArrayHint); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSArray sortedArrayUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context) { + final _ret = _objc_msgSend_109(this.pointer, + _sel_sortedArrayUsingFunction_context_, comparator, context); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray sortedArrayUsingFunction_context_hint_( + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + comparator, + ffi.Pointer context, + NSData? hint) { + final _ret = _objc_msgSend_110( + this.pointer, + _sel_sortedArrayUsingFunction_context_hint_, + comparator, + context, + hint?.pointer ?? ffi.nullptr); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray sortedArrayUsingSelector_(ffi.Pointer comparator) { + final _ret = _objc_msgSend_111( + this.pointer, _sel_sortedArrayUsingSelector_, comparator); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray subarrayWithRange_(_NSRange range) { + final _ret = + _objc_msgSend_112(this.pointer, _sel_subarrayWithRange_, range); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + bool writeToURL_error_( + NSURL url, ffi.Pointer> error) { + return _objc_msgSend_113( + this.pointer, _sel_writeToURL_error_, url.pointer, error); + } + + void makeObjectsPerformSelector_(ffi.Pointer aSelector) { + _objc_msgSend_7(this.pointer, _sel_makeObjectsPerformSelector_, aSelector); + } + + void makeObjectsPerformSelector_withObject_( + ffi.Pointer aSelector, NSObject? argument) { + _objc_msgSend_114(this.pointer, _sel_makeObjectsPerformSelector_withObject_, + aSelector, argument?.pointer ?? ffi.nullptr); + } + + NSArray objectsAtIndexes_(NSIndexSet indexes) { + final _ret = _objc_msgSend_135( + this.pointer, _sel_objectsAtIndexes_, indexes.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSObject objectAtIndexedSubscript_(int idx) { + final _ret = + _objc_msgSend_97(this.pointer, _sel_objectAtIndexedSubscript_, idx); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void enumerateObjectsUsingBlock_( + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_136( + this.pointer, _sel_enumerateObjectsUsingBlock_, block.pointer); + } + + void enumerateObjectsWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_137(this.pointer, + _sel_enumerateObjectsWithOptions_usingBlock_, opts, block.pointer); + } + + void enumerateObjectsAtIndexes_options_usingBlock_(NSIndexSet s, int opts, + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool block) { + _objc_msgSend_138( + this.pointer, + _sel_enumerateObjectsAtIndexes_options_usingBlock_, + s.pointer, + opts, + block.pointer); + } + + int indexOfObjectPassingTest_( + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_139( + this.pointer, _sel_indexOfObjectPassingTest_, predicate.pointer); + } + + int indexOfObjectWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_140(this.pointer, + _sel_indexOfObjectWithOptions_passingTest_, opts, predicate.pointer); + } + + int indexOfObjectAtIndexes_options_passingTest_(NSIndexSet s, int opts, + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_141( + this.pointer, + _sel_indexOfObjectAtIndexes_options_passingTest_, + s.pointer, + opts, + predicate.pointer); + } + + NSIndexSet indexesOfObjectsPassingTest_( + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_142( + this.pointer, _sel_indexesOfObjectsPassingTest_, predicate.pointer); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSIndexSet indexesOfObjectsWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_143(this.pointer, + _sel_indexesOfObjectsWithOptions_passingTest_, opts, predicate.pointer); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSIndexSet indexesOfObjectsAtIndexes_options_passingTest_(NSIndexSet s, + int opts, ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_144( + this.pointer, + _sel_indexesOfObjectsAtIndexes_options_passingTest_, + s.pointer, + opts, + predicate.pointer); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSArray sortedArrayUsingComparator_( + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_145( + this.pointer, _sel_sortedArrayUsingComparator_, cmptr.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray sortedArrayWithOptions_usingComparator_(int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_146(this.pointer, + _sel_sortedArrayWithOptions_usingComparator_, opts, cmptr.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + int indexOfObject_inSortedRange_options_usingComparator_( + NSObject obj, + _NSRange r, + int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmp) { + return _objc_msgSend_147( + this.pointer, + _sel_indexOfObject_inSortedRange_options_usingComparator_, + obj.pointer, + r, + opts, + cmp.pointer); + } + + static NSArray array() { + final _ret = _objc_msgSend_2(_class_NSArray, _sel_array); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSArray arrayWithObject_(NSObject anObject) { + final _ret = _objc_msgSend_148( + _class_NSArray, _sel_arrayWithObject_, anObject.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSArray arrayWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + _class_NSArray, _sel_arrayWithObjects_count_, objects, cnt); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSArray arrayWithObjects_(NSObject firstObj) { + final _ret = _objc_msgSend_148( + _class_NSArray, _sel_arrayWithObjects_, firstObj.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSArray arrayWithArray_(NSArray array) { + final _ret = + _objc_msgSend_149(_class_NSArray, _sel_arrayWithArray_, array.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray initWithObjects_(NSObject firstObj) { + final _ret = _objc_msgSend_148( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray initWithArray_(NSArray array) { + final _ret = + _objc_msgSend_149(this.pointer, _sel_initWithArray_, array.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray initWithArray_copyItems_(NSArray array, bool flag) { + final _ret = _objc_msgSend_150( + this.pointer, _sel_initWithArray_copyItems_, array.pointer, flag); + return NSArray.castFromPointer(_ret, retain: false, release: true); + } + + NSArray? initWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_151( + this.pointer, _sel_initWithContentsOfURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSArray? arrayWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_151( + _class_NSArray, _sel_arrayWithContentsOfURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSObject differenceFromArray_withOptions_usingEquivalenceTest_(NSArray other, + int options, ObjCBlock_bool_objcObjCObject_objcObjCObject block) { + final _ret = _objc_msgSend_152( + this.pointer, + _sel_differenceFromArray_withOptions_usingEquivalenceTest_, + other.pointer, + options, + block.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject differenceFromArray_withOptions_(NSArray other, int options) { + final _ret = _objc_msgSend_153(this.pointer, + _sel_differenceFromArray_withOptions_, other.pointer, options); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject differenceFromArray_(NSArray other) { + final _ret = _objc_msgSend_149( + this.pointer, _sel_differenceFromArray_, other.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSArray? arrayByApplyingDifference_(NSObject difference) { + final _ret = _objc_msgSend_154( + this.pointer, _sel_arrayByApplyingDifference_, difference.pointer); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + void getObjects_(ffi.Pointer> objects) { + _objc_msgSend_155(this.pointer, _sel_getObjects_, objects); + } + + static NSArray? arrayWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_156( + _class_NSArray, _sel_arrayWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSArray? arrayWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_157( + _class_NSArray, _sel_arrayWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray? initWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_156( + this.pointer, _sel_initWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray? initWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_157( + this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _objc_msgSend_37(this.pointer, _sel_writeToFile_atomically_, + path.pointer, useAuxiliaryFile); + } + + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _objc_msgSend_158( + this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); + } + + static NSArray new1() { + final _ret = _objc_msgSend_2(_class_NSArray, _sel_new); + return NSArray.castFromPointer(_ret, retain: false, release: true); + } + + static NSArray allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSArray, _sel_allocWithZone_, zone); + return NSArray.castFromPointer(_ret, retain: false, release: true); + } + + static NSArray alloc() { + final _ret = _objc_msgSend_2(_class_NSArray, _sel_alloc); + return NSArray.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSArray = objc.getClass("NSArray"); +late final _sel_count = objc.registerName("count"); +late final _sel_objectAtIndex_ = objc.registerName("objectAtIndex:"); +final _objc_msgSend_97 = 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_initWithObjects_count_ = + objc.registerName("initWithObjects:count:"); +final _objc_msgSend_98 = 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_arrayByAddingObject_ = + objc.registerName("arrayByAddingObject:"); +final _objc_msgSend_99 = 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_arrayByAddingObjectsFromArray_ = + objc.registerName("arrayByAddingObjectsFromArray:"); +final _objc_msgSend_100 = 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_componentsJoinedByString_ = + objc.registerName("componentsJoinedByString:"); +final _objc_msgSend_101 = 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_containsObject_ = objc.registerName("containsObject:"); +late final _sel_descriptionWithLocale_indent_ = + objc.registerName("descriptionWithLocale:indent:"); +final _objc_msgSend_102 = 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_firstObjectCommonWithArray_ = + objc.registerName("firstObjectCommonWithArray:"); +final _objc_msgSend_103 = 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_getObjects_range_ = objc.registerName("getObjects:range:"); +final _objc_msgSend_104 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + _NSRange)>(); +late final _sel_indexOfObject_ = objc.registerName("indexOfObject:"); +final _objc_msgSend_105 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexOfObject_inRange_ = + objc.registerName("indexOfObject:inRange:"); +final _objc_msgSend_106 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_indexOfObjectIdenticalTo_ = + objc.registerName("indexOfObjectIdenticalTo:"); +late final _sel_indexOfObjectIdenticalTo_inRange_ = + objc.registerName("indexOfObjectIdenticalTo:inRange:"); +late final _sel_isEqualToArray_ = objc.registerName("isEqualToArray:"); +final _objc_msgSend_107 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_firstObject = objc.registerName("firstObject"); +late final _sel_lastObject = objc.registerName("lastObject"); + +class NSEnumerator extends NSObject { + NSEnumerator._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSEnumerator] that points to the same underlying object as [other]. + NSEnumerator.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSEnumerator] that wraps the given raw object pointer. + NSEnumerator.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSEnumerator]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSEnumerator); + } + + NSObject? nextObject() { + final _ret = _objc_msgSend_61(this.pointer, _sel_nextObject); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject get allObjects { + final _ret = _objc_msgSend_2(this.pointer, _sel_allObjects); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSEnumerator init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSEnumerator.castFromPointer(_ret, retain: true, release: true); + } + + static NSEnumerator new1() { + final _ret = _objc_msgSend_2(_class_NSEnumerator, _sel_new); + return NSEnumerator.castFromPointer(_ret, retain: false, release: true); + } + + static NSEnumerator allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSEnumerator, _sel_allocWithZone_, zone); + return NSEnumerator.castFromPointer(_ret, retain: false, release: true); + } + + static NSEnumerator alloc() { + final _ret = _objc_msgSend_2(_class_NSEnumerator, _sel_alloc); + return NSEnumerator.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSEnumerator = objc.getClass("NSEnumerator"); +late final _sel_nextObject = objc.registerName("nextObject"); +late final _sel_allObjects = objc.registerName("allObjects"); +late final _sel_objectEnumerator = objc.registerName("objectEnumerator"); +final _objc_msgSend_108 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_reverseObjectEnumerator = + objc.registerName("reverseObjectEnumerator"); +late final _sel_sortedArrayHint = objc.registerName("sortedArrayHint"); +late final _sel_sortedArrayUsingFunction_context_ = + objc.registerName("sortedArrayUsingFunction:context:"); +final _objc_msgSend_109 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); +late final _sel_sortedArrayUsingFunction_context_hint_ = + objc.registerName("sortedArrayUsingFunction:context:hint:"); +final _objc_msgSend_110 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_sortedArrayUsingSelector_ = + objc.registerName("sortedArrayUsingSelector:"); +final _objc_msgSend_111 = 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_subarrayWithRange_ = objc.registerName("subarrayWithRange:"); +final _objc_msgSend_112 = 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_writeToURL_error_ = objc.registerName("writeToURL:error:"); +final _objc_msgSend_113 = 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_makeObjectsPerformSelector_ = + objc.registerName("makeObjectsPerformSelector:"); +late final _sel_makeObjectsPerformSelector_withObject_ = + objc.registerName("makeObjectsPerformSelector:withObject:"); +final _objc_msgSend_114 = 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)>(); + +class NSIndexSet extends NSObject { + NSIndexSet._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSIndexSet] that points to the same underlying object as [other]. + NSIndexSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSIndexSet] that wraps the given raw object pointer. + NSIndexSet.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSIndexSet]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSIndexSet); + } + + static NSIndexSet indexSet() { + final _ret = _objc_msgSend_2(_class_NSIndexSet, _sel_indexSet); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSIndexSet indexSetWithIndex_(int value) { + final _ret = + _objc_msgSend_97(_class_NSIndexSet, _sel_indexSetWithIndex_, value); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSIndexSet indexSetWithIndexesInRange_(_NSRange range) { + final _ret = _objc_msgSend_115( + _class_NSIndexSet, _sel_indexSetWithIndexesInRange_, range); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSIndexSet initWithIndexesInRange_(_NSRange range) { + final _ret = + _objc_msgSend_115(this.pointer, _sel_initWithIndexesInRange_, range); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSIndexSet initWithIndexSet_(NSIndexSet indexSet) { + final _ret = _objc_msgSend_116( + this.pointer, _sel_initWithIndexSet_, indexSet.pointer); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSIndexSet initWithIndex_(int value) { + final _ret = _objc_msgSend_97(this.pointer, _sel_initWithIndex_, value); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + bool isEqualToIndexSet_(NSIndexSet indexSet) { + return _objc_msgSend_117( + this.pointer, _sel_isEqualToIndexSet_, indexSet.pointer); + } + + int get count { + return _objc_msgSend_12(this.pointer, _sel_count); + } + + int get firstIndex { + return _objc_msgSend_12(this.pointer, _sel_firstIndex); + } + + int get lastIndex { + return _objc_msgSend_12(this.pointer, _sel_lastIndex); + } + + int indexGreaterThanIndex_(int value) { + return _objc_msgSend_118(this.pointer, _sel_indexGreaterThanIndex_, value); + } + + int indexLessThanIndex_(int value) { + return _objc_msgSend_118(this.pointer, _sel_indexLessThanIndex_, value); + } + + int indexGreaterThanOrEqualToIndex_(int value) { + return _objc_msgSend_118( + this.pointer, _sel_indexGreaterThanOrEqualToIndex_, value); + } + + int indexLessThanOrEqualToIndex_(int value) { + return _objc_msgSend_118( + this.pointer, _sel_indexLessThanOrEqualToIndex_, value); + } + + int getIndexes_maxCount_inIndexRange_( + ffi.Pointer indexBuffer, + int bufferSize, + ffi.Pointer<_NSRange> range) { + return _objc_msgSend_119(this.pointer, + _sel_getIndexes_maxCount_inIndexRange_, indexBuffer, bufferSize, range); + } + + int countOfIndexesInRange_(_NSRange range) { + return _objc_msgSend_120(this.pointer, _sel_countOfIndexesInRange_, range); + } + + bool containsIndex_(int value) { + return _objc_msgSend_121(this.pointer, _sel_containsIndex_, value); + } + + bool containsIndexesInRange_(_NSRange range) { + return _objc_msgSend_122(this.pointer, _sel_containsIndexesInRange_, range); + } + + bool containsIndexes_(NSIndexSet indexSet) { + return _objc_msgSend_117( + this.pointer, _sel_containsIndexes_, indexSet.pointer); + } + + bool intersectsIndexesInRange_(_NSRange range) { + return _objc_msgSend_122( + this.pointer, _sel_intersectsIndexesInRange_, range); + } + + void enumerateIndexesUsingBlock_( + ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { + _objc_msgSend_123( + this.pointer, _sel_enumerateIndexesUsingBlock_, block.pointer); + } + + void enumerateIndexesWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { + _objc_msgSend_124(this.pointer, + _sel_enumerateIndexesWithOptions_usingBlock_, opts, block.pointer); + } + + void enumerateIndexesInRange_options_usingBlock_( + _NSRange range, int opts, ObjCBlock_ffiVoid_ffiUnsignedLong_bool block) { + _objc_msgSend_125( + this.pointer, + _sel_enumerateIndexesInRange_options_usingBlock_, + range, + opts, + block.pointer); + } + + int indexPassingTest_(ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_126( + this.pointer, _sel_indexPassingTest_, predicate.pointer); + } + + int indexWithOptions_passingTest_( + int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_127(this.pointer, _sel_indexWithOptions_passingTest_, + opts, predicate.pointer); + } + + int indexInRange_options_passingTest_( + _NSRange range, int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + return _objc_msgSend_128(this.pointer, + _sel_indexInRange_options_passingTest_, range, opts, predicate.pointer); + } + + NSIndexSet indexesPassingTest_( + ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_129( + this.pointer, _sel_indexesPassingTest_, predicate.pointer); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSIndexSet indexesWithOptions_passingTest_( + int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_130(this.pointer, + _sel_indexesWithOptions_passingTest_, opts, predicate.pointer); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + NSIndexSet indexesInRange_options_passingTest_( + _NSRange range, int opts, ObjCBlock_bool_ffiUnsignedLong_bool predicate) { + final _ret = _objc_msgSend_131( + this.pointer, + _sel_indexesInRange_options_passingTest_, + range, + opts, + predicate.pointer); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + void enumerateRangesUsingBlock_(ObjCBlock_ffiVoid_NSRange_bool block) { + _objc_msgSend_132( + this.pointer, _sel_enumerateRangesUsingBlock_, block.pointer); + } + + void enumerateRangesWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_NSRange_bool block) { + _objc_msgSend_133(this.pointer, _sel_enumerateRangesWithOptions_usingBlock_, + opts, block.pointer); + } + + void enumerateRangesInRange_options_usingBlock_( + _NSRange range, int opts, ObjCBlock_ffiVoid_NSRange_bool block) { + _objc_msgSend_134( + this.pointer, + _sel_enumerateRangesInRange_options_usingBlock_, + range, + opts, + block.pointer); + } + + @override + NSIndexSet init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSIndexSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSIndexSet new1() { + final _ret = _objc_msgSend_2(_class_NSIndexSet, _sel_new); + return NSIndexSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSIndexSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSIndexSet, _sel_allocWithZone_, zone); + return NSIndexSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSIndexSet alloc() { + final _ret = _objc_msgSend_2(_class_NSIndexSet, _sel_alloc); + return NSIndexSet.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSIndexSet = objc.getClass("NSIndexSet"); +late final _sel_indexSet = objc.registerName("indexSet"); +late final _sel_indexSetWithIndex_ = objc.registerName("indexSetWithIndex:"); +late final _sel_indexSetWithIndexesInRange_ = + objc.registerName("indexSetWithIndexesInRange:"); +final _objc_msgSend_115 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_initWithIndexesInRange_ = + objc.registerName("initWithIndexesInRange:"); +late final _sel_initWithIndexSet_ = objc.registerName("initWithIndexSet:"); +final _objc_msgSend_116 = 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_initWithIndex_ = objc.registerName("initWithIndex:"); +late final _sel_isEqualToIndexSet_ = objc.registerName("isEqualToIndexSet:"); +final _objc_msgSend_117 = 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_firstIndex = objc.registerName("firstIndex"); +late final _sel_lastIndex = objc.registerName("lastIndex"); +late final _sel_indexGreaterThanIndex_ = + objc.registerName("indexGreaterThanIndex:"); +final _objc_msgSend_118 = 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_indexLessThanIndex_ = objc.registerName("indexLessThanIndex:"); +late final _sel_indexGreaterThanOrEqualToIndex_ = + objc.registerName("indexGreaterThanOrEqualToIndex:"); +late final _sel_indexLessThanOrEqualToIndex_ = + objc.registerName("indexLessThanOrEqualToIndex:"); +late final _sel_getIndexes_maxCount_inIndexRange_ = + objc.registerName("getIndexes:maxCount:inIndexRange:"); +final _objc_msgSend_119 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer<_NSRange>)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer<_NSRange>)>(); +late final _sel_countOfIndexesInRange_ = + objc.registerName("countOfIndexesInRange:"); +final _objc_msgSend_120 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_containsIndex_ = objc.registerName("containsIndex:"); +final _objc_msgSend_121 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_containsIndexesInRange_ = + objc.registerName("containsIndexesInRange:"); +final _objc_msgSend_122 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_containsIndexes_ = objc.registerName("containsIndexes:"); +late final _sel_intersectsIndexesInRange_ = + objc.registerName("intersectsIndexesInRange:"); +void _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() + .asFunction)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( + void Function(int, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_ffiUnsignedLong_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_ffiUnsignedLong_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_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.UnsignedLong arg0, ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiUnsignedLong_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_ffiUnsignedLong_bool.fromFunction( + void Function(int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( + (int arg0, ffi.Pointer arg1) => fn(arg0, arg1)))); + 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_ffiUnsignedLong_bool.listener( + void Function(int, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiUnsignedLong_bool_registerClosure( + (int arg0, ffi.Pointer arg1) => fn(arg0, arg1)))); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.UnsignedLong, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(int arg0, ffi.Pointer arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, int, + ffi.Pointer)>()(pointer, arg0, arg1); +} + +late final _sel_enumerateIndexesUsingBlock_ = + objc.registerName("enumerateIndexesUsingBlock:"); +final _objc_msgSend_123 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSEnumerationOptions { + static const int NSEnumerationConcurrent = 1; + static const int NSEnumerationReverse = 2; +} + +late final _sel_enumerateIndexesWithOptions_usingBlock_ = + objc.registerName("enumerateIndexesWithOptions:usingBlock:"); +final _objc_msgSend_124 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_enumerateIndexesInRange_options_usingBlock_ = + objc.registerName("enumerateIndexesInRange:options:usingBlock:"); +final _objc_msgSend_125 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +bool _ObjCBlock_bool_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() + .asFunction)>()(arg0, arg1); +final _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry = + )>{}; +int _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_bool_ffiUnsignedLong_bool_registerClosure( + bool Function(int, ffi.Pointer) fn) { + final id = ++_ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + int arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_bool_ffiUnsignedLong_bool extends objc.ObjCBlockBase { + ObjCBlock_bool_ffiUnsignedLong_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_bool_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi + .NativeFunction< + ffi.Bool Function( + ffi.UnsignedLong arg0, ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>( + _ObjCBlock_bool_ffiUnsignedLong_bool_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_ffiUnsignedLong_bool.fromFunction( + bool Function(int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function(ffi.Pointer, + ffi.UnsignedLong, ffi.Pointer)>( + _ObjCBlock_bool_ffiUnsignedLong_bool_closureTrampoline, + false) + .cast(), + _ObjCBlock_bool_ffiUnsignedLong_bool_registerClosure( + (int arg0, ffi.Pointer arg1) => fn(arg0, arg1)))); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(int arg0, ffi.Pointer arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer block, + ffi.UnsignedLong arg0, ffi.Pointer arg1)>>() + .asFunction< + bool Function(ffi.Pointer, int, + ffi.Pointer)>()(pointer, arg0, arg1); +} + +late final _sel_indexPassingTest_ = objc.registerName("indexPassingTest:"); +final _objc_msgSend_126 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexWithOptions_passingTest_ = + objc.registerName("indexWithOptions:passingTest:"); +final _objc_msgSend_127 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexInRange_options_passingTest_ = + objc.registerName("indexInRange:options:passingTest:"); +final _objc_msgSend_128 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +late final _sel_indexesPassingTest_ = objc.registerName("indexesPassingTest:"); +final _objc_msgSend_129 = 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_indexesWithOptions_passingTest_ = + objc.registerName("indexesWithOptions:passingTest:"); +final _objc_msgSend_130 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexesInRange_options_passingTest_ = + objc.registerName("indexesInRange:options:passingTest:"); +final _objc_msgSend_131 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline( + ffi.Pointer block, + _NSRange arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(_NSRange arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(_NSRange, ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry = + )>{}; +int _ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( + void Function(_NSRange, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline( + ffi.Pointer block, + _NSRange arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSRange_bool_closureRegistry[block.ref.target.address]!( + arg0, arg1); + +class ObjCBlock_ffiVoid_NSRange_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSRange_bool._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSRange_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSRange_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSRange_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(_NSRange arg0, ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSRange_bool.fromFunction( + void Function(_NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( + (_NSRange arg0, ffi.Pointer arg1) => + fn(arg0, arg1)))); + 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_NSRange_bool.listener( + void Function(_NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSRange_bool_registerClosure( + (_NSRange arg0, ffi.Pointer arg1) => + fn(arg0, arg1)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, _NSRange, ffi.Pointer)>? + _dartFuncListenerTrampoline; + + void call(_NSRange arg0, ffi.Pointer arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + _NSRange arg0, ffi.Pointer arg1)>>() + .asFunction< + void Function(ffi.Pointer, _NSRange, + ffi.Pointer)>()(pointer, arg0, arg1); +} + +late final _sel_enumerateRangesUsingBlock_ = + objc.registerName("enumerateRangesUsingBlock:"); +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_enumerateRangesWithOptions_usingBlock_ = + objc.registerName("enumerateRangesWithOptions:usingBlock:"); +final _objc_msgSend_133 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_enumerateRangesInRange_options_usingBlock_ = + objc.registerName("enumerateRangesInRange:options:usingBlock:"); +final _objc_msgSend_134 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +late final _sel_objectsAtIndexes_ = objc.registerName("objectsAtIndexes:"); +final _objc_msgSend_135 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_objectAtIndexedSubscript_ = + objc.registerName("objectAtIndexedSubscript:"); +void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_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); +final _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + void Function(ffi.Pointer, int, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = + fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.fromFunction( + void Function(NSObject, int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool.listener( + void Function(NSObject, int, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, + ffi.Pointer arg2) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject arg0, int 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, arg1, arg2); +} + +late final _sel_enumerateObjectsUsingBlock_ = + objc.registerName("enumerateObjectsUsingBlock:"); +final _objc_msgSend_136 = 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_enumerateObjectsWithOptions_usingBlock_ = + objc.registerName("enumerateObjectsWithOptions:usingBlock:"); +final _objc_msgSend_137 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_enumerateObjectsAtIndexes_options_usingBlock_ = + objc.registerName("enumerateObjectsAtIndexes:options:usingBlock:"); +final _objc_msgSend_138 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>>() + .asFunction< + bool Function(ffi.Pointer, int, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry = + , int, ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + bool Function(ffi.Pointer, int, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1, + ffi.Pointer arg2) => + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool + extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_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_bool_objcObjCObject_ffiUnsignedLong_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1, ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_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_objcObjCObject_ffiUnsignedLong_bool.fromFunction( + bool Function(NSObject, int, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_objcObjCObject_ffiUnsignedLong_bool_registerClosure( + (ffi.Pointer arg0, int arg1, ffi.Pointer arg2) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(NSObject arg0, int arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.UnsignedLong arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>()(pointer, arg0.pointer, arg1, arg2); +} + +late final _sel_indexOfObjectPassingTest_ = + objc.registerName("indexOfObjectPassingTest:"); +final _objc_msgSend_139 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_indexOfObjectWithOptions_passingTest_ = + objc.registerName("indexOfObjectWithOptions:passingTest:"); +final _objc_msgSend_140 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexOfObjectAtIndexes_options_passingTest_ = + objc.registerName("indexOfObjectAtIndexes:options:passingTest:"); +final _objc_msgSend_141 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexesOfObjectsPassingTest_ = + objc.registerName("indexesOfObjectsPassingTest:"); +final _objc_msgSend_142 = 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_indexesOfObjectsWithOptions_passingTest_ = + objc.registerName("indexesOfObjectsWithOptions:passingTest:"); +final _objc_msgSend_143 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_indexesOfObjectsAtIndexes_options_passingTest_ = + objc.registerName("indexesOfObjectsAtIndexes:options:passingTest:"); +final _objc_msgSend_144 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer)>()(arg0, arg1); +final _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_registerClosure( + int Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistryIndex; + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry[ + id] = fn; + return ffi.Pointer.fromAddress(id); +} + +int _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject + extends objc.ObjCBlockBase { + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._( + 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_NSComparisonResult_objcObjCObject_objcObjCObject + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) { + return ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject._(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_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_fnPtrTrampoline, + 0) + .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_NSComparisonResult_objcObjCObject_objcObjCObject.fromFunction( + int Function(NSObject, NSObject) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_closureTrampoline, 0) + .cast(), + _ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), NSObject.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + int call(NSObject arg0, NSObject arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer); +} + +late final _sel_sortedArrayUsingComparator_ = + objc.registerName("sortedArrayUsingComparator:"); +final _objc_msgSend_145 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSSortOptions { + static const int NSSortConcurrent = 1; + static const int NSSortStable = 16; +} + +late final _sel_sortedArrayWithOptions_usingComparator_ = + objc.registerName("sortedArrayWithOptions:usingComparator:"); +final _objc_msgSend_146 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +abstract class NSBinarySearchingOptions { + static const int NSBinarySearchingFirstEqual = 256; + static const int NSBinarySearchingLastEqual = 512; + static const int NSBinarySearchingInsertionIndex = 1024; +} + +late final _sel_indexOfObject_inSortedRange_options_usingComparator_ = + objc.registerName("indexOfObject:inSortedRange:options:usingComparator:"); +final _objc_msgSend_147 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +late final _sel_array = objc.registerName("array"); +late final _sel_arrayWithObject_ = objc.registerName("arrayWithObject:"); +final _objc_msgSend_148 = 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_arrayWithObjects_count_ = + objc.registerName("arrayWithObjects:count:"); +late final _sel_arrayWithObjects_ = objc.registerName("arrayWithObjects:"); +late final _sel_arrayWithArray_ = objc.registerName("arrayWithArray:"); +final _objc_msgSend_149 = 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_initWithObjects_ = objc.registerName("initWithObjects:"); +late final _sel_initWithArray_ = objc.registerName("initWithArray:"); +late final _sel_initWithArray_copyItems_ = + objc.registerName("initWithArray:copyItems:"); +final _objc_msgSend_150 = 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_initWithContentsOfURL_error_ = + objc.registerName("initWithContentsOfURL:error:"); +final _objc_msgSend_151 = 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_arrayWithContentsOfURL_error_ = + objc.registerName("arrayWithContentsOfURL:error:"); + +abstract class NSOrderedCollectionDifferenceCalculationOptions { + static const int NSOrderedCollectionDifferenceCalculationOmitInsertedObjects = + 1; + static const int NSOrderedCollectionDifferenceCalculationOmitRemovedObjects = + 2; + static const int NSOrderedCollectionDifferenceCalculationInferMoves = 4; +} + +bool _ObjCBlock_bool_objcObjCObject_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); +final _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_objcObjCObject_registerClosure( + bool Function( + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_bool_objcObjCObject_objcObjCObject extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_objcObjCObject._( + 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_objcObjCObject_objcObjCObject castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_objcObjCObject._(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_objcObjCObject_objcObjCObject.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_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_objcObjCObject_objcObjCObject.fromFunction( + bool Function(NSObject, NSObject) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_objcObjCObject_objcObjCObject_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), NSObject.castFromPointer(arg1, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(NSObject arg0, NSObject 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_differenceFromArray_withOptions_usingEquivalenceTest_ = + objc.registerName("differenceFromArray:withOptions:usingEquivalenceTest:"); +final _objc_msgSend_152 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_differenceFromArray_withOptions_ = + objc.registerName("differenceFromArray:withOptions:"); +final _objc_msgSend_153 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_differenceFromArray_ = + objc.registerName("differenceFromArray:"); +late final _sel_arrayByApplyingDifference_ = + objc.registerName("arrayByApplyingDifference:"); +final _objc_msgSend_154 = 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_getObjects_ = objc.registerName("getObjects:"); +final _objc_msgSend_155 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); +late final _sel_arrayWithContentsOfFile_ = + objc.registerName("arrayWithContentsOfFile:"); +final _objc_msgSend_156 = 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_arrayWithContentsOfURL_ = + objc.registerName("arrayWithContentsOfURL:"); +final _objc_msgSend_157 = 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_initWithContentsOfFile_ = + objc.registerName("initWithContentsOfFile:"); +late final _sel_initWithContentsOfURL_ = + objc.registerName("initWithContentsOfURL:"); +late final _sel_writeToURL_atomically_ = + objc.registerName("writeToURL:atomically:"); +final _objc_msgSend_158 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool)>(); +late final _sel_resourceValuesForKeys_error_ = + objc.registerName("resourceValuesForKeys:error:"); +final _objc_msgSend_159 = 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_setResourceValue_forKey_error_ = + objc.registerName("setResourceValue:forKey:error:"); +final _objc_msgSend_160 = 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_setResourceValues_error_ = + objc.registerName("setResourceValues:error:"); +final _objc_msgSend_161 = 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_removeCachedResourceValueForKey_ = + objc.registerName("removeCachedResourceValueForKey:"); +final _objc_msgSend_162 = 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_removeAllCachedResourceValues = + objc.registerName("removeAllCachedResourceValues"); +late final _sel_setTemporaryResourceValue_forKey_ = + objc.registerName("setTemporaryResourceValue:forKey:"); +final _objc_msgSend_163 = 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)>(); + +abstract class NSURLBookmarkCreationOptions { + static const int NSURLBookmarkCreationPreferFileIDResolution = 256; + static const int NSURLBookmarkCreationMinimalBookmark = 512; + static const int NSURLBookmarkCreationSuitableForBookmarkFile = 1024; + static const int NSURLBookmarkCreationWithSecurityScope = 2048; + static const int NSURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 4096; + static const int NSURLBookmarkCreationWithoutImplicitSecurityScope = + 536870912; +} + +late final _sel_bookmarkDataWithOptions_includingResourceValuesForKeys_relativeToURL_error_ = + objc.registerName( + "bookmarkDataWithOptions:includingResourceValuesForKeys:relativeToURL:error:"); +final _objc_msgSend_164 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>)>(); + +abstract class NSURLBookmarkResolutionOptions { + static const int NSURLBookmarkResolutionWithoutUI = 256; + static const int NSURLBookmarkResolutionWithoutMounting = 512; + static const int NSURLBookmarkResolutionWithSecurityScope = 1024; + static const int NSURLBookmarkResolutionWithoutImplicitStartAccessing = 32768; +} + +late final _sel_initByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ = + objc.registerName( + "initByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); +final _objc_msgSend_165 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + 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_URLByResolvingBookmarkData_options_relativeToURL_bookmarkDataIsStale_error_ = + objc.registerName( + "URLByResolvingBookmarkData:options:relativeToURL:bookmarkDataIsStale:error:"); +late final _sel_resourceValuesForKeys_fromBookmarkData_ = + objc.registerName("resourceValuesForKeys:fromBookmarkData:"); +final _objc_msgSend_166 = 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_writeBookmarkData_toURL_options_error_ = + objc.registerName("writeBookmarkData:toURL:options:error:"); +final _objc_msgSend_167 = 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_bookmarkDataWithContentsOfURL_error_ = + objc.registerName("bookmarkDataWithContentsOfURL:error:"); +final _objc_msgSend_168 = 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_URLByResolvingAliasFileAtURL_options_error_ = + objc.registerName("URLByResolvingAliasFileAtURL:options:error:"); +final _objc_msgSend_169 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_startAccessingSecurityScopedResource = + objc.registerName("startAccessingSecurityScopedResource"); +late final _sel_stopAccessingSecurityScopedResource = + objc.registerName("stopAccessingSecurityScopedResource"); +late final _sel_getPromisedItemResourceValue_forKey_error_ = + objc.registerName("getPromisedItemResourceValue:forKey:error:"); + +class NSDictionary extends NSObject { + NSDictionary._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSDictionary] that points to the same underlying object as [other]. + NSDictionary.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSDictionary] that wraps the given raw object pointer. + NSDictionary.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSDictionary]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSDictionary); + } + + int get count { + return _objc_msgSend_12(this.pointer, _sel_count); + } + + NSObject? objectForKey_(NSObject aKey) { + final _ret = + _objc_msgSend_170(this.pointer, _sel_objectForKey_, aKey.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSEnumerator keyEnumerator() { + final _ret = _objc_msgSend_108(this.pointer, _sel_keyEnumerator); + return NSEnumerator.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSDictionary init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary initWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _objc_msgSend_171( + this.pointer, _sel_initWithObjects_forKeys_count_, objects, keys, cnt); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSArray get allKeys { + final _ret = _objc_msgSend_172(this.pointer, _sel_allKeys); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray allKeysForObject_(NSObject anObject) { + final _ret = _objc_msgSend_99( + this.pointer, _sel_allKeysForObject_, anObject.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray get allValues { + final _ret = _objc_msgSend_172(this.pointer, _sel_allValues); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSString get description { + final _ret = _objc_msgSend_32(this.pointer, _sel_description); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString get descriptionInStringsFileFormat { + final _ret = + _objc_msgSend_32(this.pointer, _sel_descriptionInStringsFileFormat); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _objc_msgSend_93(this.pointer, _sel_descriptionWithLocale_, + locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString descriptionWithLocale_indent_(NSObject? locale, int level) { + final _ret = _objc_msgSend_102( + this.pointer, + _sel_descriptionWithLocale_indent_, + locale?.pointer ?? ffi.nullptr, + level); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool isEqualToDictionary_(NSDictionary otherDictionary) { + return _objc_msgSend_173( + this.pointer, _sel_isEqualToDictionary_, otherDictionary.pointer); + } + + NSEnumerator objectEnumerator() { + final _ret = _objc_msgSend_108(this.pointer, _sel_objectEnumerator); + return NSEnumerator.castFromPointer(_ret, retain: true, release: true); + } + + NSArray objectsForKeys_notFoundMarker_(NSArray keys, NSObject marker) { + final _ret = _objc_msgSend_174(this.pointer, + _sel_objectsForKeys_notFoundMarker_, keys.pointer, marker.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + bool writeToURL_error_( + NSURL url, ffi.Pointer> error) { + return _objc_msgSend_113( + this.pointer, _sel_writeToURL_error_, url.pointer, error); + } + + NSArray keysSortedByValueUsingSelector_( + ffi.Pointer comparator) { + final _ret = _objc_msgSend_111( + this.pointer, _sel_keysSortedByValueUsingSelector_, comparator); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + void getObjects_andKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int count) { + _objc_msgSend_175( + this.pointer, _sel_getObjects_andKeys_count_, objects, keys, count); + } + + NSObject? objectForKeyedSubscript_(NSObject key) { + final _ret = _objc_msgSend_170( + this.pointer, _sel_objectForKeyedSubscript_, key.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void enumerateKeysAndObjectsUsingBlock_( + ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool block) { + _objc_msgSend_176( + this.pointer, _sel_enumerateKeysAndObjectsUsingBlock_, block.pointer); + } + + void enumerateKeysAndObjectsWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool block) { + _objc_msgSend_177( + this.pointer, + _sel_enumerateKeysAndObjectsWithOptions_usingBlock_, + opts, + block.pointer); + } + + NSArray keysSortedByValueUsingComparator_( + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_145( + this.pointer, _sel_keysSortedByValueUsingComparator_, cmptr.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray keysSortedByValueWithOptions_usingComparator_(int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + final _ret = _objc_msgSend_146( + this.pointer, + _sel_keysSortedByValueWithOptions_usingComparator_, + opts, + cmptr.pointer); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSObject keysOfEntriesPassingTest_( + ObjCBlock_bool_objcObjCObject_objcObjCObject_bool predicate) { + final _ret = _objc_msgSend_178( + this.pointer, _sel_keysOfEntriesPassingTest_, predicate.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject keysOfEntriesWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_objcObjCObject_bool predicate) { + final _ret = _objc_msgSend_179(this.pointer, + _sel_keysOfEntriesWithOptions_passingTest_, opts, predicate.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + void getObjects_andKeys_(ffi.Pointer> objects, + ffi.Pointer> keys) { + _objc_msgSend_180(this.pointer, _sel_getObjects_andKeys_, objects, keys); + } + + static NSDictionary? dictionaryWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_181( + _class_NSDictionary, _sel_dictionaryWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSDictionary? dictionaryWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_182( + _class_NSDictionary, _sel_dictionaryWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary? initWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_181( + this.pointer, _sel_initWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary? initWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_182( + this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + bool writeToFile_atomically_(NSString path, bool useAuxiliaryFile) { + return _objc_msgSend_37(this.pointer, _sel_writeToFile_atomically_, + path.pointer, useAuxiliaryFile); + } + + bool writeToURL_atomically_(NSURL url, bool atomically) { + return _objc_msgSend_158( + this.pointer, _sel_writeToURL_atomically_, url.pointer, atomically); + } + + static NSDictionary dictionary() { + final _ret = _objc_msgSend_2(_class_NSDictionary, _sel_dictionary); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSDictionary dictionaryWithObject_forKey_( + NSObject object, NSObject key) { + final _ret = _objc_msgSend_183(_class_NSDictionary, + _sel_dictionaryWithObject_forKey_, object.pointer, key.pointer); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSDictionary dictionaryWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _objc_msgSend_171(_class_NSDictionary, + _sel_dictionaryWithObjects_forKeys_count_, objects, keys, cnt); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSDictionary dictionaryWithObjectsAndKeys_(NSObject firstObject) { + final _ret = _objc_msgSend_148(_class_NSDictionary, + _sel_dictionaryWithObjectsAndKeys_, firstObject.pointer); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSDictionary dictionaryWithDictionary_(NSDictionary dict) { + final _ret = _objc_msgSend_184( + _class_NSDictionary, _sel_dictionaryWithDictionary_, dict.pointer); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSDictionary dictionaryWithObjects_forKeys_( + NSArray objects, NSArray keys) { + final _ret = _objc_msgSend_185(_class_NSDictionary, + _sel_dictionaryWithObjects_forKeys_, objects.pointer, keys.pointer); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary initWithObjectsAndKeys_(NSObject firstObject) { + final _ret = _objc_msgSend_148( + this.pointer, _sel_initWithObjectsAndKeys_, firstObject.pointer); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary initWithDictionary_(NSDictionary otherDictionary) { + final _ret = _objc_msgSend_184( + this.pointer, _sel_initWithDictionary_, otherDictionary.pointer); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary initWithDictionary_copyItems_( + NSDictionary otherDictionary, bool flag) { + final _ret = _objc_msgSend_186(this.pointer, + _sel_initWithDictionary_copyItems_, otherDictionary.pointer, flag); + return NSDictionary.castFromPointer(_ret, retain: false, release: true); + } + + NSDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { + final _ret = _objc_msgSend_185(this.pointer, _sel_initWithObjects_forKeys_, + objects.pointer, keys.pointer); + return NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary? initWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_187( + this.pointer, _sel_initWithContentsOfURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSDictionary? dictionaryWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_187(_class_NSDictionary, + _sel_dictionaryWithContentsOfURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject sharedKeySetForKeys_(NSArray keys) { + final _ret = _objc_msgSend_149( + _class_NSDictionary, _sel_sharedKeySetForKeys_, keys.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + int countByEnumeratingWithState_objects_count_( + ffi.Pointer state, + ffi.Pointer> buffer, + int len) { + return _objc_msgSend_188(this.pointer, + _sel_countByEnumeratingWithState_objects_count_, state, buffer, len); + } + + static NSDictionary new1() { + final _ret = _objc_msgSend_2(_class_NSDictionary, _sel_new); + return NSDictionary.castFromPointer(_ret, retain: false, release: true); + } + + static NSDictionary allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSDictionary, _sel_allocWithZone_, zone); + return NSDictionary.castFromPointer(_ret, retain: false, release: true); + } + + static NSDictionary alloc() { + final _ret = _objc_msgSend_2(_class_NSDictionary, _sel_alloc); + return NSDictionary.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSDictionary = objc.getClass("NSDictionary"); +late final _sel_objectForKey_ = objc.registerName("objectForKey:"); +final _objc_msgSend_170 = 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_keyEnumerator = objc.registerName("keyEnumerator"); +late final _sel_initWithObjects_forKeys_count_ = + objc.registerName("initWithObjects:forKeys:count:"); +final _objc_msgSend_171 = 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_allKeys = objc.registerName("allKeys"); +final _objc_msgSend_172 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_allKeysForObject_ = objc.registerName("allKeysForObject:"); +late final _sel_allValues = objc.registerName("allValues"); +late final _sel_descriptionInStringsFileFormat = + objc.registerName("descriptionInStringsFileFormat"); +late final _sel_isEqualToDictionary_ = + objc.registerName("isEqualToDictionary:"); +final _objc_msgSend_173 = 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_objectsForKeys_notFoundMarker_ = + objc.registerName("objectsForKeys:notFoundMarker:"); +final _objc_msgSend_174 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>(); +late final _sel_keysSortedByValueUsingSelector_ = + objc.registerName("keysSortedByValueUsingSelector:"); +late final _sel_getObjects_andKeys_count_ = + objc.registerName("getObjects:andKeys:count:"); +final _objc_msgSend_175 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer>, + int)>(); +late final _sel_objectForKeyedSubscript_ = + objc.registerName("objectForKeyedSubscript:"); +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); +final _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureRegistry = + , + ffi.Pointer, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_registerClosure( + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureRegistry[id] = + fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool.fromFunction( + void Function(NSObject, NSObject, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), NSObject.castFromPointer(arg1, retain: true, release: true), arg2)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool.listener( + void Function(NSObject, NSObject, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_objcObjCObject_bool_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), NSObject.castFromPointer(arg1, retain: true, release: true), arg2)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer, arg2); +} + +late final _sel_enumerateKeysAndObjectsUsingBlock_ = + objc.registerName("enumerateKeysAndObjectsUsingBlock:"); +final _objc_msgSend_176 = 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_enumerateKeysAndObjectsWithOptions_usingBlock_ = + objc.registerName("enumerateKeysAndObjectsWithOptions:usingBlock:"); +final _objc_msgSend_177 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_keysSortedByValueUsingComparator_ = + objc.registerName("keysSortedByValueUsingComparator:"); +late final _sel_keysSortedByValueWithOptions_usingComparator_ = + objc.registerName("keysSortedByValueWithOptions:usingComparator:"); +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()(arg0, arg1, arg2); +final _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureRegistry = , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_registerClosure( + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_bool_objcObjCObject_objcObjCObject_bool + extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_objcObjCObject_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_bool_objcObjCObject_objcObjCObject_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_objcObjCObject_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_objcObjCObject_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_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_objcObjCObject_objcObjCObject_bool.fromFunction( + bool Function(NSObject, NSObject, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_objcObjCObject_objcObjCObject_bool_registerClosure((ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), NSObject.castFromPointer(arg1, retain: true, release: true), arg2)))); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(NSObject arg0, NSObject arg1, ffi.Pointer arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer, arg2); +} + +late final _sel_keysOfEntriesPassingTest_ = + objc.registerName("keysOfEntriesPassingTest:"); +final _objc_msgSend_178 = 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_keysOfEntriesWithOptions_passingTest_ = + objc.registerName("keysOfEntriesWithOptions:passingTest:"); +final _objc_msgSend_179 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_getObjects_andKeys_ = objc.registerName("getObjects:andKeys:"); +final _objc_msgSend_180 = 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_dictionaryWithContentsOfFile_ = + objc.registerName("dictionaryWithContentsOfFile:"); +final _objc_msgSend_181 = 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_dictionaryWithContentsOfURL_ = + objc.registerName("dictionaryWithContentsOfURL:"); +final _objc_msgSend_182 = 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_dictionary = objc.registerName("dictionary"); +late final _sel_dictionaryWithObject_forKey_ = + objc.registerName("dictionaryWithObject:forKey:"); +final _objc_msgSend_183 = 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_dictionaryWithObjects_forKeys_count_ = + objc.registerName("dictionaryWithObjects:forKeys:count:"); +late final _sel_dictionaryWithObjectsAndKeys_ = + objc.registerName("dictionaryWithObjectsAndKeys:"); +late final _sel_dictionaryWithDictionary_ = + objc.registerName("dictionaryWithDictionary:"); +final _objc_msgSend_184 = 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_dictionaryWithObjects_forKeys_ = + objc.registerName("dictionaryWithObjects:forKeys:"); +final _objc_msgSend_185 = 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_initWithObjectsAndKeys_ = + objc.registerName("initWithObjectsAndKeys:"); +late final _sel_initWithDictionary_ = objc.registerName("initWithDictionary:"); +late final _sel_initWithDictionary_copyItems_ = + objc.registerName("initWithDictionary:copyItems:"); +final _objc_msgSend_186 = 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_initWithObjects_forKeys_ = + objc.registerName("initWithObjects:forKeys:"); +final _objc_msgSend_187 = 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_dictionaryWithContentsOfURL_error_ = + objc.registerName("dictionaryWithContentsOfURL:error:"); +late final _sel_sharedKeySetForKeys_ = + objc.registerName("sharedKeySetForKeys:"); + +final class NSFastEnumerationState extends ffi.Struct { + @ffi.UnsignedLong() + external int state; + + external ffi.Pointer> itemsPtr; + + external ffi.Pointer mutationsPtr; + + @ffi.Array.multi([5]) + external ffi.Array extra; +} + +late final _sel_countByEnumeratingWithState_objects_count_ = + objc.registerName("countByEnumeratingWithState:objects:count:"); +final _objc_msgSend_188 = 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)>(); +late final _sel_promisedItemResourceValuesForKeys_error_ = + objc.registerName("promisedItemResourceValuesForKeys:error:"); +final _objc_msgSend_189 = 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_checkPromisedItemIsReachableAndReturnError_ = + objc.registerName("checkPromisedItemIsReachableAndReturnError:"); +final _objc_msgSend_190 = 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_fileURLWithPathComponents_ = + objc.registerName("fileURLWithPathComponents:"); +final _objc_msgSend_191 = 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_pathComponents = objc.registerName("pathComponents"); +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_lastPathComponent = objc.registerName("lastPathComponent"); +late final _sel_pathExtension = objc.registerName("pathExtension"); +late final _sel_URLByAppendingPathComponent_ = + objc.registerName("URLByAppendingPathComponent:"); +final _objc_msgSend_193 = 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_URLByAppendingPathComponent_isDirectory_ = + objc.registerName("URLByAppendingPathComponent:isDirectory:"); +final _objc_msgSend_194 = 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_URLByDeletingLastPathComponent = + objc.registerName("URLByDeletingLastPathComponent"); +late final _sel_URLByAppendingPathExtension_ = + objc.registerName("URLByAppendingPathExtension:"); +late final _sel_URLByDeletingPathExtension = + objc.registerName("URLByDeletingPathExtension"); +late final _sel_checkResourceIsReachableAndReturnError_ = + objc.registerName("checkResourceIsReachableAndReturnError:"); +late final _sel_URLByStandardizingPath = + objc.registerName("URLByStandardizingPath"); +late final _sel_URLByResolvingSymlinksInPath = + objc.registerName("URLByResolvingSymlinksInPath"); +late final _sel_resourceDataUsingCache_ = + objc.registerName("resourceDataUsingCache:"); +final _objc_msgSend_195 = 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_loadResourceDataNotifyingClient_usingCache_ = + objc.registerName("loadResourceDataNotifyingClient:usingCache:"); +final _objc_msgSend_196 = 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_propertyForKey_ = objc.registerName("propertyForKey:"); +late final _sel_setResourceData_ = objc.registerName("setResourceData:"); +late final _sel_setProperty_forKey_ = objc.registerName("setProperty:forKey:"); +final _objc_msgSend_197 = 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)>(); + +class NSURLHandle extends NSObject { + NSURLHandle._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSURLHandle] that points to the same underlying object as [other]. + NSURLHandle.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSURLHandle] that wraps the given raw object pointer. + NSURLHandle.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSURLHandle]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSURLHandle); + } + + static void registerURLHandleClass_(NSObject anURLHandleSubclass) { + _objc_msgSend_198(_class_NSURLHandle, _sel_registerURLHandleClass_, + anURLHandleSubclass.pointer); + } + + static NSObject URLHandleClassForURL_(NSURL anURL) { + final _ret = _objc_msgSend_199( + _class_NSURLHandle, _sel_URLHandleClassForURL_, anURL.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + int status() { + return _objc_msgSend_200(this.pointer, _sel_status); + } + + NSString failureReason() { + final _ret = _objc_msgSend_32(this.pointer, _sel_failureReason); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + void addClient_(NSObject client) { + _objc_msgSend_198(this.pointer, _sel_addClient_, client.pointer); + } + + void removeClient_(NSObject client) { + _objc_msgSend_198(this.pointer, _sel_removeClient_, client.pointer); + } + + void loadInBackground() { + _objc_msgSend_1(this.pointer, _sel_loadInBackground); + } + + void cancelLoadInBackground() { + _objc_msgSend_1(this.pointer, _sel_cancelLoadInBackground); + } + + NSData resourceData() { + final _ret = _objc_msgSend_54(this.pointer, _sel_resourceData); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + NSData availableResourceData() { + final _ret = _objc_msgSend_54(this.pointer, _sel_availableResourceData); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + int expectedResourceDataSize() { + return _objc_msgSend_87(this.pointer, _sel_expectedResourceDataSize); + } + + void flushCachedData() { + _objc_msgSend_1(this.pointer, _sel_flushCachedData); + } + + void backgroundLoadDidFailWithReason_(NSString reason) { + _objc_msgSend_162( + this.pointer, _sel_backgroundLoadDidFailWithReason_, reason.pointer); + } + + void didLoadBytes_loadComplete_(NSData newBytes, bool yorn) { + _objc_msgSend_201( + this.pointer, _sel_didLoadBytes_loadComplete_, newBytes.pointer, yorn); + } + + static bool canInitWithURL_(NSURL anURL) { + return _objc_msgSend_202( + _class_NSURLHandle, _sel_canInitWithURL_, anURL.pointer); + } + + static NSURLHandle cachedHandleForURL_(NSURL anURL) { + final _ret = _objc_msgSend_203( + _class_NSURLHandle, _sel_cachedHandleForURL_, anURL.pointer); + return NSURLHandle.castFromPointer(_ret, retain: true, release: true); + } + + NSObject initWithURL_cached_(NSURL anURL, bool willCache) { + final _ret = _objc_msgSend_204( + this.pointer, _sel_initWithURL_cached_, anURL.pointer, willCache); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject propertyForKey_(NSString propertyKey) { + final _ret = _objc_msgSend_42( + this.pointer, _sel_propertyForKey_, propertyKey.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSObject propertyForKeyIfAvailable_(NSString propertyKey) { + final _ret = _objc_msgSend_42( + this.pointer, _sel_propertyForKeyIfAvailable_, propertyKey.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool writeProperty_forKey_(NSObject propertyValue, NSString propertyKey) { + return _objc_msgSend_197(this.pointer, _sel_writeProperty_forKey_, + propertyValue.pointer, propertyKey.pointer); + } + + bool writeData_(NSData data) { + return _objc_msgSend_35(this.pointer, _sel_writeData_, data.pointer); + } + + NSData loadInForeground() { + final _ret = _objc_msgSend_54(this.pointer, _sel_loadInForeground); + return NSData.castFromPointer(_ret, retain: true, release: true); + } + + void beginLoadInBackground() { + _objc_msgSend_1(this.pointer, _sel_beginLoadInBackground); + } + + void endLoadInBackground() { + _objc_msgSend_1(this.pointer, _sel_endLoadInBackground); + } + + @override + NSURLHandle init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSURLHandle.castFromPointer(_ret, retain: true, release: true); + } + + static NSURLHandle new1() { + final _ret = _objc_msgSend_2(_class_NSURLHandle, _sel_new); + return NSURLHandle.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLHandle allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSURLHandle, _sel_allocWithZone_, zone); + return NSURLHandle.castFromPointer(_ret, retain: false, release: true); + } + + static NSURLHandle alloc() { + final _ret = _objc_msgSend_2(_class_NSURLHandle, _sel_alloc); + return NSURLHandle.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSURLHandle = objc.getClass("NSURLHandle"); +late final _sel_registerURLHandleClass_ = + objc.registerName("registerURLHandleClass:"); +final _objc_msgSend_198 = 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_URLHandleClassForURL_ = + objc.registerName("URLHandleClassForURL:"); +final _objc_msgSend_199 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); + +abstract class NSURLHandleStatus { + static const int NSURLHandleNotLoaded = 0; + static const int NSURLHandleLoadSucceeded = 1; + static const int NSURLHandleLoadInProgress = 2; + static const int NSURLHandleLoadFailed = 3; +} + +late final _sel_status = objc.registerName("status"); +final _objc_msgSend_200 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_failureReason = objc.registerName("failureReason"); +late final _sel_addClient_ = objc.registerName("addClient:"); +late final _sel_removeClient_ = objc.registerName("removeClient:"); +late final _sel_loadInBackground = objc.registerName("loadInBackground"); +late final _sel_cancelLoadInBackground = + objc.registerName("cancelLoadInBackground"); +late final _sel_resourceData = objc.registerName("resourceData"); +late final _sel_availableResourceData = + objc.registerName("availableResourceData"); +late final _sel_expectedResourceDataSize = + objc.registerName("expectedResourceDataSize"); +late final _sel_flushCachedData = objc.registerName("flushCachedData"); +late final _sel_backgroundLoadDidFailWithReason_ = + objc.registerName("backgroundLoadDidFailWithReason:"); +late final _sel_didLoadBytes_loadComplete_ = + objc.registerName("didLoadBytes:loadComplete:"); +final _objc_msgSend_201 = 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_canInitWithURL_ = objc.registerName("canInitWithURL:"); +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_cachedHandleForURL_ = objc.registerName("cachedHandleForURL:"); +final _objc_msgSend_203 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_initWithURL_cached_ = objc.registerName("initWithURL:cached:"); +final _objc_msgSend_204 = 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_propertyForKeyIfAvailable_ = + objc.registerName("propertyForKeyIfAvailable:"); +late final _sel_writeProperty_forKey_ = + objc.registerName("writeProperty:forKey:"); +late final _sel_writeData_ = objc.registerName("writeData:"); +late final _sel_loadInForeground = objc.registerName("loadInForeground"); +late final _sel_beginLoadInBackground = + objc.registerName("beginLoadInBackground"); +late final _sel_endLoadInBackground = objc.registerName("endLoadInBackground"); +late final _sel_URLHandleUsingCache_ = + objc.registerName("URLHandleUsingCache:"); +final _objc_msgSend_205 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, bool)>(); + +abstract class NSDataWritingOptions { + static const int NSDataWritingAtomic = 1; + static const int NSDataWritingWithoutOverwriting = 2; + static const int NSDataWritingFileProtectionNone = 268435456; + static const int NSDataWritingFileProtectionComplete = 536870912; + static const int NSDataWritingFileProtectionCompleteUnlessOpen = 805306368; + static const int + NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication = + 1073741824; + static const int NSDataWritingFileProtectionCompleteWhenUserInactive = + 1342177280; + static const int NSDataWritingFileProtectionMask = 4026531840; + static const int NSAtomicWrite = 1; +} + +late final _sel_writeToFile_options_error_ = + objc.registerName("writeToFile:options:error:"); +final _objc_msgSend_206 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_writeToURL_options_error_ = + objc.registerName("writeToURL:options:error:"); +final _objc_msgSend_207 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); + +abstract class NSDataSearchOptions { + static const int NSDataSearchBackwards = 1; + static const int NSDataSearchAnchored = 2; +} + +late final _sel_rangeOfData_options_range_ = + objc.registerName("rangeOfData:options:range:"); +final _objc_msgSend_208 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +final _objc_msgSend_208Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +void _ObjCBlock_ffiVoid_ffiVoid_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); +final _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry = , _NSRange, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( + void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_ffiVoid_NSRange_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_ffiVoid_NSRange_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_ffiVoid_NSRange_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.fromFunction( + void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(arg0, arg1, arg2)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiVoid_NSRange_bool.listener( + void Function(ffi.Pointer, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiVoid_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + ffi.Pointer arg2) => + fn(arg0, arg1, arg2)))); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + _NSRange, ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(ffi.Pointer 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, arg1, arg2); +} + +late final _sel_enumerateByteRangesUsingBlock_ = + objc.registerName("enumerateByteRangesUsingBlock:"); +final _objc_msgSend_209 = 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_data = objc.registerName("data"); +late final _sel_dataWithBytes_length_ = + objc.registerName("dataWithBytes:length:"); +final _objc_msgSend_210 = 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_dataWithBytesNoCopy_length_ = + objc.registerName("dataWithBytesNoCopy:length:"); +late final _sel_dataWithBytesNoCopy_length_freeWhenDone_ = + objc.registerName("dataWithBytesNoCopy:length:freeWhenDone:"); +final _objc_msgSend_211 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + bool)>(); + +abstract class NSDataReadingOptions { + static const int NSDataReadingMappedIfSafe = 1; + static const int NSDataReadingUncached = 2; + static const int NSDataReadingMappedAlways = 8; + static const int NSDataReadingMapped = 1; + static const int NSMappedRead = 1; + static const int NSUncachedRead = 2; +} + +late final _sel_dataWithContentsOfFile_options_error_ = + objc.registerName("dataWithContentsOfFile:options:error:"); +final _objc_msgSend_212 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_dataWithContentsOfURL_options_error_ = + objc.registerName("dataWithContentsOfURL:options:error:"); +final _objc_msgSend_213 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_dataWithContentsOfFile_ = + objc.registerName("dataWithContentsOfFile:"); +late final _sel_dataWithContentsOfURL_ = + objc.registerName("dataWithContentsOfURL:"); +final _objc_msgSend_214 = 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_initWithBytes_length_ = + objc.registerName("initWithBytes:length:"); +late final _sel_initWithBytesNoCopy_length_ = + objc.registerName("initWithBytesNoCopy:length:"); +late final _sel_initWithBytesNoCopy_length_freeWhenDone_ = + objc.registerName("initWithBytesNoCopy:length:freeWhenDone:"); +void _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, ffi.UnsignedLong arg1)>>() + .asFunction, int)>()(arg0, arg1); +final _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry = + , int)>{}; +int _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( + void Function(ffi.Pointer, int) fn) { + final id = ++_ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistryIndex; + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1) => + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong._( + 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_ffiVoid_ffiUnsignedLong castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong._(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_ffiVoid_ffiUnsignedLong.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, ffi.UnsignedLong arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>( + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_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_ffiVoid_ffiUnsignedLong.fromFunction( + void Function(ffi.Pointer, int) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>( + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1)))); + 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_ffiVoid_ffiUnsignedLong.listener( + void Function(ffi.Pointer, int) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>.listener( + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong_registerClosure( + (ffi.Pointer arg0, int arg1) => fn(arg0, arg1)))); + static ffi.NativeCallable< + ffi.Void Function(ffi.Pointer, ffi.Pointer, + ffi.UnsignedLong)>? _dartFuncListenerTrampoline; + + void call(ffi.Pointer arg0, int arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer block, + ffi.Pointer arg0, ffi.UnsignedLong arg1)>>() + .asFunction< + void Function(ffi.Pointer, ffi.Pointer, + int)>()(pointer, arg0, arg1); +} + +late final _sel_initWithBytesNoCopy_length_deallocator_ = + objc.registerName("initWithBytesNoCopy:length:deallocator:"); +final _objc_msgSend_215 = 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_initWithContentsOfFile_options_error_ = + objc.registerName("initWithContentsOfFile:options:error:"); +late final _sel_initWithContentsOfURL_options_error_ = + objc.registerName("initWithContentsOfURL:options:error:"); +late final _sel_initWithData_ = objc.registerName("initWithData:"); +final _objc_msgSend_216 = 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_dataWithData_ = objc.registerName("dataWithData:"); + +abstract class NSDataBase64DecodingOptions { + static const int NSDataBase64DecodingIgnoreUnknownCharacters = 1; +} + +late final _sel_initWithBase64EncodedString_options_ = + objc.registerName("initWithBase64EncodedString:options:"); +final _objc_msgSend_217 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); + +abstract class NSDataBase64EncodingOptions { + static const int NSDataBase64Encoding64CharacterLineLength = 1; + static const int NSDataBase64Encoding76CharacterLineLength = 2; + static const int NSDataBase64EncodingEndLineWithCarriageReturn = 16; + static const int NSDataBase64EncodingEndLineWithLineFeed = 32; +} + +late final _sel_base64EncodedStringWithOptions_ = + objc.registerName("base64EncodedStringWithOptions:"); +final _objc_msgSend_218 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_initWithBase64EncodedData_options_ = + objc.registerName("initWithBase64EncodedData:options:"); +final _objc_msgSend_219 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_base64EncodedDataWithOptions_ = + objc.registerName("base64EncodedDataWithOptions:"); +final _objc_msgSend_220 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); + +abstract class NSDataCompressionAlgorithm { + static const int NSDataCompressionAlgorithmLZFSE = 0; + static const int NSDataCompressionAlgorithmLZ4 = 1; + static const int NSDataCompressionAlgorithmLZMA = 2; + static const int NSDataCompressionAlgorithmZlib = 3; +} + +late final _sel_decompressedDataUsingAlgorithm_error_ = + objc.registerName("decompressedDataUsingAlgorithm:error:"); +final _objc_msgSend_221 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_compressedDataUsingAlgorithm_error_ = + objc.registerName("compressedDataUsingAlgorithm:error:"); +late final _sel_getBytes_ = objc.registerName("getBytes:"); +late final _sel_dataWithContentsOfMappedFile_ = + objc.registerName("dataWithContentsOfMappedFile:"); +late final _sel_initWithContentsOfMappedFile_ = + objc.registerName("initWithContentsOfMappedFile:"); +late final _sel_initWithBase64Encoding_ = + objc.registerName("initWithBase64Encoding:"); +late final _sel_base64Encoding = objc.registerName("base64Encoding"); +late final _sel_characterSetWithBitmapRepresentation_ = + objc.registerName("characterSetWithBitmapRepresentation:"); +final _objc_msgSend_222 = 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_characterSetWithContentsOfFile_ = + objc.registerName("characterSetWithContentsOfFile:"); +final _objc_msgSend_223 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_224 = 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_characterIsMember_ = objc.registerName("characterIsMember:"); +final _objc_msgSend_225 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedShort)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_bitmapRepresentation = + objc.registerName("bitmapRepresentation"); +late final _sel_invertedSet = objc.registerName("invertedSet"); +late final _sel_longCharacterIsMember_ = + objc.registerName("longCharacterIsMember:"); +final _objc_msgSend_226 = 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_isSupersetOfSet_ = objc.registerName("isSupersetOfSet:"); +final _objc_msgSend_227 = 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_hasMemberInPlane_ = objc.registerName("hasMemberInPlane:"); +final _objc_msgSend_228 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer, + ffi.Pointer, ffi.Uint8)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_URLUserAllowedCharacterSet = + objc.registerName("URLUserAllowedCharacterSet"); +late final _sel_URLPasswordAllowedCharacterSet = + objc.registerName("URLPasswordAllowedCharacterSet"); +late final _sel_URLHostAllowedCharacterSet = + objc.registerName("URLHostAllowedCharacterSet"); +late final _sel_URLPathAllowedCharacterSet = + objc.registerName("URLPathAllowedCharacterSet"); +late final _sel_URLQueryAllowedCharacterSet = + objc.registerName("URLQueryAllowedCharacterSet"); +late final _sel_URLFragmentAllowedCharacterSet = + objc.registerName("URLFragmentAllowedCharacterSet"); +late final _sel_rangeOfCharacterFromSet_ = + objc.registerName("rangeOfCharacterFromSet:"); +final _objc_msgSend_229 = 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_229Stret = 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_rangeOfCharacterFromSet_options_ = + objc.registerName("rangeOfCharacterFromSet:options:"); +final _objc_msgSend_230 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +final _objc_msgSend_230Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_rangeOfCharacterFromSet_options_range_ = + objc.registerName("rangeOfCharacterFromSet:options:range:"); +final _objc_msgSend_231 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + _NSRange Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +final _objc_msgSend_231Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_rangeOfComposedCharacterSequenceAtIndex_ = + objc.registerName("rangeOfComposedCharacterSequenceAtIndex:"); +final _objc_msgSend_232 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, int)>(); +final _objc_msgSend_232Stret = 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_rangeOfComposedCharacterSequencesForRange_ = + objc.registerName("rangeOfComposedCharacterSequencesForRange:"); +final _objc_msgSend_233 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + _NSRange Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +final _objc_msgSend_233Stret = objc.msgSendStretPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer<_NSRange>, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function(ffi.Pointer<_NSRange>, ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_stringByAppendingString_ = + objc.registerName("stringByAppendingString:"); +late final _sel_stringByAppendingFormat_ = + objc.registerName("stringByAppendingFormat:"); +late final _sel_uppercaseString = objc.registerName("uppercaseString"); +late final _sel_lowercaseString = objc.registerName("lowercaseString"); +late final _sel_capitalizedString = objc.registerName("capitalizedString"); +late final _sel_localizedUppercaseString = + objc.registerName("localizedUppercaseString"); +late final _sel_localizedLowercaseString = + objc.registerName("localizedLowercaseString"); +late final _sel_localizedCapitalizedString = + objc.registerName("localizedCapitalizedString"); +late final _sel_uppercaseStringWithLocale_ = + objc.registerName("uppercaseStringWithLocale:"); +final _objc_msgSend_234 = 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_lowercaseStringWithLocale_ = + objc.registerName("lowercaseStringWithLocale:"); +late final _sel_capitalizedStringWithLocale_ = + objc.registerName("capitalizedStringWithLocale:"); +late final _sel_getLineStart_end_contentsEnd_forRange_ = + objc.registerName("getLineStart:end:contentsEnd:forRange:"); +final _objc_msgSend_235 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_lineRangeForRange_ = objc.registerName("lineRangeForRange:"); +late final _sel_getParagraphStart_end_contentsEnd_forRange_ = + objc.registerName("getParagraphStart:end:contentsEnd:forRange:"); +late final _sel_paragraphRangeForRange_ = + objc.registerName("paragraphRangeForRange:"); + +abstract class NSStringEnumerationOptions { + static const int NSStringEnumerationByLines = 0; + static const int NSStringEnumerationByParagraphs = 1; + static const int NSStringEnumerationByComposedCharacterSequences = 2; + static const int NSStringEnumerationByWords = 3; + static const int NSStringEnumerationBySentences = 4; + static const int NSStringEnumerationByCaretPositions = 5; + static const int NSStringEnumerationByDeletionClusters = 6; + static const int NSStringEnumerationReverse = 256; + static const int NSStringEnumerationSubstringNotRequired = 512; + static const int NSStringEnumerationLocalized = 1024; +} + +void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + _NSRange arg2, + ffi.Pointer arg3) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + _NSRange arg1, + _NSRange arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function(ffi.Pointer, _NSRange, _NSRange, + ffi.Pointer)>()(arg0, arg1, arg2, arg3); +final _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry = , _NSRange, _NSRange, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( + void Function(ffi.Pointer, _NSRange, _NSRange, + ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + _NSRange arg2, + ffi.Pointer arg3) => + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2, arg3); + +class ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + _NSRange arg1, + _NSRange arg2, + ffi.Pointer arg3)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool.fromFunction( + void Function(NSString?, _NSRange, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + _NSRange, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure( + (ffi.Pointer arg0, _NSRange arg1, + _NSRange arg2, ffi.Pointer arg3) => + fn(arg0.address == 0 ? null : NSString.castFromPointer(arg0, retain: true, release: true), arg1, arg2, arg3)))); + 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_NSString_NSRange_NSRange_bool.listener( + void Function(NSString?, _NSRange, _NSRange, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + _NSRange, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSString_NSRange_NSRange_bool_registerClosure((ffi.Pointer arg0, + _NSRange arg1, _NSRange arg2, ffi.Pointer arg3) => + fn(arg0.address == 0 ? null : NSString.castFromPointer(arg0, retain: true, release: true), arg1, arg2, arg3)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + _NSRange, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSString? arg0, _NSRange arg1, _NSRange arg2, + ffi.Pointer arg3) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + _NSRange arg1, + _NSRange arg2, + ffi.Pointer arg3)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + _NSRange, + ffi.Pointer)>()( + pointer, arg0?.pointer ?? ffi.nullptr, arg1, arg2, arg3); +} + +late final _sel_enumerateSubstringsInRange_options_usingBlock_ = + objc.registerName("enumerateSubstringsInRange:options:usingBlock:"); +final _objc_msgSend_236 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + int, + ffi.Pointer)>(); +void _ObjCBlock_ffiVoid_NSString_bool_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); +final _ObjCBlock_ffiVoid_NSString_bool_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSString_bool_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_NSString_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSString_bool_closureRegistry[block.ref.target.address]!( + arg0, arg1); + +class ObjCBlock_ffiVoid_NSString_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSString_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_NSString_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSString_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSString_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + objc + .newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_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_NSString_bool.fromFunction( + void Function(NSString, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSString_bool_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(NSString.castFromPointer(arg0, retain: true, release: true), arg1)))); + 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_NSString_bool.listener( + void Function(NSString, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSString_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSString_bool_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(NSString.castFromPointer(arg0, retain: true, release: true), arg1)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSString arg0, ffi.Pointer 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, arg1); +} + +late final _sel_enumerateLinesUsingBlock_ = + objc.registerName("enumerateLinesUsingBlock:"); +final _objc_msgSend_237 = 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_UTF8String = objc.registerName("UTF8String"); +late final _sel_fastestEncoding = objc.registerName("fastestEncoding"); +late final _sel_smallestEncoding = objc.registerName("smallestEncoding"); +late final _sel_dataUsingEncoding_allowLossyConversion_ = + objc.registerName("dataUsingEncoding:allowLossyConversion:"); +final _objc_msgSend_238 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong, ffi.Bool)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int, bool)>(); +late final _sel_dataUsingEncoding_ = objc.registerName("dataUsingEncoding:"); +final _objc_msgSend_239 = 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_canBeConvertedToEncoding_ = + objc.registerName("canBeConvertedToEncoding:"); +late final _sel_cStringUsingEncoding_ = + objc.registerName("cStringUsingEncoding:"); +final _objc_msgSend_240 = 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_getCString_maxLength_encoding_ = + objc.registerName("getCString:maxLength:encoding:"); +final _objc_msgSend_241 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() + .asFunction< + bool Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int)>(); + +abstract class NSStringEncodingConversionOptions { + static const int NSStringEncodingConversionAllowLossy = 1; + static const int NSStringEncodingConversionExternalRepresentation = 2; +} + +late final _sel_getBytes_maxLength_usedLength_encoding_options_range_remainingRange_ = + objc.registerName( + "getBytes:maxLength:usedLength:encoding:options:range:remainingRange:"); +final _objc_msgSend_242 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Int32, + _NSRange, + ffi.Pointer<_NSRange>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + int, + int, + _NSRange, + ffi.Pointer<_NSRange>)>(); +late final _sel_maximumLengthOfBytesUsingEncoding_ = + objc.registerName("maximumLengthOfBytesUsingEncoding:"); +late final _sel_lengthOfBytesUsingEncoding_ = + objc.registerName("lengthOfBytesUsingEncoding:"); +late final _sel_availableStringEncodings = + objc.registerName("availableStringEncodings"); +final _objc_msgSend_243 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_localizedNameOfStringEncoding_ = + objc.registerName("localizedNameOfStringEncoding:"); +late final _sel_defaultCStringEncoding = + objc.registerName("defaultCStringEncoding"); +late final _sel_decomposedStringWithCanonicalMapping = + objc.registerName("decomposedStringWithCanonicalMapping"); +late final _sel_precomposedStringWithCanonicalMapping = + objc.registerName("precomposedStringWithCanonicalMapping"); +late final _sel_decomposedStringWithCompatibilityMapping = + objc.registerName("decomposedStringWithCompatibilityMapping"); +late final _sel_precomposedStringWithCompatibilityMapping = + objc.registerName("precomposedStringWithCompatibilityMapping"); +late final _sel_componentsSeparatedByString_ = + objc.registerName("componentsSeparatedByString:"); +final _objc_msgSend_244 = 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_componentsSeparatedByCharactersInSet_ = + objc.registerName("componentsSeparatedByCharactersInSet:"); +final _objc_msgSend_245 = 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_stringByTrimmingCharactersInSet_ = + objc.registerName("stringByTrimmingCharactersInSet:"); +final _objc_msgSend_246 = 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_stringByPaddingToLength_withString_startingAtIndex_ = + objc.registerName("stringByPaddingToLength:withString:startingAtIndex:"); +final _objc_msgSend_247 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer, + int)>(); +late final _sel_stringByFoldingWithOptions_locale_ = + objc.registerName("stringByFoldingWithOptions:locale:"); +final _objc_msgSend_248 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_stringByReplacingOccurrencesOfString_withString_options_range_ = + objc.registerName( + "stringByReplacingOccurrencesOfString:withString:options:range:"); +final _objc_msgSend_249 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_stringByReplacingOccurrencesOfString_withString_ = + objc.registerName("stringByReplacingOccurrencesOfString:withString:"); +final _objc_msgSend_250 = 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_stringByReplacingCharactersInRange_withString_ = + objc.registerName("stringByReplacingCharactersInRange:withString:"); +final _objc_msgSend_251 = 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_stringByApplyingTransform_reverse_ = + objc.registerName("stringByApplyingTransform:reverse:"); +final _objc_msgSend_252 = 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_writeToURL_atomically_encoding_error_ = + objc.registerName("writeToURL:atomically:encoding:error:"); +final _objc_msgSend_253 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + int, + ffi.Pointer>)>(); +late final _sel_writeToFile_atomically_encoding_error_ = + objc.registerName("writeToFile:atomically:encoding:error:"); +final _objc_msgSend_254 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.UnsignedLong, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + int, + ffi.Pointer>)>(); +late final _sel_initWithCharactersNoCopy_length_freeWhenDone_ = + objc.registerName("initWithCharactersNoCopy:length:freeWhenDone:"); +final _objc_msgSend_255 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + bool)>(); +void _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_fnPtrTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1) => + block.ref.target + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1)>>() + .asFunction, int)>()( + arg0, arg1); +final _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry = + , int)>{}; +int _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( + void Function(ffi.Pointer, int) fn) { + final id = + ++_ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistryIndex; + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + int arg1) => + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong._( + 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_ffiUnsignedShort_ffiUnsignedLong castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong._(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_ffiUnsignedShort_ffiUnsignedLong.fromFunctionPointer( + ffi + .Pointer< + ffi + .NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.UnsignedLong arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>( + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_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_ffiUnsignedShort_ffiUnsignedLong.fromFunction( + void Function(ffi.Pointer, int) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>( + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( + (ffi.Pointer arg0, int arg1) => + fn(arg0, arg1)))); + 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_ffiUnsignedShort_ffiUnsignedLong.listener( + void Function(ffi.Pointer, int) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>.listener( + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong_registerClosure( + (ffi.Pointer arg0, int arg1) => + fn(arg0, arg1)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong)>? _dartFuncListenerTrampoline; + + void call(ffi.Pointer arg0, int arg1) => pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.UnsignedLong arg1)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int)>()(pointer, arg0, arg1); +} + +late final _sel_initWithCharactersNoCopy_length_deallocator_ = + objc.registerName("initWithCharactersNoCopy:length:deallocator:"); +final _objc_msgSend_256 = 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_initWithCharacters_length_ = + objc.registerName("initWithCharacters:length:"); +final _objc_msgSend_257 = 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_initWithUTF8String_ = objc.registerName("initWithUTF8String:"); +final _objc_msgSend_258 = 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_initWithFormat_ = objc.registerName("initWithFormat:"); + +final class __va_list_tag extends ffi.Struct { + @ffi.UnsignedInt() + external int gp_offset; + + @ffi.UnsignedInt() + external int fp_offset; + + external ffi.Pointer overflow_arg_area; + + external ffi.Pointer reg_save_area; +} + +late final _sel_initWithFormat_arguments_ = + objc.registerName("initWithFormat:arguments:"); +final _objc_msgSend_259 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); +late final _sel_initWithFormat_locale_ = + objc.registerName("initWithFormat:locale:"); +final _objc_msgSend_260 = 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_initWithFormat_locale_arguments_ = + objc.registerName("initWithFormat:locale:arguments:"); +final _objc_msgSend_261 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>)>(); +late final _sel_initWithValidatedFormat_validFormatSpecifiers_error_ = + objc.registerName("initWithValidatedFormat:validFormatSpecifiers:error:"); +final _objc_msgSend_262 = 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_initWithValidatedFormat_validFormatSpecifiers_locale_error_ = + objc.registerName( + "initWithValidatedFormat:validFormatSpecifiers:locale:error:"); +final _objc_msgSend_263 = 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_initWithValidatedFormat_validFormatSpecifiers_arguments_error_ = + objc.registerName( + "initWithValidatedFormat:validFormatSpecifiers:arguments:error:"); +final _objc_msgSend_264 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>, + ffi.Pointer>)>(); +late final _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_ = + objc.registerName( + "initWithValidatedFormat:validFormatSpecifiers:locale:arguments:error:"); +final _objc_msgSend_265 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>, + ffi.Pointer>)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer<__va_list_tag>, + ffi.Pointer>)>(); +late final _sel_initWithData_encoding_ = + objc.registerName("initWithData:encoding:"); +final _objc_msgSend_266 = 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_initWithBytes_length_encoding_ = + objc.registerName("initWithBytes:length:encoding:"); +final _objc_msgSend_267 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer, int, int)>(); +late final _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_ = + objc.registerName("initWithBytesNoCopy:length:encoding:freeWhenDone:"); +final _objc_msgSend_268 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Bool)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + bool)>(); +late final _sel_initWithBytesNoCopy_length_encoding_deallocator_ = + objc.registerName("initWithBytesNoCopy:length:encoding:deallocator:"); +final _objc_msgSend_269 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong, + ffi.Pointer)>>() + .asFunction< + instancetype Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_string = objc.registerName("string"); +late final _sel_stringWithString_ = objc.registerName("stringWithString:"); +late final _sel_stringWithCharacters_length_ = + objc.registerName("stringWithCharacters:length:"); +late final _sel_stringWithUTF8String_ = + objc.registerName("stringWithUTF8String:"); +late final _sel_stringWithFormat_ = objc.registerName("stringWithFormat:"); +late final _sel_localizedStringWithFormat_ = + objc.registerName("localizedStringWithFormat:"); +late final _sel_stringWithValidatedFormat_validFormatSpecifiers_error_ = + objc.registerName("stringWithValidatedFormat:validFormatSpecifiers:error:"); +late final _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_ = + objc.registerName( + "localizedStringWithValidatedFormat:validFormatSpecifiers:error:"); +late final _sel_initWithCString_encoding_ = + objc.registerName("initWithCString:encoding:"); +final _objc_msgSend_270 = 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_stringWithCString_encoding_ = + objc.registerName("stringWithCString:encoding:"); +late final _sel_initWithContentsOfURL_encoding_error_ = + objc.registerName("initWithContentsOfURL:encoding:error:"); +final _objc_msgSend_271 = 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_initWithContentsOfFile_encoding_error_ = + objc.registerName("initWithContentsOfFile:encoding:error:"); +final _objc_msgSend_272 = 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_stringWithContentsOfURL_encoding_error_ = + objc.registerName("stringWithContentsOfURL:encoding:error:"); +late final _sel_stringWithContentsOfFile_encoding_error_ = + objc.registerName("stringWithContentsOfFile:encoding:error:"); +late final _sel_initWithContentsOfURL_usedEncoding_error_ = + objc.registerName("initWithContentsOfURL:usedEncoding:error:"); +final _objc_msgSend_273 = 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_initWithContentsOfFile_usedEncoding_error_ = + objc.registerName("initWithContentsOfFile:usedEncoding:error:"); +final _objc_msgSend_274 = 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_stringWithContentsOfURL_usedEncoding_error_ = + objc.registerName("stringWithContentsOfURL:usedEncoding:error:"); +late final _sel_stringWithContentsOfFile_usedEncoding_error_ = + objc.registerName("stringWithContentsOfFile:usedEncoding:error:"); +late final _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_ = + objc.registerName( + "stringEncodingForData:encodingOptions:convertedString:usedLossyConversion:"); +final _objc_msgSend_275 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer>, + ffi.Pointer)>(); +late final _sel_propertyList = objc.registerName("propertyList"); +late final _sel_propertyListFromStringsFileFormat = + objc.registerName("propertyListFromStringsFileFormat"); +final _objc_msgSend_276 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_cString = objc.registerName("cString"); +late final _sel_lossyCString = objc.registerName("lossyCString"); +late final _sel_cStringLength = objc.registerName("cStringLength"); +late final _sel_getCString_ = objc.registerName("getCString:"); +final _objc_msgSend_277 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_getCString_maxLength_ = + objc.registerName("getCString:maxLength:"); +final _objc_msgSend_278 = 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_getCString_maxLength_range_remainingRange_ = + objc.registerName("getCString:maxLength:range:remainingRange:"); +final _objc_msgSend_279 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + _NSRange, + ffi.Pointer<_NSRange>)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange, + ffi.Pointer<_NSRange>)>(); +late final _sel_stringWithContentsOfFile_ = + objc.registerName("stringWithContentsOfFile:"); +late final _sel_stringWithContentsOfURL_ = + objc.registerName("stringWithContentsOfURL:"); +late final _sel_initWithCStringNoCopy_length_freeWhenDone_ = + objc.registerName("initWithCStringNoCopy:length:freeWhenDone:"); +final _objc_msgSend_280 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.Bool)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + bool)>(); +late final _sel_initWithCString_length_ = + objc.registerName("initWithCString:length:"); +late final _sel_initWithCString_ = objc.registerName("initWithCString:"); +late final _sel_stringWithCString_length_ = + objc.registerName("stringWithCString:length:"); +late final _sel_stringWithCString_ = objc.registerName("stringWithCString:"); +late final _sel_getCharacters_ = objc.registerName("getCharacters:"); +final _objc_msgSend_281 = 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_stringByAddingPercentEncodingWithAllowedCharacters_ = + objc.registerName("stringByAddingPercentEncodingWithAllowedCharacters:"); +final _objc_msgSend_282 = 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_stringByRemovingPercentEncoding = + objc.registerName("stringByRemovingPercentEncoding"); +late final _sel_stringByAddingPercentEscapesUsingEncoding_ = + objc.registerName("stringByAddingPercentEscapesUsingEncoding:"); +final _objc_msgSend_283 = 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_stringByReplacingPercentEscapesUsingEncoding_ = + objc.registerName("stringByReplacingPercentEscapesUsingEncoding:"); +late final _sel_debugDescription = objc.registerName("debugDescription"); +late final _sel_version = objc.registerName("version"); +late final _sel_setVersion_ = objc.registerName("setVersion:"); +final _objc_msgSend_284 = 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_classForCoder = objc.registerName("classForCoder"); +late final _sel_replacementObjectForCoder_ = + objc.registerName("replacementObjectForCoder:"); +late final _sel_awakeAfterUsingCoder_ = + objc.registerName("awakeAfterUsingCoder:"); +late final _sel_poseAsClass_ = objc.registerName("poseAsClass:"); +late final _sel_autoContentAccessingProxy = + objc.registerName("autoContentAccessingProxy"); +late final _sel_URL_resourceDataDidBecomeAvailable_ = + objc.registerName("URL:resourceDataDidBecomeAvailable:"); +final _objc_msgSend_285 = 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_URLResourceDidFinishLoading_ = + objc.registerName("URLResourceDidFinishLoading:"); +final _objc_msgSend_286 = 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_URLResourceDidCancelLoading_ = + objc.registerName("URLResourceDidCancelLoading:"); +late final _sel_URL_resourceDidFailLoadingWithReason_ = + objc.registerName("URL:resourceDidFailLoadingWithReason:"); +final _objc_msgSend_287 = 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)>(); + +class NSMutableArray extends NSArray { + NSMutableArray._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMutableArray] that points to the same underlying object as [other]. + NSMutableArray.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMutableArray] that wraps the given raw object pointer. + NSMutableArray.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMutableArray]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableArray); + } + + void addObject_(NSObject anObject) { + _objc_msgSend_198(this.pointer, _sel_addObject_, anObject.pointer); + } + + void insertObject_atIndex_(NSObject anObject, int index) { + _objc_msgSend_288( + this.pointer, _sel_insertObject_atIndex_, anObject.pointer, index); + } + + void removeLastObject() { + _objc_msgSend_1(this.pointer, _sel_removeLastObject); + } + + void removeObjectAtIndex_(int index) { + _objc_msgSend_289(this.pointer, _sel_removeObjectAtIndex_, index); + } + + void replaceObjectAtIndex_withObject_(int index, NSObject anObject) { + _objc_msgSend_290(this.pointer, _sel_replaceObjectAtIndex_withObject_, + index, anObject.pointer); + } + + @override + NSMutableArray init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + NSMutableArray initWithCapacity_(int numItems) { + final _ret = + _objc_msgSend_97(this.pointer, _sel_initWithCapacity_, numItems); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableArray? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + void addObjectsFromArray_(NSArray otherArray) { + _objc_msgSend_291( + this.pointer, _sel_addObjectsFromArray_, otherArray.pointer); + } + + void exchangeObjectAtIndex_withObjectAtIndex_(int idx1, int idx2) { + _objc_msgSend_292(this.pointer, + _sel_exchangeObjectAtIndex_withObjectAtIndex_, idx1, idx2); + } + + void removeAllObjects() { + _objc_msgSend_1(this.pointer, _sel_removeAllObjects); + } + + void removeObject_inRange_(NSObject anObject, _NSRange range) { + _objc_msgSend_293( + this.pointer, _sel_removeObject_inRange_, anObject.pointer, range); + } + + void removeObject_(NSObject anObject) { + _objc_msgSend_198(this.pointer, _sel_removeObject_, anObject.pointer); + } + + void removeObjectIdenticalTo_inRange_(NSObject anObject, _NSRange range) { + _objc_msgSend_293(this.pointer, _sel_removeObjectIdenticalTo_inRange_, + anObject.pointer, range); + } + + void removeObjectIdenticalTo_(NSObject anObject) { + _objc_msgSend_198( + this.pointer, _sel_removeObjectIdenticalTo_, anObject.pointer); + } + + void removeObjectsFromIndices_numIndices_( + ffi.Pointer indices, int cnt) { + _objc_msgSend_294( + this.pointer, _sel_removeObjectsFromIndices_numIndices_, indices, cnt); + } + + void removeObjectsInArray_(NSArray otherArray) { + _objc_msgSend_291( + this.pointer, _sel_removeObjectsInArray_, otherArray.pointer); + } + + void removeObjectsInRange_(_NSRange range) { + _objc_msgSend_295(this.pointer, _sel_removeObjectsInRange_, range); + } + + void replaceObjectsInRange_withObjectsFromArray_range_( + _NSRange range, NSArray otherArray, _NSRange otherRange) { + _objc_msgSend_296( + this.pointer, + _sel_replaceObjectsInRange_withObjectsFromArray_range_, + range, + otherArray.pointer, + otherRange); + } + + void replaceObjectsInRange_withObjectsFromArray_( + _NSRange range, NSArray otherArray) { + _objc_msgSend_297( + this.pointer, + _sel_replaceObjectsInRange_withObjectsFromArray_, + range, + otherArray.pointer); + } + + void setArray_(NSArray otherArray) { + _objc_msgSend_291(this.pointer, _sel_setArray_, otherArray.pointer); + } + + void sortUsingFunction_context_( + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>> + compare, + ffi.Pointer context) { + _objc_msgSend_298( + this.pointer, _sel_sortUsingFunction_context_, compare, context); + } + + void sortUsingSelector_(ffi.Pointer comparator) { + _objc_msgSend_7(this.pointer, _sel_sortUsingSelector_, comparator); + } + + void insertObjects_atIndexes_(NSArray objects, NSIndexSet indexes) { + _objc_msgSend_299(this.pointer, _sel_insertObjects_atIndexes_, + objects.pointer, indexes.pointer); + } + + void removeObjectsAtIndexes_(NSIndexSet indexes) { + _objc_msgSend_300( + this.pointer, _sel_removeObjectsAtIndexes_, indexes.pointer); + } + + void replaceObjectsAtIndexes_withObjects_( + NSIndexSet indexes, NSArray objects) { + _objc_msgSend_301(this.pointer, _sel_replaceObjectsAtIndexes_withObjects_, + indexes.pointer, objects.pointer); + } + + void setObject_atIndexedSubscript_(NSObject obj, int idx) { + _objc_msgSend_288( + this.pointer, _sel_setObject_atIndexedSubscript_, obj.pointer, idx); + } + + void sortUsingComparator_( + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_302(this.pointer, _sel_sortUsingComparator_, cmptr.pointer); + } + + void sortWithOptions_usingComparator_(int opts, + ObjCBlock_NSComparisonResult_objcObjCObject_objcObjCObject cmptr) { + _objc_msgSend_303(this.pointer, _sel_sortWithOptions_usingComparator_, opts, + cmptr.pointer); + } + + static NSMutableArray arrayWithCapacity_(int numItems) { + final _ret = _objc_msgSend_97( + _class_NSMutableArray, _sel_arrayWithCapacity_, numItems); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray? arrayWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_304( + _class_NSMutableArray, _sel_arrayWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray? arrayWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_305( + _class_NSMutableArray, _sel_arrayWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + NSMutableArray? initWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_304( + this.pointer, _sel_initWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + NSMutableArray? initWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_305( + this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + void applyDifference_(NSObject difference) { + _objc_msgSend_198(this.pointer, _sel_applyDifference_, difference.pointer); + } + + @override + NSMutableArray initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray array() { + final _ret = _objc_msgSend_2(_class_NSMutableArray, _sel_array); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray arrayWithObject_(NSObject anObject) { + final _ret = _objc_msgSend_148( + _class_NSMutableArray, _sel_arrayWithObject_, anObject.pointer); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray arrayWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + _class_NSMutableArray, _sel_arrayWithObjects_count_, objects, cnt); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray arrayWithObjects_(NSObject firstObj) { + final _ret = _objc_msgSend_148( + _class_NSMutableArray, _sel_arrayWithObjects_, firstObj.pointer); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray arrayWithArray_(NSArray array) { + final _ret = _objc_msgSend_149( + _class_NSMutableArray, _sel_arrayWithArray_, array.pointer); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableArray initWithObjects_(NSObject firstObj) { + final _ret = _objc_msgSend_148( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableArray initWithArray_(NSArray array) { + final _ret = + _objc_msgSend_149(this.pointer, _sel_initWithArray_, array.pointer); + return NSMutableArray.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableArray initWithArray_copyItems_(NSArray array, bool flag) { + final _ret = _objc_msgSend_150( + this.pointer, _sel_initWithArray_copyItems_, array.pointer, flag); + return NSMutableArray.castFromPointer(_ret, retain: false, release: true); + } + + static NSArray? arrayWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_151(_class_NSMutableArray, + _sel_arrayWithContentsOfURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSArray.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableArray new1() { + final _ret = _objc_msgSend_2(_class_NSMutableArray, _sel_new); + return NSMutableArray.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableArray allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSMutableArray, _sel_allocWithZone_, zone); + return NSMutableArray.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableArray alloc() { + final _ret = _objc_msgSend_2(_class_NSMutableArray, _sel_alloc); + return NSMutableArray.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSMutableArray = objc.getClass("NSMutableArray"); +late final _sel_addObject_ = objc.registerName("addObject:"); +late final _sel_insertObject_atIndex_ = + objc.registerName("insertObject:atIndex:"); +final _objc_msgSend_288 = 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_removeLastObject = objc.registerName("removeLastObject"); +late final _sel_removeObjectAtIndex_ = + objc.registerName("removeObjectAtIndex:"); +final _objc_msgSend_289 = 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_replaceObjectAtIndex_withObject_ = + objc.registerName("replaceObjectAtIndex:withObject:"); +final _objc_msgSend_290 = 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_initWithCapacity_ = objc.registerName("initWithCapacity:"); +late final _sel_addObjectsFromArray_ = + objc.registerName("addObjectsFromArray:"); +final _objc_msgSend_291 = 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_exchangeObjectAtIndex_withObjectAtIndex_ = + objc.registerName("exchangeObjectAtIndex:withObjectAtIndex:"); +final _objc_msgSend_292 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.UnsignedLong, + ffi.UnsignedLong)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, int, int)>(); +late final _sel_removeAllObjects = objc.registerName("removeAllObjects"); +late final _sel_removeObject_inRange_ = + objc.registerName("removeObject:inRange:"); +final _objc_msgSend_293 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + _NSRange)>(); +late final _sel_removeObject_ = objc.registerName("removeObject:"); +late final _sel_removeObjectIdenticalTo_inRange_ = + objc.registerName("removeObjectIdenticalTo:inRange:"); +late final _sel_removeObjectIdenticalTo_ = + objc.registerName("removeObjectIdenticalTo:"); +late final _sel_removeObjectsFromIndices_numIndices_ = + objc.registerName("removeObjectsFromIndices:numIndices:"); +final _objc_msgSend_294 = 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_removeObjectsInArray_ = + objc.registerName("removeObjectsInArray:"); +late final _sel_removeObjectsInRange_ = + objc.registerName("removeObjectsInRange:"); +final _objc_msgSend_295 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer, + ffi.Pointer, _NSRange)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, _NSRange)>(); +late final _sel_replaceObjectsInRange_withObjectsFromArray_range_ = + objc.registerName("replaceObjectsInRange:withObjectsFromArray:range:"); +final _objc_msgSend_296 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + _NSRange)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + _NSRange)>(); +late final _sel_replaceObjectsInRange_withObjectsFromArray_ = + objc.registerName("replaceObjectsInRange:withObjectsFromArray:"); +final _objc_msgSend_297 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_setArray_ = objc.registerName("setArray:"); +late final _sel_sortUsingFunction_context_ = + objc.registerName("sortUsingFunction:context:"); +final _objc_msgSend_298 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>>, + ffi.Pointer)>(); +late final _sel_sortUsingSelector_ = objc.registerName("sortUsingSelector:"); +late final _sel_insertObjects_atIndexes_ = + objc.registerName("insertObjects:atIndexes:"); +final _objc_msgSend_299 = 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_removeObjectsAtIndexes_ = + objc.registerName("removeObjectsAtIndexes:"); +final _objc_msgSend_300 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_replaceObjectsAtIndexes_withObjects_ = + objc.registerName("replaceObjectsAtIndexes:withObjects:"); +final _objc_msgSend_301 = 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_setObject_atIndexedSubscript_ = + objc.registerName("setObject:atIndexedSubscript:"); +late final _sel_sortUsingComparator_ = + objc.registerName("sortUsingComparator:"); +final _objc_msgSend_302 = 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_sortWithOptions_usingComparator_ = + objc.registerName("sortWithOptions:usingComparator:"); +final _objc_msgSend_303 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_arrayWithCapacity_ = objc.registerName("arrayWithCapacity:"); +final _objc_msgSend_304 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_305 = 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_applyDifference_ = objc.registerName("applyDifference:"); + +class NSMutableData extends NSData { + NSMutableData._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMutableData] that points to the same underlying object as [other]. + NSMutableData.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMutableData] that wraps the given raw object pointer. + NSMutableData.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMutableData]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableData); + } + + ffi.Pointer get mutableBytes { + return _objc_msgSend_31(this.pointer, _sel_mutableBytes); + } + + @override + int get length { + return _objc_msgSend_12(this.pointer, _sel_length); + } + + set length(int value) { + return _objc_msgSend_306(this.pointer, _sel_setLength_, value); + } + + void appendBytes_length_(ffi.Pointer bytes, int length) { + _objc_msgSend_33(this.pointer, _sel_appendBytes_length_, bytes, length); + } + + void appendData_(NSData other) { + _objc_msgSend_307(this.pointer, _sel_appendData_, other.pointer); + } + + void increaseLengthBy_(int extraLength) { + _objc_msgSend_289(this.pointer, _sel_increaseLengthBy_, extraLength); + } + + void replaceBytesInRange_withBytes_( + _NSRange range, ffi.Pointer bytes) { + _objc_msgSend_308( + this.pointer, _sel_replaceBytesInRange_withBytes_, range, bytes); + } + + void resetBytesInRange_(_NSRange range) { + _objc_msgSend_295(this.pointer, _sel_resetBytesInRange_, range); + } + + void setData_(NSData data) { + _objc_msgSend_307(this.pointer, _sel_setData_, data.pointer); + } + + void replaceBytesInRange_withBytes_length_(_NSRange range, + ffi.Pointer replacementBytes, int replacementLength) { + _objc_msgSend_309(this.pointer, _sel_replaceBytesInRange_withBytes_length_, + range, replacementBytes, replacementLength); + } + + static NSMutableData? dataWithCapacity_(int aNumItems) { + final _ret = _objc_msgSend_310( + _class_NSMutableData, _sel_dataWithCapacity_, aNumItems); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData? dataWithLength_(int length) { + final _ret = + _objc_msgSend_310(_class_NSMutableData, _sel_dataWithLength_, length); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + NSMutableData? initWithCapacity_(int capacity) { + final _ret = + _objc_msgSend_310(this.pointer, _sel_initWithCapacity_, capacity); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + NSMutableData? initWithLength_(int length) { + final _ret = _objc_msgSend_310(this.pointer, _sel_initWithLength_, length); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + bool decompressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _objc_msgSend_311( + this.pointer, _sel_decompressUsingAlgorithm_error_, algorithm, error); + } + + bool compressUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + return _objc_msgSend_311( + this.pointer, _sel_compressUsingAlgorithm_error_, algorithm, error); + } + + static NSMutableData data() { + final _ret = _objc_msgSend_2(_class_NSMutableData, _sel_data); + return NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData dataWithBytes_length_( + ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + _class_NSMutableData, _sel_dataWithBytes_length_, bytes, length); + return NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData dataWithBytesNoCopy_length_( + ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + _class_NSMutableData, _sel_dataWithBytesNoCopy_length_, bytes, length); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableData dataWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool b) { + final _ret = _objc_msgSend_211(_class_NSMutableData, + _sel_dataWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableData? dataWithContentsOfFile_options_error_(NSString path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_212( + _class_NSMutableData, + _sel_dataWithContentsOfFile_options_error_, + path.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData? dataWithContentsOfURL_options_error_(NSURL url, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_213( + _class_NSMutableData, + _sel_dataWithContentsOfURL_options_error_, + url.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData? dataWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_49( + _class_NSMutableData, _sel_dataWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData? dataWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_214( + _class_NSMutableData, _sel_dataWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData initWithBytes_length_(ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + this.pointer, _sel_initWithBytes_length_, bytes, length); + return NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData initWithBytesNoCopy_length_( + ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_210( + this.pointer, _sel_initWithBytesNoCopy_length_, bytes, length); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } + + @override + NSMutableData initWithBytesNoCopy_length_freeWhenDone_( + ffi.Pointer bytes, int length, bool b) { + final _ret = _objc_msgSend_211(this.pointer, + _sel_initWithBytesNoCopy_length_freeWhenDone_, bytes, length, b); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } + + @override + NSMutableData initWithBytesNoCopy_length_deallocator_( + ffi.Pointer bytes, + int length, + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { + final _ret = _objc_msgSend_215( + this.pointer, + _sel_initWithBytesNoCopy_length_deallocator_, + bytes, + length, + deallocator?.pointer ?? ffi.nullptr); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } + + @override + NSMutableData? initWithContentsOfFile_options_error_(NSString path, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_212( + this.pointer, + _sel_initWithContentsOfFile_options_error_, + path.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData? initWithContentsOfURL_options_error_(NSURL url, + int readOptionsMask, ffi.Pointer> errorPtr) { + final _ret = _objc_msgSend_213( + this.pointer, + _sel_initWithContentsOfURL_options_error_, + url.pointer, + readOptionsMask, + errorPtr); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData? initWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_49( + this.pointer, _sel_initWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData? initWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_214( + this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData initWithData_(NSData data) { + final _ret = + _objc_msgSend_216(this.pointer, _sel_initWithData_, data.pointer); + return NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData dataWithData_(NSData data) { + final _ret = _objc_msgSend_216( + _class_NSMutableData, _sel_dataWithData_, data.pointer); + return NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData? initWithBase64EncodedString_options_( + NSString base64String, int options) { + final _ret = _objc_msgSend_217( + this.pointer, + _sel_initWithBase64EncodedString_options_, + base64String.pointer, + options); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData? initWithBase64EncodedData_options_( + NSData base64Data, int options) { + final _ret = _objc_msgSend_219(this.pointer, + _sel_initWithBase64EncodedData_options_, base64Data.pointer, options); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData? decompressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _objc_msgSend_221(this.pointer, + _sel_decompressedDataUsingAlgorithm_error_, algorithm, error); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData? compressedDataUsingAlgorithm_error_( + int algorithm, ffi.Pointer> error) { + final _ret = _objc_msgSend_221(this.pointer, + _sel_compressedDataUsingAlgorithm_error_, algorithm, error); + return _ret.address == 0 + ? null + : NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? dataWithContentsOfMappedFile_(NSString path) { + final _ret = _objc_msgSend_49( + _class_NSMutableData, _sel_dataWithContentsOfMappedFile_, path.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableData init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSMutableData.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableData new1() { + final _ret = _objc_msgSend_2(_class_NSMutableData, _sel_new); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableData allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSMutableData, _sel_allocWithZone_, zone); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableData alloc() { + final _ret = _objc_msgSend_2(_class_NSMutableData, _sel_alloc); + return NSMutableData.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSMutableData = objc.getClass("NSMutableData"); +late final _sel_mutableBytes = objc.registerName("mutableBytes"); +late final _sel_setLength_ = objc.registerName("setLength:"); +final _objc_msgSend_306 = 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_appendBytes_length_ = objc.registerName("appendBytes:length:"); +late final _sel_appendData_ = objc.registerName("appendData:"); +final _objc_msgSend_307 = 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_increaseLengthBy_ = objc.registerName("increaseLengthBy:"); +late final _sel_replaceBytesInRange_withBytes_ = + objc.registerName("replaceBytesInRange:withBytes:"); +final _objc_msgSend_308 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function(ffi.Pointer, + ffi.Pointer, _NSRange, ffi.Pointer)>(); +late final _sel_resetBytesInRange_ = objc.registerName("resetBytesInRange:"); +late final _sel_setData_ = objc.registerName("setData:"); +late final _sel_replaceBytesInRange_withBytes_length_ = + objc.registerName("replaceBytesInRange:withBytes:length:"); +final _objc_msgSend_309 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + ffi.UnsignedLong)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer, + int)>(); +late final _sel_dataWithCapacity_ = objc.registerName("dataWithCapacity:"); +final _objc_msgSend_310 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.UnsignedLong)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_dataWithLength_ = objc.registerName("dataWithLength:"); +late final _sel_initWithLength_ = objc.registerName("initWithLength:"); +late final _sel_decompressUsingAlgorithm_error_ = + objc.registerName("decompressUsingAlgorithm:error:"); +final _objc_msgSend_311 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer>)>(); +late final _sel_compressUsingAlgorithm_error_ = + objc.registerName("compressUsingAlgorithm:error:"); + +class NSNotification extends NSObject { + NSNotification._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSNotification] that points to the same underlying object as [other]. + NSNotification.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSNotification] that wraps the given raw object pointer. + NSNotification.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSNotification]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSNotification); + } + + NSString get name { + final _ret = _objc_msgSend_32(this.pointer, _sel_name); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? get object { + final _ret = _objc_msgSend_61(this.pointer, _sel_object); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSDictionary? get userInfo { + final _ret = _objc_msgSend_276(this.pointer, _sel_userInfo); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + NSNotification initWithName_object_userInfo_( + NSString name, NSObject? object, NSDictionary? userInfo) { + final _ret = _objc_msgSend_312( + this.pointer, + _sel_initWithName_object_userInfo_, + name.pointer, + object?.pointer ?? ffi.nullptr, + userInfo?.pointer ?? ffi.nullptr); + return NSNotification.castFromPointer(_ret, retain: true, release: true); + } + + NSNotification? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSNotification.castFromPointer(_ret, retain: true, release: true); + } + + static NSNotification notificationWithName_object_( + NSString aName, NSObject? anObject) { + final _ret = _objc_msgSend_260( + _class_NSNotification, + _sel_notificationWithName_object_, + aName.pointer, + anObject?.pointer ?? ffi.nullptr); + return NSNotification.castFromPointer(_ret, retain: true, release: true); + } + + static NSNotification notificationWithName_object_userInfo_( + NSString aName, NSObject? anObject, NSDictionary? aUserInfo) { + final _ret = _objc_msgSend_312( + _class_NSNotification, + _sel_notificationWithName_object_userInfo_, + aName.pointer, + anObject?.pointer ?? ffi.nullptr, + aUserInfo?.pointer ?? ffi.nullptr); + return NSNotification.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSNotification init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSNotification.castFromPointer(_ret, retain: true, release: true); + } + + static NSNotification new1() { + final _ret = _objc_msgSend_2(_class_NSNotification, _sel_new); + return NSNotification.castFromPointer(_ret, retain: false, release: true); + } + + static NSNotification allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSNotification, _sel_allocWithZone_, zone); + return NSNotification.castFromPointer(_ret, retain: false, release: true); + } + + static NSNotification alloc() { + final _ret = _objc_msgSend_2(_class_NSNotification, _sel_alloc); + return NSNotification.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSNotification = objc.getClass("NSNotification"); +late final _sel_name = objc.registerName("name"); +late final _sel_object = objc.registerName("object"); +late final _sel_userInfo = objc.registerName("userInfo"); +late final _sel_initWithName_object_userInfo_ = + objc.registerName("initWithName:object:userInfo:"); +final _objc_msgSend_312 = 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_notificationWithName_object_ = + objc.registerName("notificationWithName:object:"); +late final _sel_notificationWithName_object_userInfo_ = + objc.registerName("notificationWithName:object:userInfo:"); + +class NSDate extends NSObject { + NSDate._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSDate] that points to the same underlying object as [other]. + NSDate.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSDate] that wraps the given raw object pointer. + NSDate.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSDate]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSDate); + } + + double get timeIntervalSinceReferenceDate { + return objc.useMsgSendVariants + ? _objc_msgSend_90Fpret( + this.pointer, _sel_timeIntervalSinceReferenceDate) + : _objc_msgSend_90(this.pointer, _sel_timeIntervalSinceReferenceDate); + } + + @override + NSDate init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + NSDate initWithTimeIntervalSinceReferenceDate_(double ti) { + final _ret = _objc_msgSend_313( + this.pointer, _sel_initWithTimeIntervalSinceReferenceDate_, ti); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + NSDate? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSDate.castFromPointer(_ret, retain: true, release: true); + } + + double timeIntervalSinceDate_(NSDate anotherDate) { + return objc.useMsgSendVariants + ? _objc_msgSend_314Fpret( + this.pointer, _sel_timeIntervalSinceDate_, anotherDate.pointer) + : _objc_msgSend_314( + this.pointer, _sel_timeIntervalSinceDate_, anotherDate.pointer); + } + + double get timeIntervalSinceNow { + return objc.useMsgSendVariants + ? _objc_msgSend_90Fpret(this.pointer, _sel_timeIntervalSinceNow) + : _objc_msgSend_90(this.pointer, _sel_timeIntervalSinceNow); + } + + double get timeIntervalSince1970 { + return objc.useMsgSendVariants + ? _objc_msgSend_90Fpret(this.pointer, _sel_timeIntervalSince1970) + : _objc_msgSend_90(this.pointer, _sel_timeIntervalSince1970); + } + + NSObject addTimeInterval_(double seconds) { + final _ret = + _objc_msgSend_313(this.pointer, _sel_addTimeInterval_, seconds); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSDate dateByAddingTimeInterval_(double ti) { + final _ret = + _objc_msgSend_313(this.pointer, _sel_dateByAddingTimeInterval_, ti); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + NSDate earlierDate_(NSDate anotherDate) { + final _ret = + _objc_msgSend_315(this.pointer, _sel_earlierDate_, anotherDate.pointer); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + NSDate laterDate_(NSDate anotherDate) { + final _ret = + _objc_msgSend_315(this.pointer, _sel_laterDate_, anotherDate.pointer); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + int compare_(NSDate other) { + return _objc_msgSend_316(this.pointer, _sel_compare_, other.pointer); + } + + bool isEqualToDate_(NSDate otherDate) { + return _objc_msgSend_317( + this.pointer, _sel_isEqualToDate_, otherDate.pointer); + } + + NSString get description { + final _ret = _objc_msgSend_32(this.pointer, _sel_description); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _objc_msgSend_93(this.pointer, _sel_descriptionWithLocale_, + locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate date() { + final _ret = _objc_msgSend_2(_class_NSDate, _sel_date); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate dateWithTimeIntervalSinceNow_(double secs) { + final _ret = _objc_msgSend_313( + _class_NSDate, _sel_dateWithTimeIntervalSinceNow_, secs); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate dateWithTimeIntervalSinceReferenceDate_(double ti) { + final _ret = _objc_msgSend_313( + _class_NSDate, _sel_dateWithTimeIntervalSinceReferenceDate_, ti); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate dateWithTimeIntervalSince1970_(double secs) { + final _ret = _objc_msgSend_313( + _class_NSDate, _sel_dateWithTimeIntervalSince1970_, secs); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate dateWithTimeInterval_sinceDate_( + double secsToBeAdded, NSDate date) { + final _ret = _objc_msgSend_318(_class_NSDate, + _sel_dateWithTimeInterval_sinceDate_, secsToBeAdded, date.pointer); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate getDistantFuture() { + final _ret = _objc_msgSend_319(_class_NSDate, _sel_distantFuture); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate getDistantPast() { + final _ret = _objc_msgSend_319(_class_NSDate, _sel_distantPast); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate getNow() { + final _ret = _objc_msgSend_319(_class_NSDate, _sel_now); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + NSDate initWithTimeIntervalSinceNow_(double secs) { + final _ret = _objc_msgSend_313( + this.pointer, _sel_initWithTimeIntervalSinceNow_, secs); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + NSDate initWithTimeIntervalSince1970_(double secs) { + final _ret = _objc_msgSend_313( + this.pointer, _sel_initWithTimeIntervalSince1970_, secs); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + NSDate initWithTimeInterval_sinceDate_(double secsToBeAdded, NSDate date) { + final _ret = _objc_msgSend_318(this.pointer, + _sel_initWithTimeInterval_sinceDate_, secsToBeAdded, date.pointer); + return NSDate.castFromPointer(_ret, retain: true, release: true); + } + + static NSDate new1() { + final _ret = _objc_msgSend_2(_class_NSDate, _sel_new); + return NSDate.castFromPointer(_ret, retain: false, release: true); + } + + static NSDate allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSDate, _sel_allocWithZone_, zone); + return NSDate.castFromPointer(_ret, retain: false, release: true); + } + + static NSDate alloc() { + final _ret = _objc_msgSend_2(_class_NSDate, _sel_alloc); + return NSDate.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSDate = objc.getClass("NSDate"); +late final _sel_timeIntervalSinceReferenceDate = + objc.registerName("timeIntervalSinceReferenceDate"); +late final _sel_initWithTimeIntervalSinceReferenceDate_ = + objc.registerName("initWithTimeIntervalSinceReferenceDate:"); +final _objc_msgSend_313 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, ffi.Double)>>() + .asFunction< + instancetype Function(ffi.Pointer, + ffi.Pointer, double)>(); +late final _sel_timeIntervalSinceDate_ = + objc.registerName("timeIntervalSinceDate:"); +final _objc_msgSend_314 = 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_314Fpret = objc.msgSendFpretPointer + .cast< + ffi.NativeFunction< + ffi.Double Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + double Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_timeIntervalSinceNow = + objc.registerName("timeIntervalSinceNow"); +late final _sel_timeIntervalSince1970 = + objc.registerName("timeIntervalSince1970"); +late final _sel_addTimeInterval_ = objc.registerName("addTimeInterval:"); +late final _sel_dateByAddingTimeInterval_ = + objc.registerName("dateByAddingTimeInterval:"); +late final _sel_earlierDate_ = objc.registerName("earlierDate:"); +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_laterDate_ = objc.registerName("laterDate:"); +final _objc_msgSend_316 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Int32 Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + int Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +late final _sel_isEqualToDate_ = objc.registerName("isEqualToDate:"); +final _objc_msgSend_317 = 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_date = objc.registerName("date"); +late final _sel_dateWithTimeIntervalSinceNow_ = + objc.registerName("dateWithTimeIntervalSinceNow:"); +late final _sel_dateWithTimeIntervalSinceReferenceDate_ = + objc.registerName("dateWithTimeIntervalSinceReferenceDate:"); +late final _sel_dateWithTimeIntervalSince1970_ = + objc.registerName("dateWithTimeIntervalSince1970:"); +late final _sel_dateWithTimeInterval_sinceDate_ = + objc.registerName("dateWithTimeInterval:sinceDate:"); +final _objc_msgSend_318 = 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)>(); +late final _sel_distantFuture = objc.registerName("distantFuture"); +final _objc_msgSend_319 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, ffi.Pointer)>(); +late final _sel_distantPast = objc.registerName("distantPast"); +late final _sel_now = objc.registerName("now"); +late final _sel_initWithTimeIntervalSinceNow_ = + objc.registerName("initWithTimeIntervalSinceNow:"); +late final _sel_initWithTimeIntervalSince1970_ = + objc.registerName("initWithTimeIntervalSince1970:"); +late final _sel_initWithTimeInterval_sinceDate_ = + objc.registerName("initWithTimeInterval:sinceDate:"); + +class NSMutableDictionary extends NSDictionary { + NSMutableDictionary._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMutableDictionary] that points to the same underlying object as [other]. + NSMutableDictionary.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMutableDictionary] that wraps the given raw object pointer. + NSMutableDictionary.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMutableDictionary]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableDictionary); + } + + void removeObjectForKey_(NSObject aKey) { + _objc_msgSend_198(this.pointer, _sel_removeObjectForKey_, aKey.pointer); + } + + void setObject_forKey_(NSObject anObject, NSObject aKey) { + _objc_msgSend_320( + this.pointer, _sel_setObject_forKey_, anObject.pointer, aKey.pointer); + } + + @override + NSMutableDictionary init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + NSMutableDictionary initWithCapacity_(int numItems) { + final _ret = + _objc_msgSend_97(this.pointer, _sel_initWithCapacity_, numItems); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableDictionary? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + void addEntriesFromDictionary_(NSDictionary otherDictionary) { + _objc_msgSend_321( + this.pointer, _sel_addEntriesFromDictionary_, otherDictionary.pointer); + } + + void removeAllObjects() { + _objc_msgSend_1(this.pointer, _sel_removeAllObjects); + } + + void removeObjectsForKeys_(NSArray keyArray) { + _objc_msgSend_291( + this.pointer, _sel_removeObjectsForKeys_, keyArray.pointer); + } + + void setDictionary_(NSDictionary otherDictionary) { + _objc_msgSend_321( + this.pointer, _sel_setDictionary_, otherDictionary.pointer); + } + + void setObject_forKeyedSubscript_(NSObject? obj, NSObject key) { + _objc_msgSend_322(this.pointer, _sel_setObject_forKeyedSubscript_, + obj?.pointer ?? ffi.nullptr, key.pointer); + } + + static NSMutableDictionary dictionaryWithCapacity_(int numItems) { + final _ret = _objc_msgSend_97( + _class_NSMutableDictionary, _sel_dictionaryWithCapacity_, numItems); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary? dictionaryWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_323(_class_NSMutableDictionary, + _sel_dictionaryWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary? dictionaryWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_324(_class_NSMutableDictionary, + _sel_dictionaryWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + NSMutableDictionary? initWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_323( + this.pointer, _sel_initWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + NSMutableDictionary? initWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_324( + this.pointer, _sel_initWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithSharedKeySet_(NSObject keyset) { + final _ret = _objc_msgSend_325(_class_NSMutableDictionary, + _sel_dictionaryWithSharedKeySet_, keyset.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableDictionary initWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _objc_msgSend_171( + this.pointer, _sel_initWithObjects_forKeys_count_, objects, keys, cnt); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary dictionary() { + final _ret = _objc_msgSend_2(_class_NSMutableDictionary, _sel_dictionary); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObject_forKey_( + NSObject object, NSObject key) { + final _ret = _objc_msgSend_183(_class_NSMutableDictionary, + _sel_dictionaryWithObject_forKey_, object.pointer, key.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObjects_forKeys_count_( + ffi.Pointer> objects, + ffi.Pointer> keys, + int cnt) { + final _ret = _objc_msgSend_171(_class_NSMutableDictionary, + _sel_dictionaryWithObjects_forKeys_count_, objects, keys, cnt); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObjectsAndKeys_( + NSObject firstObject) { + final _ret = _objc_msgSend_148(_class_NSMutableDictionary, + _sel_dictionaryWithObjectsAndKeys_, firstObject.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithDictionary_(NSDictionary dict) { + final _ret = _objc_msgSend_184(_class_NSMutableDictionary, + _sel_dictionaryWithDictionary_, dict.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSMutableDictionary dictionaryWithObjects_forKeys_( + NSArray objects, NSArray keys) { + final _ret = _objc_msgSend_185(_class_NSMutableDictionary, + _sel_dictionaryWithObjects_forKeys_, objects.pointer, keys.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableDictionary initWithObjectsAndKeys_(NSObject firstObject) { + final _ret = _objc_msgSend_148( + this.pointer, _sel_initWithObjectsAndKeys_, firstObject.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableDictionary initWithDictionary_(NSDictionary otherDictionary) { + final _ret = _objc_msgSend_184( + this.pointer, _sel_initWithDictionary_, otherDictionary.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + @override + NSMutableDictionary initWithDictionary_copyItems_( + NSDictionary otherDictionary, bool flag) { + final _ret = _objc_msgSend_186(this.pointer, + _sel_initWithDictionary_copyItems_, otherDictionary.pointer, flag); + return NSMutableDictionary.castFromPointer(_ret, + retain: false, release: true); + } + + @override + NSMutableDictionary initWithObjects_forKeys_(NSArray objects, NSArray keys) { + final _ret = _objc_msgSend_185(this.pointer, _sel_initWithObjects_forKeys_, + objects.pointer, keys.pointer); + return NSMutableDictionary.castFromPointer(_ret, + retain: true, release: true); + } + + static NSDictionary? dictionaryWithContentsOfURL_error_( + NSURL url, ffi.Pointer> error) { + final _ret = _objc_msgSend_187(_class_NSMutableDictionary, + _sel_dictionaryWithContentsOfURL_error_, url.pointer, error); + return _ret.address == 0 + ? null + : NSDictionary.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject sharedKeySetForKeys_(NSArray keys) { + final _ret = _objc_msgSend_149( + _class_NSMutableDictionary, _sel_sharedKeySetForKeys_, keys.pointer); + return NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableDictionary new1() { + final _ret = _objc_msgSend_2(_class_NSMutableDictionary, _sel_new); + return NSMutableDictionary.castFromPointer(_ret, + retain: false, release: true); + } + + static NSMutableDictionary allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSMutableDictionary, _sel_allocWithZone_, zone); + return NSMutableDictionary.castFromPointer(_ret, + retain: false, release: true); + } + + static NSMutableDictionary alloc() { + final _ret = _objc_msgSend_2(_class_NSMutableDictionary, _sel_alloc); + return NSMutableDictionary.castFromPointer(_ret, + retain: false, release: true); + } +} + +late final _class_NSMutableDictionary = objc.getClass("NSMutableDictionary"); +late final _sel_removeObjectForKey_ = objc.registerName("removeObjectForKey:"); +late final _sel_setObject_forKey_ = objc.registerName("setObject:forKey:"); +final _objc_msgSend_320 = 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_addEntriesFromDictionary_ = + objc.registerName("addEntriesFromDictionary:"); +final _objc_msgSend_321 = 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_removeObjectsForKeys_ = + objc.registerName("removeObjectsForKeys:"); +late final _sel_setDictionary_ = objc.registerName("setDictionary:"); +late final _sel_setObject_forKeyedSubscript_ = + objc.registerName("setObject:forKeyedSubscript:"); +final _objc_msgSend_322 = 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_dictionaryWithCapacity_ = + objc.registerName("dictionaryWithCapacity:"); +final _objc_msgSend_323 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Pointer)>(); +final _objc_msgSend_324 = 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_dictionaryWithSharedKeySet_ = + objc.registerName("dictionaryWithSharedKeySet:"); +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)>(); + +class NSSet extends NSObject { + NSSet._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSSet] that points to the same underlying object as [other]. + NSSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSSet] that wraps the given raw object pointer. + NSSet.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSSet]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSSet); + } + + int get count { + return _objc_msgSend_12(this.pointer, _sel_count); + } + + NSObject? member_(NSObject object) { + final _ret = _objc_msgSend_170(this.pointer, _sel_member_, object.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + NSEnumerator objectEnumerator() { + final _ret = _objc_msgSend_108(this.pointer, _sel_objectEnumerator); + return NSEnumerator.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSSet init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSArray get allObjects { + final _ret = _objc_msgSend_172(this.pointer, _sel_allObjects); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSObject? anyObject() { + final _ret = _objc_msgSend_61(this.pointer, _sel_anyObject); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + bool containsObject_(NSObject anObject) { + return _objc_msgSend_0( + this.pointer, _sel_containsObject_, anObject.pointer); + } + + NSString get description { + final _ret = _objc_msgSend_32(this.pointer, _sel_description); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + NSString descriptionWithLocale_(NSObject? locale) { + final _ret = _objc_msgSend_93(this.pointer, _sel_descriptionWithLocale_, + locale?.pointer ?? ffi.nullptr); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + bool intersectsSet_(NSSet otherSet) { + return _objc_msgSend_326( + this.pointer, _sel_intersectsSet_, otherSet.pointer); + } + + bool isEqualToSet_(NSSet otherSet) { + return _objc_msgSend_326( + this.pointer, _sel_isEqualToSet_, otherSet.pointer); + } + + bool isSubsetOfSet_(NSSet otherSet) { + return _objc_msgSend_326( + this.pointer, _sel_isSubsetOfSet_, otherSet.pointer); + } + + void makeObjectsPerformSelector_(ffi.Pointer aSelector) { + _objc_msgSend_7(this.pointer, _sel_makeObjectsPerformSelector_, aSelector); + } + + void makeObjectsPerformSelector_withObject_( + ffi.Pointer aSelector, NSObject? argument) { + _objc_msgSend_114(this.pointer, _sel_makeObjectsPerformSelector_withObject_, + aSelector, argument?.pointer ?? ffi.nullptr); + } + + NSSet setByAddingObject_(NSObject anObject) { + final _ret = _objc_msgSend_327( + this.pointer, _sel_setByAddingObject_, anObject.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet setByAddingObjectsFromSet_(NSSet other) { + final _ret = _objc_msgSend_328( + this.pointer, _sel_setByAddingObjectsFromSet_, other.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet setByAddingObjectsFromArray_(NSArray other) { + final _ret = _objc_msgSend_329( + this.pointer, _sel_setByAddingObjectsFromArray_, other.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + void enumerateObjectsUsingBlock_( + ObjCBlock_ffiVoid_objcObjCObject_bool block) { + _objc_msgSend_330( + this.pointer, _sel_enumerateObjectsUsingBlock_, block.pointer); + } + + void enumerateObjectsWithOptions_usingBlock_( + int opts, ObjCBlock_ffiVoid_objcObjCObject_bool block) { + _objc_msgSend_331(this.pointer, + _sel_enumerateObjectsWithOptions_usingBlock_, opts, block.pointer); + } + + NSSet objectsPassingTest_(ObjCBlock_bool_objcObjCObject_bool predicate) { + final _ret = _objc_msgSend_332( + this.pointer, _sel_objectsPassingTest_, predicate.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet objectsWithOptions_passingTest_( + int opts, ObjCBlock_bool_objcObjCObject_bool predicate) { + final _ret = _objc_msgSend_333(this.pointer, + _sel_objectsWithOptions_passingTest_, opts, predicate.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSSet set1() { + final _ret = _objc_msgSend_2(_class_NSSet, _sel_set); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSSet setWithObject_(NSObject object) { + final _ret = + _objc_msgSend_148(_class_NSSet, _sel_setWithObject_, object.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSSet setWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + _class_NSSet, _sel_setWithObjects_count_, objects, cnt); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSSet setWithObjects_(NSObject firstObj) { + final _ret = + _objc_msgSend_148(_class_NSSet, _sel_setWithObjects_, firstObj.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSSet setWithSet_(NSSet set) { + final _ret = _objc_msgSend_334(_class_NSSet, _sel_setWithSet_, set.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSSet setWithArray_(NSArray array) { + final _ret = + _objc_msgSend_149(_class_NSSet, _sel_setWithArray_, array.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet initWithObjects_(NSObject firstObj) { + final _ret = _objc_msgSend_148( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet initWithSet_(NSSet set) { + final _ret = + _objc_msgSend_334(this.pointer, _sel_initWithSet_, set.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + NSSet initWithSet_copyItems_(NSSet set, bool flag) { + final _ret = _objc_msgSend_335( + this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); + return NSSet.castFromPointer(_ret, retain: false, release: true); + } + + NSSet initWithArray_(NSArray array) { + final _ret = + _objc_msgSend_149(this.pointer, _sel_initWithArray_, array.pointer); + return NSSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSSet new1() { + final _ret = _objc_msgSend_2(_class_NSSet, _sel_new); + return NSSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = _objc_msgSend_3(_class_NSSet, _sel_allocWithZone_, zone); + return NSSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSSet alloc() { + final _ret = _objc_msgSend_2(_class_NSSet, _sel_alloc); + return NSSet.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSSet = objc.getClass("NSSet"); +late final _sel_member_ = objc.registerName("member:"); +late final _sel_anyObject = objc.registerName("anyObject"); +late final _sel_intersectsSet_ = objc.registerName("intersectsSet:"); +final _objc_msgSend_326 = 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_isEqualToSet_ = objc.registerName("isEqualToSet:"); +late final _sel_isSubsetOfSet_ = objc.registerName("isSubsetOfSet:"); +late final _sel_setByAddingObject_ = objc.registerName("setByAddingObject:"); +final _objc_msgSend_327 = 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_setByAddingObjectsFromSet_ = + objc.registerName("setByAddingObjectsFromSet:"); +final _objc_msgSend_328 = 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_setByAddingObjectsFromArray_ = + objc.registerName("setByAddingObjectsFromArray:"); +final _objc_msgSend_329 = 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_objcObjCObject_bool_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); +final _ObjCBlock_ffiVoid_objcObjCObject_bool_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_objcObjCObject_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_bool_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_ffiVoid_objcObjCObject_bool_closureRegistryIndex; + _ObjCBlock_ffiVoid_objcObjCObject_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_objcObjCObject_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_objcObjCObject_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_objcObjCObject_bool extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_bool._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_objcObjCObject_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._( + objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_bool_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_bool.fromFunction( + void Function(NSObject, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_bool_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_bool_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), arg1)))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_objcObjCObject_bool.listener( + void Function(NSObject, ffi.Pointer) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_bool_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_bool_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), arg1)))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject arg0, ffi.Pointer 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, arg1); +} + +final _objc_msgSend_330 = 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_331 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +bool _ObjCBlock_bool_objcObjCObject_bool_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); +final _ObjCBlock_bool_objcObjCObject_bool_closureRegistry = + , ffi.Pointer)>{}; +int _ObjCBlock_bool_objcObjCObject_bool_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_bool_objcObjCObject_bool_registerClosure( + bool Function(ffi.Pointer, ffi.Pointer) fn) { + final id = ++_ObjCBlock_bool_objcObjCObject_bool_closureRegistryIndex; + _ObjCBlock_bool_objcObjCObject_bool_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +bool _ObjCBlock_bool_objcObjCObject_bool_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_bool_objcObjCObject_bool_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_bool_objcObjCObject_bool extends objc.ObjCBlockBase { + ObjCBlock_bool_objcObjCObject_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_bool_objcObjCObject_bool castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_bool_objcObjCObject_bool._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_bool_objcObjCObject_bool.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_bool_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_objcObjCObject_bool.fromFunction( + bool Function(NSObject, ffi.Pointer) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_bool_objcObjCObject_bool_closureTrampoline, false) + .cast(), + _ObjCBlock_bool_objcObjCObject_bool_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(NSObject.castFromPointer(arg0, retain: true, release: true), arg1)))); + static ffi.Pointer? _dartFuncTrampoline; + + bool call(NSObject arg0, ffi.Pointer 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); +} + +late final _sel_objectsPassingTest_ = objc.registerName("objectsPassingTest:"); +final _objc_msgSend_332 = 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_objectsWithOptions_passingTest_ = + objc.registerName("objectsWithOptions:passingTest:"); +final _objc_msgSend_333 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_set = objc.registerName("set"); +late final _sel_setWithObject_ = objc.registerName("setWithObject:"); +late final _sel_setWithObjects_count_ = + objc.registerName("setWithObjects:count:"); +late final _sel_setWithObjects_ = objc.registerName("setWithObjects:"); +late final _sel_setWithSet_ = objc.registerName("setWithSet:"); +final _objc_msgSend_334 = 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_setWithArray_ = objc.registerName("setWithArray:"); +late final _sel_initWithSet_ = objc.registerName("initWithSet:"); +late final _sel_initWithSet_copyItems_ = + objc.registerName("initWithSet:copyItems:"); +final _objc_msgSend_335 = 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)>(); + +class NSMutableSet extends NSSet { + NSMutableSet._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMutableSet] that points to the same underlying object as [other]. + NSMutableSet.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMutableSet] that wraps the given raw object pointer. + NSMutableSet.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMutableSet]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableSet); + } + + void addObject_(NSObject object) { + _objc_msgSend_198(this.pointer, _sel_addObject_, object.pointer); + } + + void removeObject_(NSObject object) { + _objc_msgSend_198(this.pointer, _sel_removeObject_, object.pointer); + } + + @override + NSMutableSet? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableSet init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + NSMutableSet initWithCapacity_(int numItems) { + final _ret = + _objc_msgSend_97(this.pointer, _sel_initWithCapacity_, numItems); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + void addObjectsFromArray_(NSArray array) { + _objc_msgSend_291(this.pointer, _sel_addObjectsFromArray_, array.pointer); + } + + void intersectSet_(NSSet otherSet) { + _objc_msgSend_336(this.pointer, _sel_intersectSet_, otherSet.pointer); + } + + void minusSet_(NSSet otherSet) { + _objc_msgSend_336(this.pointer, _sel_minusSet_, otherSet.pointer); + } + + void removeAllObjects() { + _objc_msgSend_1(this.pointer, _sel_removeAllObjects); + } + + void unionSet_(NSSet otherSet) { + _objc_msgSend_336(this.pointer, _sel_unionSet_, otherSet.pointer); + } + + void setSet_(NSSet otherSet) { + _objc_msgSend_336(this.pointer, _sel_setSet_, otherSet.pointer); + } + + static NSMutableSet setWithCapacity_(int numItems) { + final _ret = + _objc_msgSend_97(_class_NSMutableSet, _sel_setWithCapacity_, numItems); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableSet initWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + this.pointer, _sel_initWithObjects_count_, objects, cnt); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableSet set1() { + final _ret = _objc_msgSend_2(_class_NSMutableSet, _sel_set); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableSet setWithObject_(NSObject object) { + final _ret = _objc_msgSend_148( + _class_NSMutableSet, _sel_setWithObject_, object.pointer); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableSet setWithObjects_count_( + ffi.Pointer> objects, int cnt) { + final _ret = _objc_msgSend_98( + _class_NSMutableSet, _sel_setWithObjects_count_, objects, cnt); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableSet setWithObjects_(NSObject firstObj) { + final _ret = _objc_msgSend_148( + _class_NSMutableSet, _sel_setWithObjects_, firstObj.pointer); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableSet setWithSet_(NSSet set) { + final _ret = + _objc_msgSend_334(_class_NSMutableSet, _sel_setWithSet_, set.pointer); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableSet setWithArray_(NSArray array) { + final _ret = _objc_msgSend_149( + _class_NSMutableSet, _sel_setWithArray_, array.pointer); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableSet initWithObjects_(NSObject firstObj) { + final _ret = _objc_msgSend_148( + this.pointer, _sel_initWithObjects_, firstObj.pointer); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableSet initWithSet_(NSSet set) { + final _ret = + _objc_msgSend_334(this.pointer, _sel_initWithSet_, set.pointer); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableSet initWithSet_copyItems_(NSSet set, bool flag) { + final _ret = _objc_msgSend_335( + this.pointer, _sel_initWithSet_copyItems_, set.pointer, flag); + return NSMutableSet.castFromPointer(_ret, retain: false, release: true); + } + + @override + NSMutableSet initWithArray_(NSArray array) { + final _ret = + _objc_msgSend_149(this.pointer, _sel_initWithArray_, array.pointer); + return NSMutableSet.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableSet new1() { + final _ret = _objc_msgSend_2(_class_NSMutableSet, _sel_new); + return NSMutableSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableSet allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSMutableSet, _sel_allocWithZone_, zone); + return NSMutableSet.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableSet alloc() { + final _ret = _objc_msgSend_2(_class_NSMutableSet, _sel_alloc); + return NSMutableSet.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSMutableSet = objc.getClass("NSMutableSet"); +late final _sel_intersectSet_ = objc.registerName("intersectSet:"); +final _objc_msgSend_336 = 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_minusSet_ = objc.registerName("minusSet:"); +late final _sel_unionSet_ = objc.registerName("unionSet:"); +late final _sel_setSet_ = objc.registerName("setSet:"); +late final _sel_setWithCapacity_ = objc.registerName("setWithCapacity:"); + +class NSItemProvider extends NSObject { + NSItemProvider._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSItemProvider] that points to the same underlying object as [other]. + NSItemProvider.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSItemProvider] that wraps the given raw object pointer. + NSItemProvider.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSItemProvider]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSItemProvider); + } + + @override + NSItemProvider init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSItemProvider.castFromPointer(_ret, retain: true, release: true); + } + + void registerDataRepresentationForTypeIdentifier_visibility_loadHandler_( + NSString typeIdentifier, + int visibility, + ObjCBlock_NSProgress_ffiVoidNSDataNSError loadHandler) { + _objc_msgSend_337( + this.pointer, + _sel_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_, + typeIdentifier.pointer, + visibility, + loadHandler.pointer); + } + + void + registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_( + NSString typeIdentifier, + int fileOptions, + int visibility, + ObjCBlock_NSProgress_ffiVoidNSURLboolNSError loadHandler) { + _objc_msgSend_338( + this.pointer, + _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_, + typeIdentifier.pointer, + fileOptions, + visibility, + loadHandler.pointer); + } + + NSArray get registeredTypeIdentifiers { + final _ret = + _objc_msgSend_172(this.pointer, _sel_registeredTypeIdentifiers); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + NSArray registeredTypeIdentifiersWithFileOptions_(int fileOptions) { + final _ret = _objc_msgSend_339(this.pointer, + _sel_registeredTypeIdentifiersWithFileOptions_, fileOptions); + return NSArray.castFromPointer(_ret, retain: true, release: true); + } + + bool hasItemConformingToTypeIdentifier_(NSString typeIdentifier) { + return _objc_msgSend_22(this.pointer, + _sel_hasItemConformingToTypeIdentifier_, typeIdentifier.pointer); + } + + bool hasRepresentationConformingToTypeIdentifier_fileOptions_( + NSString typeIdentifier, int fileOptions) { + return _objc_msgSend_340( + this.pointer, + _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_, + typeIdentifier.pointer, + fileOptions); + } + + NSProgress loadDataRepresentationForTypeIdentifier_completionHandler_( + NSString typeIdentifier, + ObjCBlock_ffiVoid_NSData_NSError completionHandler) { + final _ret = _objc_msgSend_341( + this.pointer, + _sel_loadDataRepresentationForTypeIdentifier_completionHandler_, + typeIdentifier.pointer, + completionHandler.pointer); + return NSProgress.castFromPointer(_ret, retain: true, release: true); + } + + NSProgress loadFileRepresentationForTypeIdentifier_completionHandler_( + NSString typeIdentifier, + ObjCBlock_ffiVoid_NSURL_NSError completionHandler) { + final _ret = _objc_msgSend_342( + this.pointer, + _sel_loadFileRepresentationForTypeIdentifier_completionHandler_, + typeIdentifier.pointer, + completionHandler.pointer); + return NSProgress.castFromPointer(_ret, retain: true, release: true); + } + + NSProgress loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_( + NSString typeIdentifier, + ObjCBlock_ffiVoid_NSURL_bool_NSError completionHandler) { + final _ret = _objc_msgSend_343( + this.pointer, + _sel_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_, + typeIdentifier.pointer, + completionHandler.pointer); + return NSProgress.castFromPointer(_ret, retain: true, release: true); + } + + NSString? get suggestedName { + final _ret = _objc_msgSend_55(this.pointer, _sel_suggestedName); + return _ret.address == 0 + ? null + : NSString.castFromPointer(_ret, retain: true, release: true); + } + + set suggestedName(NSString? value) { + return _objc_msgSend_344( + this.pointer, _sel_setSuggestedName_, value?.pointer ?? ffi.nullptr); + } + + NSItemProvider initWithObject_(NSObject object) { + final _ret = + _objc_msgSend_148(this.pointer, _sel_initWithObject_, object.pointer); + return NSItemProvider.castFromPointer(_ret, retain: true, release: true); + } + + void registerObject_visibility_(NSObject object, int visibility) { + _objc_msgSend_345(this.pointer, _sel_registerObject_visibility_, + object.pointer, visibility); + } + + void registerObjectOfClass_visibility_loadHandler_( + NSObject aClass, + int visibility, + ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError loadHandler) { + _objc_msgSend_346( + this.pointer, + _sel_registerObjectOfClass_visibility_loadHandler_, + aClass.pointer, + visibility, + loadHandler.pointer); + } + + bool canLoadObjectOfClass_(NSObject aClass) { + return _objc_msgSend_0( + this.pointer, _sel_canLoadObjectOfClass_, aClass.pointer); + } + + NSProgress loadObjectOfClass_completionHandler_(NSObject aClass, + ObjCBlock_ffiVoid_objcObjCObject_NSError completionHandler) { + final _ret = _objc_msgSend_347( + this.pointer, + _sel_loadObjectOfClass_completionHandler_, + aClass.pointer, + completionHandler.pointer); + return NSProgress.castFromPointer(_ret, retain: true, release: true); + } + + NSItemProvider initWithItem_typeIdentifier_( + NSObject? item, NSString? typeIdentifier) { + final _ret = _objc_msgSend_348( + this.pointer, + _sel_initWithItem_typeIdentifier_, + item?.pointer ?? ffi.nullptr, + typeIdentifier?.pointer ?? ffi.nullptr); + return NSItemProvider.castFromPointer(_ret, retain: true, release: true); + } + + NSItemProvider? initWithContentsOfURL_(NSURL fileURL) { + final _ret = _objc_msgSend_214( + this.pointer, _sel_initWithContentsOfURL_, fileURL.pointer); + return _ret.address == 0 + ? null + : NSItemProvider.castFromPointer(_ret, retain: true, release: true); + } + + void registerItemForTypeIdentifier_loadHandler_( + NSString typeIdentifier, + ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary + loadHandler) { + _objc_msgSend_349( + this.pointer, + _sel_registerItemForTypeIdentifier_loadHandler_, + typeIdentifier.pointer, + loadHandler.pointer); + } + + void loadItemForTypeIdentifier_options_completionHandler_( + NSString typeIdentifier, + NSDictionary? options, + ObjCBlock_ffiVoid_objcObjCObject_NSError1? completionHandler) { + _objc_msgSend_350( + this.pointer, + _sel_loadItemForTypeIdentifier_options_completionHandler_, + typeIdentifier.pointer, + options?.pointer ?? ffi.nullptr, + completionHandler?.pointer ?? ffi.nullptr); + } + + ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary? + get previewImageHandler { + final _ret = _objc_msgSend_351(this.pointer, _sel_previewImageHandler); + return _ret.address == 0 + ? null + : ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary + .castFromPointer(_ret, retain: true, release: true); + } + + set previewImageHandler( + ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary? + value) { + return _objc_msgSend_352(this.pointer, _sel_setPreviewImageHandler_, + value?.pointer ?? ffi.nullptr); + } + + void loadPreviewImageWithOptions_completionHandler_(NSDictionary options, + ObjCBlock_ffiVoid_objcObjCObject_NSError1 completionHandler) { + _objc_msgSend_353( + this.pointer, + _sel_loadPreviewImageWithOptions_completionHandler_, + options.pointer, + completionHandler.pointer); + } + + static NSItemProvider new1() { + final _ret = _objc_msgSend_2(_class_NSItemProvider, _sel_new); + return NSItemProvider.castFromPointer(_ret, retain: false, release: true); + } + + static NSItemProvider allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSItemProvider, _sel_allocWithZone_, zone); + return NSItemProvider.castFromPointer(_ret, retain: false, release: true); + } + + static NSItemProvider alloc() { + final _ret = _objc_msgSend_2(_class_NSItemProvider, _sel_alloc); + return NSItemProvider.castFromPointer(_ret, retain: false, release: true); + } +} + +late final _class_NSItemProvider = objc.getClass("NSItemProvider"); + +abstract class NSItemProviderRepresentationVisibility { + static const int NSItemProviderRepresentationVisibilityAll = 0; + static const int NSItemProviderRepresentationVisibilityTeam = 1; + static const int NSItemProviderRepresentationVisibilityGroup = 2; + static const int NSItemProviderRepresentationVisibilityOwnProcess = 3; +} + +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_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); +final _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry = + Function(ffi.Pointer)>{}; +int _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure( + ffi.Pointer Function(ffi.Pointer) fn) { + final id = ++_ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistryIndex; + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureRegistry[ + block.ref.target.address]!(arg0); + +class ObjCBlock_NSProgress_ffiVoidNSDataNSError extends objc.ObjCBlockBase { + ObjCBlock_NSProgress_ffiVoidNSDataNSError._( + 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_NSProgress_ffiVoidNSDataNSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_NSProgress_ffiVoidNSDataNSError._(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_NSProgress_ffiVoidNSDataNSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_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_NSProgress_ffiVoidNSDataNSError.fromFunction( + NSProgress? Function(ObjCBlock_ffiVoid_NSData_NSError) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_closureTrampoline) + .cast(), + _ObjCBlock_NSProgress_ffiVoidNSDataNSError_registerClosure( + (ffi.Pointer arg0) => + fn(ObjCBlock_ffiVoid_NSData_NSError.castFromPointer(arg0, retain: true, release: true)) + ?.retainAndReturnPointer() ?? + ffi.nullptr))); + static ffi.Pointer? _dartFuncTrampoline; + + NSProgress? call(ObjCBlock_ffiVoid_NSData_NSError 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 + : NSProgress.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); +} + +class NSProgress extends objc.ObjCObjectBase { + NSProgress._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super(pointer, retain: retain, release: release); + + /// Constructs a [NSProgress] that points to the same underlying object as [other]. + NSProgress.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSProgress] that wraps the given raw object pointer. + NSProgress.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSProgress]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0(obj.pointer, _sel_isKindOfClass_, _class_NSProgress); + } +} + +late final _class_NSProgress = objc.getClass("NSProgress"); +void _ObjCBlock_ffiVoid_NSData_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); +final _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSData_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSData_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_NSData_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSData_NSError._(ffi.Pointer pointer, + {bool retain = false, bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_NSData_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSData_NSError._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_NSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSError_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_NSData_NSError.fromFunction(void Function(NSData?, NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 ? null : NSData.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : 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_NSData_NSError.listener(void Function(NSData?, NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSData_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSData_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSData.castFromPointer(arg0, + retain: true, release: true), + arg1.address == 0 + ? null + : NSError.castFromPointer(arg1, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSData? arg0, 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_registerDataRepresentationForTypeIdentifier_visibility_loadHandler_ = + objc.registerName( + "registerDataRepresentationForTypeIdentifier:visibility:loadHandler:"); +final _objc_msgSend_337 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); + +abstract class NSItemProviderFileOptions { + static const int NSItemProviderFileOptionOpenInPlace = 1; +} + +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_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); +final _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry = + Function(ffi.Pointer)>{}; +int _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( + ffi.Pointer Function(ffi.Pointer) fn) { + final id = + ++_ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistryIndex; + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureRegistry[ + block.ref.target.address]!(arg0); + +class ObjCBlock_NSProgress_ffiVoidNSURLboolNSError extends objc.ObjCBlockBase { + ObjCBlock_NSProgress_ffiVoidNSURLboolNSError._( + 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_NSProgress_ffiVoidNSURLboolNSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_NSProgress_ffiVoidNSURLboolNSError._(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_NSProgress_ffiVoidNSURLboolNSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_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_NSProgress_ffiVoidNSURLboolNSError.fromFunction( + NSProgress? Function(ObjCBlock_ffiVoid_NSURL_bool_NSError) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_closureTrampoline) + .cast(), + _ObjCBlock_NSProgress_ffiVoidNSURLboolNSError_registerClosure( + (ffi.Pointer arg0) => + fn(ObjCBlock_ffiVoid_NSURL_bool_NSError.castFromPointer(arg0, retain: true, release: true)) + ?.retainAndReturnPointer() ?? + ffi.nullptr))); + static ffi.Pointer? _dartFuncTrampoline; + + NSProgress? call(ObjCBlock_ffiVoid_NSURL_bool_NSError 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 + : NSProgress.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); +} + +void _ObjCBlock_ffiVoid_NSURL_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); +final _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry = , bool, ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( + void Function( + ffi.Pointer, bool, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + bool arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_NSURL_bool_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_NSURL_bool_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_NSURL_bool_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_NSURL_bool_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_bool_NSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Bool arg1, ffi.Pointer arg2)>> + ptr) + : this._( + objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_bool_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_NSURL_bool_NSError.fromFunction( + void Function(NSURL?, bool, NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn(arg0.address == 0 ? null : NSURL.castFromPointer(arg0, retain: true, release: true), arg1, arg2.address == 0 ? null : NSError.castFromPointer(arg2, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_NSURL_bool_NSError.listener(void Function(NSURL?, bool, NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Bool, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_bool_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURL_bool_NSError_registerClosure( + (ffi.Pointer arg0, bool arg1, + ffi.Pointer arg2) => + fn( + arg0.address == 0 + ? null + : NSURL.castFromPointer(arg0, retain: true, release: true), + arg1, + arg2.address == 0 ? null : NSError.castFromPointer(arg2, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURL? arg0, bool arg1, 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 ?? ffi.nullptr, arg1, arg2?.pointer ?? ffi.nullptr); +} + +late final _sel_registerFileRepresentationForTypeIdentifier_fileOptions_visibility_loadHandler_ = + objc.registerName( + "registerFileRepresentationForTypeIdentifier:fileOptions:visibility:loadHandler:"); +final _objc_msgSend_338 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + int, + ffi.Pointer)>(); +late final _sel_registeredTypeIdentifiers = + objc.registerName("registeredTypeIdentifiers"); +late final _sel_registeredTypeIdentifiersWithFileOptions_ = + objc.registerName("registeredTypeIdentifiersWithFileOptions:"); +final _objc_msgSend_339 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, ffi.Int32)>>() + .asFunction< + ffi.Pointer Function(ffi.Pointer, + ffi.Pointer, int)>(); +late final _sel_hasItemConformingToTypeIdentifier_ = + objc.registerName("hasItemConformingToTypeIdentifier:"); +late final _sel_hasRepresentationConformingToTypeIdentifier_fileOptions_ = objc + .registerName("hasRepresentationConformingToTypeIdentifier:fileOptions:"); +final _objc_msgSend_340 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +late final _sel_loadDataRepresentationForTypeIdentifier_completionHandler_ = + objc.registerName( + "loadDataRepresentationForTypeIdentifier:completionHandler:"); +final _objc_msgSend_341 = 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_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); +final _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_NSURL_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_NSURL_NSError_closureRegistry[block.ref.target.address]!( + arg0, arg1); + +class ObjCBlock_ffiVoid_NSURL_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_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_ffiVoid_NSURL_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_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_ffiVoid_NSURL_NSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_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_NSURL_NSError.fromFunction(void Function(NSURL?, NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure((ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 ? null : NSURL.castFromPointer(arg0, retain: true, release: true), + arg1.address == 0 ? null : 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_NSURL_NSError.listener(void Function(NSURL?, NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_NSURL_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_NSURL_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSURL.castFromPointer(arg0, + retain: true, release: true), + arg1.address == 0 + ? null + : NSError.castFromPointer(arg1, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSURL? arg0, 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_loadFileRepresentationForTypeIdentifier_completionHandler_ = + objc.registerName( + "loadFileRepresentationForTypeIdentifier:completionHandler:"); +final _objc_msgSend_342 = 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_loadInPlaceFileRepresentationForTypeIdentifier_completionHandler_ = + objc.registerName( + "loadInPlaceFileRepresentationForTypeIdentifier:completionHandler:"); +final _objc_msgSend_343 = 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_suggestedName = objc.registerName("suggestedName"); +late final _sel_setSuggestedName_ = objc.registerName("setSuggestedName:"); +final _objc_msgSend_344 = 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_initWithObject_ = objc.registerName("initWithObject:"); +late final _sel_registerObject_visibility_ = + objc.registerName("registerObject:visibility:"); +final _objc_msgSend_345 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int)>(); +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_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); +final _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureRegistry = + Function(ffi.Pointer)>{}; +int _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_registerClosure( + ffi.Pointer Function(ffi.Pointer) fn) { + final id = + ++_ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureRegistryIndex; + _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +ffi.Pointer + _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0) => + _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureRegistry[ + block.ref.target.address]!(arg0); + +class ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError + extends objc.ObjCBlockBase { + ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError._( + 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_NSProgress_ffiVoidobjcObjCObjectNSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError._(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_NSProgress_ffiVoidobjcObjCObjectNSError.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_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_NSProgress_ffiVoidobjcObjCObjectNSError.fromFunction( + NSProgress? Function(ObjCBlock_ffiVoid_objcObjCObject_NSError) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_closureTrampoline) + .cast(), + _ObjCBlock_NSProgress_ffiVoidobjcObjCObjectNSError_registerClosure( + (ffi.Pointer arg0) => + fn(ObjCBlock_ffiVoid_objcObjCObject_NSError.castFromPointer(arg0, retain: true, release: true)) + ?.retainAndReturnPointer() ?? + ffi.nullptr))); + static ffi.Pointer? _dartFuncTrampoline; + + NSProgress? call(ObjCBlock_ffiVoid_objcObjCObject_NSError 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 + : NSProgress.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); +} + +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); +final _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureRegistryIndex = 0; +ffi.Pointer _ObjCBlock_ffiVoid_objcObjCObject_NSError_registerClosure( + void Function(ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_objcObjCObject_NSError_closureRegistryIndex; + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_objcObjCObject_NSError extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_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_objcObjCObject_NSError castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_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_objcObjCObject_NSError.fromFunctionPointer( + ffi + .Pointer< + ffi + .NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_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_objcObjCObject_NSError.fromFunction( + void Function(NSObject?, NSError?) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_NSError_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(arg0.address == 0 ? null : NSObject.castFromPointer(arg0, retain: true, release: true), arg1.address == 0 ? null : 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_objcObjCObject_NSError.listener(void Function(NSObject?, NSError?) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_NSError_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_NSError_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSObject.castFromPointer(arg0, + retain: true, release: true), + arg1.address == 0 + ? null + : NSError.castFromPointer(arg1, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject? arg0, 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_registerObjectOfClass_visibility_loadHandler_ = + objc.registerName("registerObjectOfClass:visibility:loadHandler:"); +final _objc_msgSend_346 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + ffi.Pointer)>(); +late final _sel_canLoadObjectOfClass_ = + objc.registerName("canLoadObjectOfClass:"); +late final _sel_loadObjectOfClass_completionHandler_ = + objc.registerName("loadObjectOfClass:completionHandler:"); +final _objc_msgSend_347 = 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_initWithItem_typeIdentifier_ = + objc.registerName("initWithItem:typeIdentifier:"); +final _objc_msgSend_348 = 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)>(); +void + _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_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); +final _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureRegistry = + , ffi.Pointer, + ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureRegistryIndex = + 0; +ffi.Pointer + _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_registerClosure( + void Function(ffi.Pointer, ffi.Pointer, + ffi.Pointer) + fn) { + final id = + ++_ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureRegistryIndex; + _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureRegistry[ + id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureRegistry[ + block.ref.target.address]!(arg0, arg1, arg2); + +class ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary + extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary + castFromPointer(ffi.Pointer pointer, + {bool retain = false, bool release = false}) { + return ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary + ._(pointer, retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary.fromFunction( + void Function(ObjCBlock_ffiVoid_objcObjCObject_NSError1, NSObject, NSDictionary) + fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction, ffi.Pointer, ffi.Pointer, ffi.Pointer)>(_ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2) => + fn( + ObjCBlock_ffiVoid_objcObjCObject_NSError1.castFromPointer(arg0, retain: true, release: true), + NSObject.castFromPointer(arg1, retain: true, release: true), + NSDictionary.castFromPointer(arg2, retain: true, release: true))))); + static ffi.Pointer? _dartFuncTrampoline; + + /// Creates a listener block from a Dart function. + /// + /// This is based on FFI's NativeCallable.listener, and has the same + /// capabilities and limitations. This block can be invoked from any thread, + /// but only supports void functions, and is not run synchronously. See + /// NativeCallable.listener for more details. + /// + /// Note that unlike the default behavior of NativeCallable.listener, listener + /// blocks do not keep the isolate alive. + ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary.listener( + void Function( + ObjCBlock_ffiVoid_objcObjCObject_NSError1, NSObject, NSDictionary) + fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= ffi.NativeCallable, ffi.Pointer, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_ffiVoidobjcObjCObjectNSError_objcObjCObject_NSDictionary_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1, ffi.Pointer arg2) => fn( + ObjCBlock_ffiVoid_objcObjCObject_NSError1.castFromPointer(arg0, retain: true, release: true), + NSObject.castFromPointer(arg1, retain: true, release: true), + NSDictionary.castFromPointer(arg2, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(ObjCBlock_ffiVoid_objcObjCObject_NSError1 arg0, NSObject arg1, + NSDictionary arg2) => + pointer.ref.invoke + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>()( + pointer, arg0.pointer, arg1.pointer, arg2.pointer); +} + +void _ObjCBlock_ffiVoid_objcObjCObject_NSError1_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); +final _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureRegistry = , ffi.Pointer)>{}; +int _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureRegistryIndex = 0; +ffi.Pointer + _ObjCBlock_ffiVoid_objcObjCObject_NSError1_registerClosure( + void Function( + ffi.Pointer, ffi.Pointer) + fn) { + final id = ++_ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureRegistryIndex; + _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureRegistry[id] = fn; + return ffi.Pointer.fromAddress(id); +} + +void _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureTrampoline( + ffi.Pointer block, + ffi.Pointer arg0, + ffi.Pointer arg1) => + _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureRegistry[ + block.ref.target.address]!(arg0, arg1); + +class ObjCBlock_ffiVoid_objcObjCObject_NSError1 extends objc.ObjCBlockBase { + ObjCBlock_ffiVoid_objcObjCObject_NSError1._( + ffi.Pointer pointer, + {bool retain = false, + bool release = true}) + : super(pointer, retain: retain, release: release); + + /// Returns a block that wraps the given raw block pointer. + static ObjCBlock_ffiVoid_objcObjCObject_NSError1 castFromPointer( + ffi.Pointer pointer, + {bool retain = false, + bool release = false}) { + return ObjCBlock_ffiVoid_objcObjCObject_NSError1._(pointer, + retain: retain, release: release); + } + + /// Creates a block from a C function pointer. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_NSError1.fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, + ffi.Pointer arg1)>> + ptr) + : this._(objc.newBlock( + _cFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSError1_fnPtrTrampoline) + .cast(), + ptr.cast())); + static ffi.Pointer? _cFuncTrampoline; + + /// Creates a block from a Dart function. + /// + /// This block must be invoked by native code running on the same thread as + /// the isolate that registered it. Invoking the block on the wrong thread + /// will result in a crash. + ObjCBlock_ffiVoid_objcObjCObject_NSError1.fromFunction( + void Function(NSObject?, NSError) fn) + : this._(objc.newBlock( + _dartFuncTrampoline ??= ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>( + _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureTrampoline) + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_NSError1_registerClosure( + (ffi.Pointer arg0, + ffi.Pointer arg1) => + fn(arg0.address == 0 ? null : NSObject.castFromPointer(arg0, retain: true, release: true), 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_objcObjCObject_NSError1.listener( + void Function(NSObject?, NSError) fn) + : this._(objc.newBlock( + (_dartFuncListenerTrampoline ??= + ffi.NativeCallable, ffi.Pointer, ffi.Pointer)>.listener( + _ObjCBlock_ffiVoid_objcObjCObject_NSError1_closureTrampoline) + ..keepIsolateAlive = false) + .nativeFunction + .cast(), + _ObjCBlock_ffiVoid_objcObjCObject_NSError1_registerClosure( + (ffi.Pointer arg0, ffi.Pointer arg1) => fn( + arg0.address == 0 + ? null + : NSObject.castFromPointer(arg0, + retain: true, release: true), + NSError.castFromPointer(arg1, retain: true, release: true))))); + static ffi.NativeCallable< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer)>? _dartFuncListenerTrampoline; + + void call(NSObject? arg0, 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); +} + +late final _sel_registerItemForTypeIdentifier_loadHandler_ = + objc.registerName("registerItemForTypeIdentifier:loadHandler:"); +final _objc_msgSend_349 = 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_loadItemForTypeIdentifier_options_completionHandler_ = + objc.registerName("loadItemForTypeIdentifier:options:completionHandler:"); +final _objc_msgSend_350 = 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_previewImageHandler = objc.registerName("previewImageHandler"); +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_setPreviewImageHandler_ = + objc.registerName("setPreviewImageHandler:"); +final _objc_msgSend_352 = 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_loadPreviewImageWithOptions_completionHandler_ = + objc.registerName("loadPreviewImageWithOptions:completionHandler:"); +final _objc_msgSend_353 = 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)>(); + +class NSMutableString extends NSString { + NSMutableString._(ffi.Pointer pointer, + {bool retain = false, bool release = false}) + : super.castFromPointer(pointer, retain: retain, release: release); + + /// Constructs a [NSMutableString] that points to the same underlying object as [other]. + NSMutableString.castFrom(objc.ObjCObjectBase other) + : this._(other.pointer, retain: true, release: true); + + /// Constructs a [NSMutableString] that wraps the given raw object pointer. + NSMutableString.castFromPointer(ffi.Pointer other, + {bool retain = false, bool release = false}) + : this._(other, retain: retain, release: release); + + /// Returns whether [obj] is an instance of [NSMutableString]. + static bool isInstance(objc.ObjCObjectBase obj) { + return _objc_msgSend_0( + obj.pointer, _sel_isKindOfClass_, _class_NSMutableString); + } + + void replaceCharactersInRange_withString_(_NSRange range, NSString aString) { + _objc_msgSend_354(this.pointer, _sel_replaceCharactersInRange_withString_, + range, aString.pointer); + } + + void insertString_atIndex_(NSString aString, int loc) { + _objc_msgSend_355( + this.pointer, _sel_insertString_atIndex_, aString.pointer, loc); + } + + void deleteCharactersInRange_(_NSRange range) { + _objc_msgSend_295(this.pointer, _sel_deleteCharactersInRange_, range); + } + + void appendString_(NSString aString) { + _objc_msgSend_162(this.pointer, _sel_appendString_, aString.pointer); + } + + void appendFormat_(NSString format) { + _objc_msgSend_162(this.pointer, _sel_appendFormat_, format.pointer); + } + + void setString_(NSString aString) { + _objc_msgSend_162(this.pointer, _sel_setString_, aString.pointer); + } + + int replaceOccurrencesOfString_withString_options_range_(NSString target, + NSString replacement, int options, _NSRange searchRange) { + return _objc_msgSend_356( + this.pointer, + _sel_replaceOccurrencesOfString_withString_options_range_, + target.pointer, + replacement.pointer, + options, + searchRange); + } + + bool applyTransform_reverse_range_updatedRange_(NSString transform, + bool reverse, _NSRange range, ffi.Pointer<_NSRange> resultingRange) { + return _objc_msgSend_357( + this.pointer, + _sel_applyTransform_reverse_range_updatedRange_, + transform.pointer, + reverse, + range, + resultingRange); + } + + NSMutableString initWithCapacity_(int capacity) { + final _ret = + _objc_msgSend_358(this.pointer, _sel_initWithCapacity_, capacity); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString stringWithCapacity_(int capacity) { + final _ret = _objc_msgSend_358( + _class_NSMutableString, _sel_stringWithCapacity_, capacity); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString init() { + final _ret = _objc_msgSend_2(this.pointer, _sel_init); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithCoder_(NSCoder coder) { + final _ret = + _objc_msgSend_14(this.pointer, _sel_initWithCoder_, coder.pointer); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static ffi.Pointer getAvailableStringEncodings() { + return _objc_msgSend_243( + _class_NSMutableString, _sel_availableStringEncodings); + } + + static NSString localizedNameOfStringEncoding_(int encoding) { + final _ret = _objc_msgSend_15( + _class_NSMutableString, _sel_localizedNameOfStringEncoding_, encoding); + return NSString.castFromPointer(_ret, retain: true, release: true); + } + + static int getDefaultCStringEncoding() { + return _objc_msgSend_12( + _class_NSMutableString, _sel_defaultCStringEncoding); + } + + @override + NSMutableString initWithCharactersNoCopy_length_freeWhenDone_( + ffi.Pointer characters, int length, bool freeBuffer) { + final _ret = _objc_msgSend_255( + this.pointer, + _sel_initWithCharactersNoCopy_length_freeWhenDone_, + characters, + length, + freeBuffer); + return NSMutableString.castFromPointer(_ret, retain: false, release: true); + } + + @override + NSMutableString initWithCharactersNoCopy_length_deallocator_( + ffi.Pointer chars, + int len, + ObjCBlock_ffiVoid_ffiUnsignedShort_ffiUnsignedLong? deallocator) { + final _ret = _objc_msgSend_256( + this.pointer, + _sel_initWithCharactersNoCopy_length_deallocator_, + chars, + len, + deallocator?.pointer ?? ffi.nullptr); + return NSMutableString.castFromPointer(_ret, retain: false, release: true); + } + + @override + NSMutableString initWithCharacters_length_( + ffi.Pointer characters, int length) { + final _ret = _objc_msgSend_257( + this.pointer, _sel_initWithCharacters_length_, characters, length); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithUTF8String_( + ffi.Pointer nullTerminatedCString) { + final _ret = _objc_msgSend_258( + this.pointer, _sel_initWithUTF8String_, nullTerminatedCString); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString initWithString_(NSString aString) { + final _ret = + _objc_msgSend_42(this.pointer, _sel_initWithString_, aString.pointer); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_(NSString format) { + final _ret = + _objc_msgSend_42(this.pointer, _sel_initWithFormat_, format.pointer); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_arguments_( + NSString format, ffi.Pointer<__va_list_tag> argList) { + final _ret = _objc_msgSend_259( + this.pointer, _sel_initWithFormat_arguments_, format.pointer, argList); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_locale_(NSString format, NSObject? locale) { + final _ret = _objc_msgSend_260(this.pointer, _sel_initWithFormat_locale_, + format.pointer, locale?.pointer ?? ffi.nullptr); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString initWithFormat_locale_arguments_( + NSString format, NSObject? locale, ffi.Pointer<__va_list_tag> argList) { + final _ret = _objc_msgSend_261( + this.pointer, + _sel_initWithFormat_locale_arguments_, + format.pointer, + locale?.pointer ?? ffi.nullptr, + argList); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _objc_msgSend_262( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_error_, + format.pointer, + validFormatSpecifiers.pointer, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithValidatedFormat_validFormatSpecifiers_locale_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + ffi.Pointer> error) { + final _ret = _objc_msgSend_263( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_locale_error_, + format.pointer, + validFormatSpecifiers.pointer, + locale?.pointer ?? ffi.nullptr, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? + initWithValidatedFormat_validFormatSpecifiers_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer<__va_list_tag> argList, + ffi.Pointer> error) { + final _ret = _objc_msgSend_264( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_arguments_error_, + format.pointer, + validFormatSpecifiers.pointer, + argList, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? + initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_( + NSString format, + NSString validFormatSpecifiers, + NSObject? locale, + ffi.Pointer<__va_list_tag> argList, + ffi.Pointer> error) { + final _ret = _objc_msgSend_265( + this.pointer, + _sel_initWithValidatedFormat_validFormatSpecifiers_locale_arguments_error_, + format.pointer, + validFormatSpecifiers.pointer, + locale?.pointer ?? ffi.nullptr, + argList, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithData_encoding_(NSData data, int encoding) { + final _ret = _objc_msgSend_266( + this.pointer, _sel_initWithData_encoding_, data.pointer, encoding); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithBytes_length_encoding_( + ffi.Pointer bytes, int len, int encoding) { + final _ret = _objc_msgSend_267(this.pointer, + _sel_initWithBytes_length_encoding_, bytes, len, encoding); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithBytesNoCopy_length_encoding_freeWhenDone_( + ffi.Pointer bytes, int len, int encoding, bool freeBuffer) { + final _ret = _objc_msgSend_268( + this.pointer, + _sel_initWithBytesNoCopy_length_encoding_freeWhenDone_, + bytes, + len, + encoding, + freeBuffer); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: false, release: true); + } + + @override + NSMutableString? initWithBytesNoCopy_length_encoding_deallocator_( + ffi.Pointer bytes, + int len, + int encoding, + ObjCBlock_ffiVoid_ffiVoid_ffiUnsignedLong? deallocator) { + final _ret = _objc_msgSend_269( + this.pointer, + _sel_initWithBytesNoCopy_length_encoding_deallocator_, + bytes, + len, + encoding, + deallocator?.pointer ?? ffi.nullptr); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: false, release: true); + } + + static NSMutableString string() { + final _ret = _objc_msgSend_2(_class_NSMutableString, _sel_string); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString stringWithString_(NSString string) { + final _ret = _objc_msgSend_42( + _class_NSMutableString, _sel_stringWithString_, string.pointer); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString stringWithCharacters_length_( + ffi.Pointer characters, int length) { + final _ret = _objc_msgSend_257(_class_NSMutableString, + _sel_stringWithCharacters_length_, characters, length); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? stringWithUTF8String_( + ffi.Pointer nullTerminatedCString) { + final _ret = _objc_msgSend_258(_class_NSMutableString, + _sel_stringWithUTF8String_, nullTerminatedCString); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString stringWithFormat_(NSString format) { + final _ret = _objc_msgSend_42( + _class_NSMutableString, _sel_stringWithFormat_, format.pointer); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString localizedStringWithFormat_(NSString format) { + final _ret = _objc_msgSend_42(_class_NSMutableString, + _sel_localizedStringWithFormat_, format.pointer); + return NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? + stringWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _objc_msgSend_262( + _class_NSMutableString, + _sel_stringWithValidatedFormat_validFormatSpecifiers_error_, + format.pointer, + validFormatSpecifiers.pointer, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? + localizedStringWithValidatedFormat_validFormatSpecifiers_error_( + NSString format, + NSString validFormatSpecifiers, + ffi.Pointer> error) { + final _ret = _objc_msgSend_262( + _class_NSMutableString, + _sel_localizedStringWithValidatedFormat_validFormatSpecifiers_error_, + format.pointer, + validFormatSpecifiers.pointer, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithCString_encoding_( + ffi.Pointer nullTerminatedCString, int encoding) { + final _ret = _objc_msgSend_270(this.pointer, _sel_initWithCString_encoding_, + nullTerminatedCString, encoding); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? stringWithCString_encoding_( + ffi.Pointer cString, int enc) { + final _ret = _objc_msgSend_270( + _class_NSMutableString, _sel_stringWithCString_encoding_, cString, enc); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithContentsOfURL_encoding_error_( + NSURL url, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_271(this.pointer, + _sel_initWithContentsOfURL_encoding_error_, url.pointer, enc, error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithContentsOfFile_encoding_error_( + NSString path, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_272(this.pointer, + _sel_initWithContentsOfFile_encoding_error_, path.pointer, enc, error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? stringWithContentsOfURL_encoding_error_( + NSURL url, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_271(_class_NSMutableString, + _sel_stringWithContentsOfURL_encoding_error_, url.pointer, enc, error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? stringWithContentsOfFile_encoding_error_( + NSString path, int enc, ffi.Pointer> error) { + final _ret = _objc_msgSend_272( + _class_NSMutableString, + _sel_stringWithContentsOfFile_encoding_error_, + path.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithContentsOfURL_usedEncoding_error_( + NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_273( + this.pointer, + _sel_initWithContentsOfURL_usedEncoding_error_, + url.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + @override + NSMutableString? initWithContentsOfFile_usedEncoding_error_( + NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_274( + this.pointer, + _sel_initWithContentsOfFile_usedEncoding_error_, + path.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? stringWithContentsOfURL_usedEncoding_error_( + NSURL url, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_273( + _class_NSMutableString, + _sel_stringWithContentsOfURL_usedEncoding_error_, + url.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static NSMutableString? stringWithContentsOfFile_usedEncoding_error_( + NSString path, + ffi.Pointer enc, + ffi.Pointer> error) { + final _ret = _objc_msgSend_274( + _class_NSMutableString, + _sel_stringWithContentsOfFile_usedEncoding_error_, + path.pointer, + enc, + error); + return _ret.address == 0 + ? null + : NSMutableString.castFromPointer(_ret, retain: true, release: true); + } + + static int + stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_( + NSData data, + NSDictionary? opts, + ffi.Pointer> string, + ffi.Pointer usedLossyConversion) { + return _objc_msgSend_275( + _class_NSMutableString, + _sel_stringEncodingForData_encodingOptions_convertedString_usedLossyConversion_, + data.pointer, + opts?.pointer ?? ffi.nullptr, + string, + usedLossyConversion); + } + + static NSObject? stringWithContentsOfFile_(NSString path) { + final _ret = _objc_msgSend_49( + _class_NSMutableString, _sel_stringWithContentsOfFile_, path.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } + + static NSObject? stringWithContentsOfURL_(NSURL url) { + final _ret = _objc_msgSend_214( + _class_NSMutableString, _sel_stringWithContentsOfURL_, url.pointer); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } - @ffi.Int() - external int flags; + static NSObject? stringWithCString_length_( + ffi.Pointer bytes, int length) { + final _ret = _objc_msgSend_270( + _class_NSMutableString, _sel_stringWithCString_length_, bytes, length); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } - @ffi.Int() - external int reserved; + static NSObject? stringWithCString_(ffi.Pointer bytes) { + final _ret = _objc_msgSend_258( + _class_NSMutableString, _sel_stringWithCString_, bytes); + return _ret.address == 0 + ? null + : NSObject.castFromPointer(_ret, retain: true, release: true); + } - external ffi.Pointer invoke; + static NSMutableString new1() { + final _ret = _objc_msgSend_2(_class_NSMutableString, _sel_new); + return NSMutableString.castFromPointer(_ret, retain: false, release: true); + } - external ffi.Pointer descriptor; + static NSMutableString allocWithZone_(ffi.Pointer<_NSZone> zone) { + final _ret = + _objc_msgSend_3(_class_NSMutableString, _sel_allocWithZone_, zone); + return NSMutableString.castFromPointer(_ret, retain: false, release: true); + } - external ffi.Pointer target; + static NSMutableString alloc() { + final _ret = _objc_msgSend_2(_class_NSMutableString, _sel_alloc); + return NSMutableString.castFromPointer(_ret, retain: false, release: true); + } } -typedef ObjCBlockDesc = _ObjCBlockDesc; -typedef ObjCBlock = _ObjCBlock; +late final _class_NSMutableString = objc.getClass("NSMutableString"); +late final _sel_replaceCharactersInRange_withString_ = + objc.registerName("replaceCharactersInRange:withString:"); +final _objc_msgSend_354 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>>() + .asFunction< + void Function( + ffi.Pointer, + ffi.Pointer, + _NSRange, + ffi.Pointer)>(); +late final _sel_insertString_atIndex_ = + objc.registerName("insertString:atIndex:"); +final _objc_msgSend_355 = 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_deleteCharactersInRange_ = + objc.registerName("deleteCharactersInRange:"); +late final _sel_appendString_ = objc.registerName("appendString:"); +late final _sel_appendFormat_ = objc.registerName("appendFormat:"); +late final _sel_setString_ = objc.registerName("setString:"); +late final _sel_replaceOccurrencesOfString_withString_options_range_ = + objc.registerName("replaceOccurrencesOfString:withString:options:range:"); +final _objc_msgSend_356 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.UnsignedLong Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Int32, + _NSRange)>>() + .asFunction< + int Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + int, + _NSRange)>(); +late final _sel_applyTransform_reverse_range_updatedRange_ = + objc.registerName("applyTransform:reverse:range:updatedRange:"); +final _objc_msgSend_357 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Bool, + _NSRange, + ffi.Pointer<_NSRange>)>>() + .asFunction< + bool Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + bool, + _NSRange, + ffi.Pointer<_NSRange>)>(); +final _objc_msgSend_358 = 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_stringWithCapacity_ = objc.registerName("stringWithCapacity:"); diff --git a/pkgs/objective_c/pubspec.yaml b/pkgs/objective_c/pubspec.yaml index 5d104274d..5e2ab89d1 100644 --- a/pkgs/objective_c/pubspec.yaml +++ b/pkgs/objective_c/pubspec.yaml @@ -22,12 +22,18 @@ dependencies: sdk: flutter ffi: ^2.1.0 plugin_platform_interface: ^2.0.2 + yaml: ^3.1.0 dev_dependencies: ffigen: ^11.0.0 flutter_test: sdk: flutter flutter_lints: ^3.0.0 + test: ^1.21.1 + +dependency_overrides: + ffigen: + path: ../ffigen/ flutter: plugin: diff --git a/pkgs/objective_c/src/foundation.h b/pkgs/objective_c/src/foundation.h new file mode 100644 index 000000000..d3a32ad3b --- /dev/null +++ b/pkgs/objective_c/src/foundation.h @@ -0,0 +1,14 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/pkgs/objective_c/test/generate_code_test.dart b/pkgs/objective_c/test/generate_code_test.dart new file mode 100644 index 000000000..e899625ff --- /dev/null +++ b/pkgs/objective_c/test/generate_code_test.dart @@ -0,0 +1,37 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Objective C support is only available on mac. +@TestOn('mac-os') + +import 'dart:io'; + +import 'package:test/test.dart'; + +import '../tool/generate_code.dart' as generate_code; + +void main() { + group('generate_code.dart', () { + test('Runs without exception', () async { + // As well as testing that this returns normally, this also generates + // coverage info for the parts of ffigen that are gated by + // generate-for-package-objective-c. + await expectLater(generate_code.run(), completes); + + // Sanity check the generated code. + final cBindings = + File('lib/src/c_bindings_generated.dart').readAsStringSync(); + expect(cBindings, contains('sel_registerName')); + expect(cBindings, contains('objc_msgSend')); + expect(cBindings, contains('_NSConcreteGlobalBlock')); + expect(cBindings, contains('_ObjCBlock')); + + final objcBindings = File('lib/src/objective_c_bindings_generated.dart') + .readAsStringSync(); + expect(objcBindings, contains('class NSObject')); + expect(objcBindings, contains('class NSString')); + expect(objcBindings, contains('factory NSString(String str)')); + }); + }); +} diff --git a/pkgs/objective_c/test/interface_lists_test.dart b/pkgs/objective_c/test/interface_lists_test.dart new file mode 100644 index 000000000..56f896f35 --- /dev/null +++ b/pkgs/objective_c/test/interface_lists_test.dart @@ -0,0 +1,53 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Objective C support is only available on mac. +@TestOn('mac-os') + +import 'dart:io'; + +import 'package:ffigen/src/code_generator/objc_built_in_functions.dart'; +import 'package:test/test.dart'; +import 'package:yaml/yaml.dart'; + +void main() { + group('Verify interface lists', () { + late List yamlInterfaces; + setUpAll(() { + final yaml = loadYaml(File('ffigen_objc.yaml').readAsStringSync()); + yamlInterfaces = yaml['objc-interfaces']['include'] + .map((dynamic i) => i as String) + .toList() as List + ..sort(); + }); + + test('ObjCBuiltInFunctions.builtInInterfaces', () { + expect(ObjCBuiltInFunctions.builtInInterfaces, yamlInterfaces); + }); + + test('package:objective_c exports all the interfaces', () { + final exportFile = File('lib/objective_c.dart').readAsStringSync(); + for (final intf in yamlInterfaces) { + expect(exportFile, contains(intf)); + } + }); + + test('All code genned interfaces are included in the list', () { + final classNameRegExp = RegExp(r'^class (\w+) '); + final allClassNames = []; + for (final line in File('lib/src/objective_c_bindings_generated.dart') + .readAsLinesSync()) { + final match = classNameRegExp.firstMatch(line); + if (match != null) { + final className = match[1]!; + if (!className.startsWith('ObjCBlock')) { + allClassNames.add(className); + } + } + } + allClassNames.sort(); + expect(allClassNames, yamlInterfaces); + }); + }); +} diff --git a/pkgs/objective_c/test/nsstring_test.dart b/pkgs/objective_c/test/nsstring_test.dart new file mode 100644 index 000000000..198ba02d7 --- /dev/null +++ b/pkgs/objective_c/test/nsstring_test.dart @@ -0,0 +1,27 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Objective C support is only available on mac. +@TestOn('mac-os') + +import 'package:objective_c/objective_c.dart'; +import 'package:test/test.dart'; + +void main() { + group('NSString', () { + for (final s in ['Hello', '🇵🇬', 'Embedded\u0000Null']) { + test('NSString to/from Dart string [$s]', () { + final ns1 = NSString(s); + expect(ns1.length, s.length); + expect(ns1.toString().length, s.length); + expect(ns1.toString(), s); + + final ns2 = s.toNSString(); + expect(ns2.length, s.length); + expect(ns2.toString().length, s.length); + expect(ns2.toString(), s); + }); + } + }); +} diff --git a/pkgs/objective_c/tool/coverage.sh b/pkgs/objective_c/tool/coverage.sh new file mode 100755 index 000000000..b1e660628 --- /dev/null +++ b/pkgs/objective_c/tool/coverage.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +# for details. All rights reserved. Use of this source code is governed by a +# BSD-style license that can be found in the LICENSE file. + +# Fast fail the script on failures. +set -e + +# Gather coverage. +dart pub global activate coverage +# Generate coverage report. +dart run --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=3000 test & +dart pub global run coverage:collect_coverage --wait-paused --uri=http://127.0.0.1:3000/ -o coverage.json --resume-isolates --scope-output=ffigen --scope-output=objective_c +dart pub global run coverage:format_coverage --check-ignore --packages=.dart_tool/package_config.json --lcov -i coverage.json -o lcov.info diff --git a/pkgs/objective_c/tool/data/extra_methods.dart b/pkgs/objective_c/tool/data/extra_methods.dart new file mode 100644 index 000000000..f40c99a9f --- /dev/null +++ b/pkgs/objective_c/tool/data/extra_methods.dart @@ -0,0 +1,20 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Extra methods inserted into NSString by tool/generate_code.dart. +class NSString extends NSObject { + factory NSString(String str) { + final cstr = str.toNativeUtf16(); + final nsstr = stringWithCharacters_length_(cstr.cast(), str.length); + pkg_ffi.calloc.free(cstr); + return nsstr; + } + + @override + String toString() { + final data = + dataUsingEncoding_(0x94000100 /* NSUTF16LittleEndianStringEncoding */); + return data!.bytes.cast().toDartString(length: length); + } +} diff --git a/pkgs/objective_c/tool/generate_code.dart b/pkgs/objective_c/tool/generate_code.dart new file mode 100644 index 000000000..6d322dcea --- /dev/null +++ b/pkgs/objective_c/tool/generate_code.dart @@ -0,0 +1,75 @@ +// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +// Runs the ffigen configs, then merges tool/data/extra_methods.dart into the +// Objective C bindings. + +// ignore_for_file: avoid_print + +import 'dart:io'; + +import 'package:ffigen/src/executables/ffigen.dart' as ffigen; + +const cConfig = 'ffigen_c.yaml'; +const objcConfig = 'ffigen_objc.yaml'; +const cBindings = 'lib/src/c_bindings_generated.dart'; +const objcBindings = 'lib/src/objective_c_bindings_generated.dart'; +const extraMethodsFile = 'tool/data/extra_methods.dart'; + +void dartCmd(List args) { + final exec = Platform.resolvedExecutable; + print('Running: $exec ${args.join(" ")}'); + final proc = Process.runSync(exec, args, runInShell: true); + if (proc.exitCode != 0) { + exitCode = proc.exitCode; + print(proc.stdout); + print(proc.stderr); + throw Exception('Command failed: $exec ${args.join(" ")}'); + } +} + +Map parseExtraMethods(String filename) { + final extraMethods = {}; + String? currentClass; + var methods = StringBuffer(); + for (final line in File(filename).readAsLinesSync()) { + if (currentClass == null) { + if (line.startsWith('class ')) { + currentClass = line; + methods = StringBuffer(); + } + } else { + if (line == '}') { + extraMethods[currentClass] = methods.toString(); + } else { + methods.writeln(line); + } + } + } + return extraMethods; +} + +void mergeExtraMethods(String filename, Map extraMethods) { + final out = StringBuffer(); + for (final line in File(filename).readAsLinesSync()) { + out.writeln(line); + final methods = extraMethods[line]; + if (methods != null) { + out.writeln(methods); + } + } + File(filename).writeAsStringSync(out.toString()); +} + +Future run() async { + await ffigen.main(['--no-format', '-v', 'severe', '--config', cConfig]); + await ffigen.main(['--no-format', '-v', 'severe', '--config', objcConfig]); + mergeExtraMethods(objcBindings, parseExtraMethods(extraMethodsFile)); + dartCmd(['format', cBindings, objcBindings]); +} + +Future main() async { + Directory.current = Platform.script.resolve('..').path; + await run(); +}